Python论坛  - 讨论区

标题:[python-chinese] Fwd: Ann: pywinauto 0.1.1 (initial release) released

2006年01月14日 星期六 15:05

limodou limodou at gmail.com
Sat Jan 14 15:05:44 HKT 2006

---------- Forwarded message ----------
From: Mark Mc Mahon <mark.m.mcmahon at gmail.com>
Date: 2006-1-13 上午6:07
Subject: Ann: pywinauto 0.1.1 (initial release) released
To: python-announce at python.org, ctypes-users at lists.sourceforge.net


I'm pleased to announce the first public release of pywinauto 0.1.1

pywinauto is a set of open-source (LGPL) modules for using Python as a GUI
automation 'driver' for Windows NT based Operating Systems (NT/W2K/XP).

SourceForge project page:
http://sourceforge.net/projects/pywinauto

Download from SourceForge
http://prdownloads.sourceforge.net/pywinauto/pywinauto-0.1.1.zip?download

pywinauto-users mailing list
http://lists.sourceforge.net/lists/listinfo/pywinauto-users


pywinauto was nudged into existence by the creation of Watsup
(http://www.tizmoi.net/watsup/intro.html) a similar tool based on
Simon Brunning's (http://www.brunningonline.net/simon/blog/index.html)
winGuiAuto.py.

There are many similar tools that do this (see:
http://tejasconsulting.com/open-testware/feature/gui-test-driver-survey.html)
So how is pywinauto different?
It is still in early stages of development (but is about as functional as
many of the other automation tools).

I think I have designed pywinauto in such a way that it should be easy
to add new actions for Controls. For example imagine

# 10th item on 1st level, 21st item on 2nd, 45th on 3rd
dlg.TreeView.Select("#10\#21\#45")

# Or Possibly (or even both!)
TreeView.Select(path_re = "Desktop\\.*\\.*c:\\Temp")

It supports Typing accented/Unicode text (by sending them to the text
area directly - rather then using SendKeys which does not appear to
handle extended/Unicode text well.

It does not require previous analysis of the dialogs to be automated or
for 'reference' information to be saved.

I have also kept in mind that to have language neutral scripts is more
or less impossible - but I am planning to enable a flag that would enable
lookup in previously saved reference information (saved during development
of the script probably) that should enable scripts to run unmodified.
(At least that's the idea - though there are cases where sorting - e.g.
listboxes - might make that impossible).

There is currently no documentation and the examples do double duty as
tests. I am hoping to improve this. Any interest in my first publicly
release code would help my ego greatly :-)


Requirements:
ctypes       http://starship.python.net/crew/theller/ctypes/
Sendkeys     http://www.rutherfurd.net/python/sendkeys/index.html
(Optional)   PIL          http://www.pythonware.com/products/pil/index.htm
(Optional)   elementtree  http://effbot.org/downloads/


Very simple test of Notepad automation (notice no time.sleep() ;-)

----------------------- :< -----------------------
import application

app = application.Application()
app._start(ur"c:\windows\system32\notepad.exe")

app.Notepad.MenuSelect("File->PageSetup")

# ----- Page Setup Dialog ----
# Select the 'Letter' combobox item
app.PageSetupDlg.ComboBox1.Select("Letter")

# Now close the dialog
app.PageSetupDlg.Ok.Click ()

# type some text
app.Notepad.Edit.SetText(u"Typíng söme tèxt\r\n2nd lïne")

# Close Notepad (and don't save)
app.Notepad.MenuSelect("File->Exit")
app.Notepad.No.Click ()
----------------------- :< -----------------------

pywinauto makes significant use of ctypes, I would like to extend my thanks
to Thomas Heller and the whole Python community for producing such
intuitive tools!

Thank you
   Mark

--------------------------------------------
Mark Mc Mahon
24 Plummer Rd., Manchester, NH 03110, USA

http://sourceforge.net/projects/pywinauto">pywinauto 0.1.1 Simple Windows GUI automation with Python. (12-Jan-06) -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations.html -- I like python! My Blog: http://www.donews.net/limodou NewEdit Maillist: http://groups.google.com/group/NewEdit


[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年01月16日 星期一 09:41

Slowness Chen chenzh at bhh.com.cn
Mon Jan 16 09:41:55 HKT 2006

interesting, I will definitely check it out.
----- Original Message ----- 
From: "limodou" <limodou at gmail.com>
To: "python-chinese列表" <python-chinese at lists.python.cn>; 
"Python.cn at google" <python-cn at googlegroups.com>
Sent: Saturday, January 14, 2006 3:05 PM
Subject: [python-chinese] Fwd: Ann: pywinauto 0.1.1 (initial 
release)released


> ---------- Forwarded message ----------
> From: Mark Mc Mahon <mark.m.mcmahon at gmail.com>
> Date: 2006-1-13 上午6:07
> Subject: Ann: pywinauto 0.1.1 (initial release) released
> To: python-announce at python.org, ctypes-users at lists.sourceforge.net
>
>
> I'm pleased to announce the first public release of pywinauto 0.1.1
>
> pywinauto is a set of open-source (LGPL) modules for using Python as a GUI
> automation 'driver' for Windows NT based Operating Systems (NT/W2K/XP).
>
> SourceForge project page:
> http://sourceforge.net/projects/pywinauto
>
> Download from SourceForge
> http://prdownloads.sourceforge.net/pywinauto/pywinauto-0.1.1.zip?download
>
> pywinauto-users mailing list
> http://lists.sourceforge.net/lists/listinfo/pywinauto-users
>
>
> pywinauto was nudged into existence by the creation of Watsup
> (http://www.tizmoi.net/watsup/intro.html) a similar tool based on
> Simon Brunning's (http://www.brunningonline.net/simon/blog/index.html)
> winGuiAuto.py.
>
> There are many similar tools that do this (see:
> http://tejasconsulting.com/open-testware/feature/gui-test-driver-survey.html)
> So how is pywinauto different?
> It is still in early stages of development (but is about as functional as
> many of the other automation tools).
>
> I think I have designed pywinauto in such a way that it should be easy
> to add new actions for Controls. For example imagine
>
> # 10th item on 1st level, 21st item on 2nd, 45th on 3rd
> dlg.TreeView.Select("#10\#21\#45")
>
> # Or Possibly (or even both!)
> TreeView.Select(path_re = "Desktop\\.*\\.*c:\\Temp")
>
> It supports Typing accented/Unicode text (by sending them to the text
> area directly - rather then using SendKeys which does not appear to
> handle extended/Unicode text well.
>
> It does not require previous analysis of the dialogs to be automated or
> for 'reference' information to be saved.
>
> I have also kept in mind that to have language neutral scripts is more
> or less impossible - but I am planning to enable a flag that would enable
> lookup in previously saved reference information (saved during development
> of the script probably) that should enable scripts to run unmodified.
> (At least that's the idea - though there are cases where sorting - e.g.
> listboxes - might make that impossible).
>
> There is currently no documentation and the examples do double duty as
> tests. I am hoping to improve this. Any interest in my first publicly
> release code would help my ego greatly :-)
>
>
> Requirements:
> ctypes       http://starship.python.net/crew/theller/ctypes/
> Sendkeys     http://www.rutherfurd.net/python/sendkeys/index.html
> (Optional)   PIL          http://www.pythonware.com/products/pil/index.htm
> (Optional)   elementtree  http://effbot.org/downloads/
>
>
> Very simple test of Notepad automation (notice no time.sleep() ;-)
>
> ----------------------- :< -----------------------
> import application
>
> app = application.Application()
> app._start(ur"c:\windows\system32\notepad.exe")
>
> app.Notepad.MenuSelect("File->PageSetup")
>
> # ----- Page Setup Dialog ----
> # Select the 'Letter' combobox item
> app.PageSetupDlg.ComboBox1.Select("Letter")
>
> # Now close the dialog
> app.PageSetupDlg.Ok.Click ()
>
> # type some text
> app.Notepad.Edit.SetText(u"Typíng söme tèxt\r\n2nd lïne")
>
> # Close Notepad (and don't save)
> app.Notepad.MenuSelect("File->Exit")
> app.Notepad.No.Click ()
> ----------------------- :< -----------------------
>
> pywinauto makes significant use of ctypes, I would like to extend my 
> thanks
> to Thomas Heller and the whole Python community for producing such
> intuitive tools!
>
> Thank you
>   Mark
>
> --------------------------------------------
> Mark Mc Mahon
> 24 Plummer Rd., Manchester, NH 03110, USA
>
> 

http://sourceforge.net/projects/pywinauto">pywinauto 0.1.1 > Simple Windows GUI automation with Python. (12-Jan-06) > -- > http://mail.python.org/mailman/listinfo/python-announce-list > > Support the Python Software Foundation: > http://www.python.org/psf/donations.html > > > -- > I like python! > My Blog: http://www.donews.net/limodou > NewEdit Maillist: http://groups.google.com/group/NewEdit > -------------------------------------------------------------------------------- > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese


[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年01月16日 星期一 14:11

RichardLee RichardLee at e28.com
Mon Jan 16 14:11:49 HKT 2006

I check it out and setup on my python 2.4 platform, but the following happened when I run the test_application.py:
"
C:/Python24/pythonw.exe -u  "C:/Python24/Lib/site-packages/test_application.py"
Traceback (most recent call last):
  File "C:/Python24/Lib/site-packages/test_application.py", line 320, in ?
    Main()
  File "C:/Python24/Lib/site-packages/test_application.py", line 311, in Main
    MinimalNotepadTest()
  File "C:/Python24/Lib/site-packages/test_application.py", line 147, in MinimalNotepadTest
    app.Notepad.MenuSelect("File->PageSetup")
  File "c:\python24\Lib\site-packages\application.py", line 142, in __getattr__
    dlg, final = wait_for_function_success(
  File "c:\python24\Lib\site-packages\application.py", line 169, in wait_for_function_success
    return func(*args, ** kwargs)
  File "c:\python24\Lib\site-packages\application.py", line 111, in WalkDialogControlAttribs
    dialogWin = findbestmatch.find_best_control_match(attr_path[0], wins)
  File "c:\python24\Lib\site-packages\findbestmatch.py", line 209, in find_best_control_match
    raise MatchError(items = name_control_map.keys(), tofind = search_text)
findbestmatch.MatchError: Could not find 'Notepad' in '['Dialog']'
"
Any comments?
Thanks in advance!

Best Regards
Richard Lee
-----邮件原件-----
发件人: python-chinese-bounces at lists.python.cn [mailto:python-chinese-bounces at lists.python.cn] 代表 Slowness Chen
发送时间: 2006年1月16日 9:42
收件人: python-chinese at lists.python.cn
主题: Spam:Re: [python-chinese] Fwd: Ann: pywinauto 0.1.1 (initialrelease)released

interesting, I will definitely check it out.
----- Original Message ----- 
From: "limodou" <limodou at gmail.com>
To: "python-chinese列表" <python-chinese at lists.python.cn>; 
"Python.cn at google" <python-cn at googlegroups.com>
Sent: Saturday, January 14, 2006 3:05 PM
Subject: [python-chinese] Fwd: Ann: pywinauto 0.1.1 (initial 
release)released


> ---------- Forwarded message ----------
> From: Mark Mc Mahon <mark.m.mcmahon at gmail.com>
> Date: 2006-1-13 上午6:07
> Subject: Ann: pywinauto 0.1.1 (initial release) released
> To: python-announce at python.org, ctypes-users at lists.sourceforge.net
>
>
> I'm pleased to announce the first public release of pywinauto 0.1.1
>
> pywinauto is a set of open-source (LGPL) modules for using Python as a GUI
> automation 'driver' for Windows NT based Operating Systems (NT/W2K/XP).
>
> SourceForge project page:
> http://sourceforge.net/projects/pywinauto
>
> Download from SourceForge
> http://prdownloads.sourceforge.net/pywinauto/pywinauto-0.1.1.zip?download
>
> pywinauto-users mailing list
> http://lists.sourceforge.net/lists/listinfo/pywinauto-users
>
>
> pywinauto was nudged into existence by the creation of Watsup
> (http://www.tizmoi.net/watsup/intro.html) a similar tool based on
> Simon Brunning's (http://www.brunningonline.net/simon/blog/index.html)
> winGuiAuto.py.
>
> There are many similar tools that do this (see:
> http://tejasconsulting.com/open-testware/feature/gui-test-driver-survey.html)
> So how is pywinauto different?
> It is still in early stages of development (but is about as functional as
> many of the other automation tools).
>
> I think I have designed pywinauto in such a way that it should be easy
> to add new actions for Controls. For example imagine
>
> # 10th item on 1st level, 21st item on 2nd, 45th on 3rd
> dlg.TreeView.Select("#10\#21\#45")
>
> # Or Possibly (or even both!)
> TreeView.Select(path_re = "Desktop\\.*\\.*c:\\Temp")
>
> It supports Typing accented/Unicode text (by sending them to the text
> area directly - rather then using SendKeys which does not appear to
> handle extended/Unicode text well.
>
> It does not require previous analysis of the dialogs to be automated or
> for 'reference' information to be saved.
>
> I have also kept in mind that to have language neutral scripts is more
> or less impossible - but I am planning to enable a flag that would enable
> lookup in previously saved reference information (saved during development
> of the script probably) that should enable scripts to run unmodified.
> (At least that's the idea - though there are cases where sorting - e.g.
> listboxes - might make that impossible).
>
> There is currently no documentation and the examples do double duty as
> tests. I am hoping to improve this. Any interest in my first publicly
> release code would help my ego greatly :-)
>
>
> Requirements:
> ctypes       http://starship.python.net/crew/theller/ctypes/
> Sendkeys     http://www.rutherfurd.net/python/sendkeys/index.html
> (Optional)   PIL          http://www.pythonware.com/products/pil/index.htm
> (Optional)   elementtree  http://effbot.org/downloads/
>
>
> Very simple test of Notepad automation (notice no time.sleep() ;-)
>
> ----------------------- :< -----------------------
> import application
>
> app = application.Application()
> app._start(ur"c:\windows\system32\notepad.exe")
>
> app.Notepad.MenuSelect("File->PageSetup")
>
> # ----- Page Setup Dialog ----
> # Select the 'Letter' combobox item
> app.PageSetupDlg.ComboBox1.Select("Letter")
>
> # Now close the dialog
> app.PageSetupDlg.Ok.Click ()
>
> # type some text
> app.Notepad.Edit.SetText(u"Typíng söme tèxt\r\n2nd lïne")
>
> # Close Notepad (and don't save)
> app.Notepad.MenuSelect("File->Exit")
> app.Notepad.No.Click ()
> ----------------------- :< -----------------------
>
> pywinauto makes significant use of ctypes, I would like to extend my 
> thanks
> to Thomas Heller and the whole Python community for producing such
> intuitive tools!
>
> Thank you
>   Mark
>
> --------------------------------------------
> Mark Mc Mahon
> 24 Plummer Rd., Manchester, NH 03110, USA
>
> 

http://sourceforge.net/projects/pywinauto">pywinauto 0.1.1 > Simple Windows GUI automation with Python. (12-Jan-06) > -- > http://mail.python.org/mailman/listinfo/python-announce-list > > Support the Python Software Foundation: > http://www.python.org/psf/donations.html > > > -- > I like python! > My Blog: http://www.donews.net/limodou > NewEdit Maillist: http://groups.google.com/group/NewEdit > -------------------------------------------------------------------------------- > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese


[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年01月16日 星期一 14:30

Sun Wei helium.sun at gmail.com
Mon Jan 16 14:30:04 HKT 2006

Try it on an English Windows.

2006/1/16, RichardLee <RichardLee at e28.com>:
>
> I check it out and setup on my python 2.4 platform, but the following
> happened when I run the test_application.py:
> "
> C:/Python24/pythonw.exe
> -u  "C:/Python24/Lib/site-packages/test_application.py"
> Traceback (most recent call last):
> File "C:/Python24/Lib/site-packages/test_application.py", line 320, in ?
>    Main()
> File "C:/Python24/Lib/site-packages/test_application.py", line 311, in
> Main
>    MinimalNotepadTest()
> File "C:/Python24/Lib/site-packages/test_application.py", line 147, in
> MinimalNotepadTest
>    app.Notepad.MenuSelect("File->PageSetup")
> File "c:\python24\Lib\site-packages\application.py", line 142, in
> __getattr__
>    dlg, final = wait_for_function_success(
> File "c:\python24\Lib\site-packages\application.py", line 169, in
> wait_for_function_success
>    return func(*args, ** kwargs)
> File "c:\python24\Lib\site-packages\application.py", line 111, in
> WalkDialogControlAttribs
>    dialogWin = findbestmatch.find_best_control_match(attr_path[0], wins)
> File "c:\python24\Lib\site-packages\findbestmatch.py", line 209, in
> find_best_control_match
>    raise MatchError(items = name_control_map.keys(), tofind = search_text)
> findbestmatch.MatchError: Could not find 'Notepad' in '['Dialog']'
> "
> Any comments?
> Thanks in advance!
>
> Best Regards
> Richard Lee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060116/a82be718/attachment.html

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年01月16日 星期一 16:00

RichardLee RichardLee at e28.com
Mon Jan 16 16:00:16 HKT 2006

It’s not convenient to try. ;-(

IMO, it is NOT correlative to the English or Chinese version of Windows,
maybe.

I have run the sendkeys module’s sample successfully which the pywinauto
mentioned/depended on.

Another information: the pywinauto’s version I tried is 0.1.2

 

Any other comments?

 

Thanks a lot!

 

Best Regards

Richard Lee 

  _____  

发件人: python-chinese-bounces at lists.python.cn
[mailto:python-chinese-bounces at lists.python.cn] 代表 Sun Wei
发送时间: 2006年1月16日 14:30
收件人: python-chinese at lists.python.cn
主题: Spam:Re: Spam:Re: [python-chinese] Fwd: Ann: pywinauto
0.1.1(initialrelease)released

 

Try it on an English Windows.

2006/1/16, RichardLee <RichardLee at e28.com>: 

I check it out and setup on my python 2.4 platform, but the following
happened when I run the test_application.py: 
"
C:/Python24/pythonw.exe -u  "C:/Python24/Lib/site-packages/test_application.
py"
Traceback (most recent call last):
File "C:/Python24/Lib/site-packages/test_application.py", line 320, in ? 
   Main()
File "C:/Python24/Lib/site-packages/test_application.py", line 311, in Main
   MinimalNotepadTest()
File "C:/Python24/Lib/site-packages/test_application.py", line 147, in
MinimalNotepadTest 
   app.Notepad.MenuSelect("File->PageSetup")
File "c:\python24\Lib\site-packages\application.py", line 142, in
__getattr__
   dlg, final = wait_for_function_success(
File "c:\python24\Lib\site-packages\application.py", line 169, in
wait_for_function_success 
   return func(*args, ** kwargs)
File "c:\python24\Lib\site-packages\application.py", line 111, in
WalkDialogControlAttribs
   dialogWin = findbestmatch.find_best_control_match(attr_path[0], wins)
File "c:\python24\Lib\site-packages\findbestmatch.py", line 209, in
find_best_control_match 
   raise MatchError(items = name_control_map.keys(), tofind = search_text)
findbestmatch.MatchError: Could not find 'Notepad' in '['Dialog']'
"
Any comments?
Thanks in advance!

Best Regards
Richard Lee

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060116/8dc0db07/attachment.htm

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年01月16日 星期一 16:23

Slowness Chen chenzh at bhh.com.cn
Mon Jan 16 16:23:05 HKT 2006

> findbestmatch.MatchError: Could not find 'Notepad' in '['Dialog']'
1. Does the test need open notepad first ?
2. Since pywinauto uses ctypes, maybe it will search notepad by the window 
title of notepad.
Notepad has different titles between en.(author's os?) and cn. windows.

I haven't tried yet, so it's just a guess.

  ----- Original Message ----- 
  From: RichardLee
  To: python-chinese at lists.python.cn
  Sent: Monday, January 16, 2006 4:00 PM
  Subject: Re: Spam:Re: Spam:Re: [python-chinese] Fwd: Ann: 
pywinauto0.1.1(initialrelease)released


  It’s not convenient to try. ;-(

  IMO, it is NOT correlative to the English or Chinese version of Windows, 
maybe.

  I have run the sendkeys module’s sample successfully which the pywinauto 
mentioned/depended on.

  Another information: the pywinauto’s version I tried is 0.1.2



  Any other comments?



  Thanks a lot!



  Best Regards

  Richard Lee


------------------------------------------------------------------------------

  发件人: python-chinese-bounces at lists.python.cn 
[mailto:python-chinese-bounces at lists.python.cn] 代表 Sun Wei
  发送时间: 2006年1月16日 14:30
  收件人: python-chinese at lists.python.cn
  主题: Spam:Re: Spam:Re: [python-chinese] Fwd: Ann: pywinauto 
0.1.1(initialrelease)released



  Try it on an English Windows.

  2006/1/16, RichardLee <RichardLee at e28.com>:

  I check it out and setup on my python 2.4 platform, but the following 
happened when I run the test_application.py:
  "
  C:/Python24/pythonw.exe -u 
"C:/Python24/Lib/site-packages/test_application.py"
  Traceback (most recent call last):
  File "C:/Python24/Lib/site-packages/test_application.py", line 320, in ?
     Main()
  File "C:/Python24/Lib/site-packages/test_application.py", line 311, in 
Main
     MinimalNotepadTest()
  File "C:/Python24/Lib/site-packages/test_application.py", line 147, in 
MinimalNotepadTest
     app.Notepad.MenuSelect("File->PageSetup")
  File "c:\python24\Lib\site-packages\application.py", line 142, in 
__getattr__
     dlg, final = wait_for_function_success(
  File "c:\python24\Lib\site-packages\application.py", line 169, in 
wait_for_function_success
     return func(*args, ** kwargs)
  File "c:\python24\Lib\site-packages\application.py", line 111, in 
WalkDialogControlAttribs
     dialogWin = findbestmatch.find_best_control_match(attr_path[0], wins)
  File "c:\python24\Lib\site-packages\findbestmatch.py", line 209, in 
find_best_control_match
     raise MatchError(items = name_control_map.keys(), tofind = search_text)
  findbestmatch.MatchError: Could not find 'Notepad' in '['Dialog']'
  "
  Any comments?
  Thanks in advance!

  Best Regards
  Richard Lee





------------------------------------------------------------------------------


  _______________________________________________
  python-chinese
  Post: send python-chinese at lists.python.cn
  Subscribe: send subscribe to python-chinese-request at lists.python.cn
  Unsubscribe: send unsubscribe to  python-chinese-request at lists.python.cn
  Detail Info: http://python.cn/mailman/listinfo/python-chinese 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060116/a107bd4b/attachment-0001.htm

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年01月16日 星期一 16:37

RichardLee RichardLee at e28.com
Mon Jan 16 16:37:09 HKT 2006

Hi Slowness Chen,

 

Anyway, thank you! I will try it later!

 

Best Regards

Richard Lee 

  _____  

发件人: python-chinese-bounces at lists.python.cn
[mailto:python-chinese-bounces at lists.python.cn] 代表 Slowness Chen
发送时间: 2006年1月16日 16:23
收件人: python-chinese at lists.python.cn
主题: Spam:Re: Spam:Re: Spam:Re: [python-chinese] Fwd:
Ann:pywinauto0.1.1(initialrelease)released

 


> findbestmatch.MatchError: Could not find 'Notepad' in '['Dialog']'

1. Does the test need open notepad first ?

2. Since pywinauto uses ctypes, maybe it will search notepad by the window
title of notepad.

Notepad has different titles between en.(author's os?) and cn. windows.

 

I haven't tried yet, so it's just a guess. 

 

----- Original Message ----- 

From: RichardLee RichardLee at e28.com>  

To: python-chinese at lists.python.cn 

Sent: Monday, January 16, 2006 4:00 PM

Subject: Re: Spam:Re: Spam:Re: [python-chinese] Fwd: Ann:
pywinauto0.1.1(initialrelease)released

 

It’s not convenient to try. ;-(

IMO, it is NOT correlative to the English or Chinese version of Windows,
maybe.

I have run the sendkeys module’s sample successfully which the pywinauto
mentioned/depended on.

Another information: the pywinauto’s version I tried is 0.1.2

 

Any other comments?

 

Thanks a lot!

 

Best Regards

Richard Lee 


  _____  


发件人: python-chinese-bounces at lists.python.cn
[mailto:python-chinese-bounces at lists.python.cn] 代表 Sun Wei
发送时间: 2006年1月16日 14:30
收件人: python-chinese at lists.python.cn
主题: Spam:Re: Spam:Re: [python-chinese] Fwd: Ann: pywinauto
0.1.1(initialrelease)released

 

Try it on an English Windows.

2006/1/16, RichardLee <RichardLee at e28.com>: 

I check it out and setup on my python 2.4 platform, but the following
happened when I run the test_application.py: 
"
C:/Python24/pythonw.exe -u  "C:/Python24/Lib/site-packages/test_application.
py"
Traceback (most recent call last):
File "C:/Python24/Lib/site-packages/test_application.py", line 320, in ? 
   Main()
File "C:/Python24/Lib/site-packages/test_application.py", line 311, in Main
   MinimalNotepadTest()
File "C:/Python24/Lib/site-packages/test_application.py", line 147, in
MinimalNotepadTest 
   app.Notepad.MenuSelect("File->PageSetup")
File "c:\python24\Lib\site-packages\application.py", line 142, in
__getattr__
   dlg, final = wait_for_function_success(
File "c:\python24\Lib\site-packages\application.py", line 169, in
wait_for_function_success 
   return func(*args, ** kwargs)
File "c:\python24\Lib\site-packages\application.py", line 111, in
WalkDialogControlAttribs
   dialogWin = findbestmatch.find_best_control_match(attr_path[0], wins)
File "c:\python24\Lib\site-packages\findbestmatch.py", line 209, in
find_best_control_match 
   raise MatchError(items = name_control_map.keys(), tofind = search_text)
findbestmatch.MatchError: Could not find 'Notepad' in '['Dialog']'
"
Any comments?
Thanks in advance!

Best Regards
Richard Lee

 


  _____  


_______________________________________________
python-chinese
Post: send python-chinese at lists.python.cn
Subscribe: send subscribe to python-chinese-request at lists.python.cn
Unsubscribe: send unsubscribe to  python-chinese-request at lists.python.cn
Detail Info: http://python.cn/mailman/listinfo/python-chinese

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060116/5072b369/attachment-0001.htm

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年01月17日 星期二 10:02

Slowness Chen chenzh at bhh.com.cn
Tue Jan 17 10:02:22 HKT 2006

试了一下,现在的版本不能处理非ascii字符title:

# looks for a Window/Dialog of your app that has
# a title 'similar'to "Notepad"
myapp.Notepad

作者在下个版本可能会用__getitem__ 代替现在的__getattr__实现。
例如: dlg.MSDOS 变为dlg['MSDOS']
for non-ascii: dlg = app[u'non-ascii characters']
  ----- Original Message ----- 
  From: RichardLee
  To: python-chinese at lists.python.cn
  Sent: Monday, January 16, 2006 4:37 PM
  Subject: Re: Spam:Re: Spam:Re: Spam:Re: [python-chinese] 
Fwd:Ann:pywinauto0.1.1(initialrelease)released


  Hi Slowness Chen,



  Anyway, thank you! I will try it later!



  Best Regards

  Richard Lee


------------------------------------------------------------------------------

  发件人: python-chinese-bounces at lists.python.cn 
[mailto:python-chinese-bounces at lists.python.cn] 代表 Slowness Chen
  发送时间: 2006年1月16日 16:23
  收件人: python-chinese at lists.python.cn
  主题: Spam:Re: Spam:Re: Spam:Re: [python-chinese] Fwd: 
Ann:pywinauto0.1.1(initialrelease)released




  > findbestmatch.MatchError: Could not find 'Notepad' in '['Dialog']'

  1. Does the test need open notepad first ?

  2. Since pywinauto uses ctypes, maybe it will search notepad by the window 
title of notepad.

  Notepad has different titles between en.(author's os?) and cn. windows.



  I haven't tried yet, so it's just a guess.



    ----- Original Message ----- 

    From: RichardLee

    To: python-chinese at lists.python.cn

    Sent: Monday, January 16, 2006 4:00 PM

    Subject: Re: Spam:Re: Spam:Re: [python-chinese] Fwd: Ann: 
pywinauto0.1.1(initialrelease)released



    It’s not convenient to try. ;-(

    IMO, it is NOT correlative to the English or Chinese version of Windows, 
maybe.

    I have run the sendkeys module’s sample successfully which the 
pywinauto mentioned/depended on.

    Another information: the pywinauto’s version I tried is 0.1.2



    Any other comments?



    Thanks a lot!



    Best Regards

    Richard Lee


----------------------------------------------------------------------------

    发件人: python-chinese-bounces at lists.python.cn 
[mailto:python-chinese-bounces at lists.python.cn] 代表 Sun Wei
    发送时间: 2006年1月16日 14:30
    收件人: python-chinese at lists.python.cn
    主题: Spam:Re: Spam:Re: [python-chinese] Fwd: Ann: pywinauto 
0.1.1(initialrelease)released



    Try it on an English Windows.

    2006/1/16, RichardLee <RichardLee at e28.com>:

    I check it out and setup on my python 2.4 platform, but the following 
happened when I run the test_application.py:
    "
    C:/Python24/pythonw.exe -u 
"C:/Python24/Lib/site-packages/test_application.py"
    Traceback (most recent call last):
    File "C:/Python24/Lib/site-packages/test_application.py", line 320, in ?
       Main()
    File "C:/Python24/Lib/site-packages/test_application.py", line 311, in 
Main
       MinimalNotepadTest()
    File "C:/Python24/Lib/site-packages/test_application.py", line 147, in 
MinimalNotepadTest
       app.Notepad.MenuSelect("File->PageSetup")
    File "c:\python24\Lib\site-packages\application.py", line 142, in 
__getattr__
       dlg, final = wait_for_function_success(
    File "c:\python24\Lib\site-packages\application.py", line 169, in 
wait_for_function_success
       return func(*args, ** kwargs)
    File "c:\python24\Lib\site-packages\application.py", line 111, in 
WalkDialogControlAttribs
       dialogWin = findbestmatch.find_best_control_match(attr_path[0], wins)
    File "c:\python24\Lib\site-packages\findbestmatch.py", line 209, in 
find_best_control_match
       raise MatchError(items = name_control_map.keys(), tofind = 
search_text)
    findbestmatch.MatchError: Could not find 'Notepad' in '['Dialog']'
    "
    Any comments?
    Thanks in advance!

    Best Regards
    Richard Lee




----------------------------------------------------------------------------

    _______________________________________________
    python-chinese
    Post: send python-chinese at lists.python.cn
    Subscribe: send subscribe to python-chinese-request at lists.python.cn
    Unsubscribe: send unsubscribe to  python-chinese-request at lists.python.cn
    Detail Info: http://python.cn/mailman/listinfo/python-chinese



------------------------------------------------------------------------------


  _______________________________________________
  python-chinese
  Post: send python-chinese at lists.python.cn
  Subscribe: send subscribe to python-chinese-request at lists.python.cn
  Unsubscribe: send unsubscribe to  python-chinese-request at lists.python.cn
  Detail Info: http://python.cn/mailman/listinfo/python-chinese 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060117/796cfa1f/attachment-0001.htm

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号