Updated documentation for upcoming release
This commit is contained in:
parent
4ee85bcad7
commit
89fac02f13
@ -1,206 +1,225 @@
|
||||
0.3.4 Fixed issue with latest ctypes, updated print_control_identifiers()
|
||||
------------------------------------------------------------------
|
||||
XX-Apr-2006
|
||||
|
||||
* The latest version of ctypes (0.9.9.6) removed the code generator
|
||||
I was using some generated code in win32functions.py (stdcall). I
|
||||
was not using those functions so I just commented them out.
|
||||
|
||||
* Started the process of renaming methods of the ``Application`` and
|
||||
``WindowSpecification`` classes. I will be converting names to
|
||||
``UppercaseNames_()``. The trailing ``_`` is to disambiguate the
|
||||
method names from potential Window titles.
|
||||
|
||||
* Updated how print_control_identifiers works so that it now always
|
||||
prints the disambiguated control name. (even for single controls)
|
||||
|
||||
* Added __hash__ to HwndWrapper so that controls could be dictionary
|
||||
keys.
|
||||
|
||||
0.3.3 Added some methods, and fixed some small bugs
|
||||
------------------------------------------------------------------
|
||||
19-Apr-2006
|
||||
|
||||
* Added a wait for the control to be active and configurable
|
||||
sleeps after 'modifying' actions (e.g. Select, Deselect, etc)
|
||||
* Added a wait for the control to be active and configurable
|
||||
sleeps after 'modifying' actions (e.g. Select, Deselect, etc)
|
||||
|
||||
* Fixed Timings.Slow() and Timings.Fast() - they could in certain
|
||||
circumstances do the opposite! If you had already set a timing
|
||||
slower or faster then they would set it then they would blindly
|
||||
ignore that and set their own times. I added functionality that
|
||||
they will take either the slowest or fastest of the new/current
|
||||
setting rather then blindly setting to the new value.
|
||||
* Fixed Timings.Slow() and Timings.Fast() - they could in certain
|
||||
circumstances do the opposite! If you had already set a timing
|
||||
slower or faster then they would set it then they would blindly
|
||||
ignore that and set their own times. I added functionality that
|
||||
they will take either the slowest or fastest of the new/current
|
||||
setting rather then blindly setting to the new value.
|
||||
|
||||
* Fixed some hidden bugs with HwndWrapper.CloseClick()
|
||||
|
||||
* Fixed a bug in setup.py that would raise an error when no
|
||||
argument was specified
|
||||
|
||||
* Added an argument to HwndWrapper.SendMessageTimeout so that
|
||||
the wait options could be passed in.
|
||||
|
||||
* Added HwndWrapper.Close(), Maximize(), Minimize(), Restore()
|
||||
and GetShowState().
|
||||
|
||||
* Commented out all deprecated methods (will be removed completely
|
||||
in some future release).
|
||||
|
||||
* Added Application.kill_() method - which closes all windows and
|
||||
kills the application. If the application is asking if you want
|
||||
to save your changes - you will not be able to click yes or no
|
||||
and the application will be killed anyway!.
|
||||
* Fixed some hidden bugs with HwndWrapper.CloseClick()
|
||||
|
||||
* Fixed a bug in setup.py that would raise an error when no
|
||||
argument was specified
|
||||
|
||||
* Added an argument to HwndWrapper.SendMessageTimeout so that
|
||||
the wait options could be passed in.
|
||||
|
||||
* Added HwndWrapper.Close(), Maximize(), Minimize(), Restore()
|
||||
and GetShowState().
|
||||
|
||||
* Commented out all deprecated methods (will be removed completely
|
||||
in some future release).
|
||||
|
||||
* Added Application.kill_() method - which closes all windows and
|
||||
kills the application. If the application is asking if you want
|
||||
to save your changes - you will not be able to click yes or no
|
||||
and the application will be killed anyway!.
|
||||
|
||||
|
||||
0.3.2 Fixed setup.py and some typos
|
||||
------------------------------------------------------------------
|
||||
31-Mar-2006
|
||||
|
||||
* Fixed the spelling of Stefaan Himpe's name
|
||||
* Fixed the spelling of Stefaan Himpe's name
|
||||
|
||||
* Fixed setup.py which was working for creating a distribution but
|
||||
not for installing it (again thanks to Stefaan for pointing it out!)
|
||||
* Fixed setup.py which was working for creating a distribution but
|
||||
not for installing it (again thanks to Stefaan for pointing it out!)
|
||||
|
||||
|
||||
0.3.1 Performance tune-ups
|
||||
------------------------------------------------------------------
|
||||
30-Mar-2006
|
||||
|
||||
* Change calculation of distance in findbestmatch.GetNonTextControlName()
|
||||
so that it does not need to square or get the square root to
|
||||
find the real distance - as we only need to compare values - not have
|
||||
the actual distance. (Thanks to Stefaan Himpe)
|
||||
|
||||
* Compiled regular expression patterns before doing the match to
|
||||
avoid compiling the regular expression for window that is being
|
||||
tested (Thanks to Stefaan Himpe)
|
||||
|
||||
* Made it easier to add your own control tests by adding a file
|
||||
extra_tests.py which needs to export a ModifyRegisteredTests() method.
|
||||
Also cleaned up the code a little.
|
||||
|
||||
* Updated notepad_fast.py to make it easier to profile (adde a method)
|
||||
* Change calculation of distance in findbestmatch.GetNonTextControlName()
|
||||
so that it does not need to square or get the square root to
|
||||
find the real distance - as we only need to compare values - not have
|
||||
the actual distance. (Thanks to Stefaan Himpe)
|
||||
|
||||
* Changed WrapHandle to use a cache for classes it has matched - this is
|
||||
to avoid having to match against all classes constantly.
|
||||
* Compiled regular expression patterns before doing the match to
|
||||
avoid compiling the regular expression for window that is being
|
||||
tested (Thanks to Stefaan Himpe)
|
||||
|
||||
* Changed default timeout in SendMessageTimeout to .001 seconds from .4
|
||||
seconds this results in a significant speedup. Will need to make this
|
||||
value modifiable via the timing module/routine.
|
||||
* Made it easier to add your own control tests by adding a file
|
||||
extra_tests.py which needs to export a ModifyRegisteredTests() method.
|
||||
Also cleaned up the code a little.
|
||||
|
||||
* WaitNot was raising an error if the control was not found - it should
|
||||
have returned (i.e. success - control is not in any particular state
|
||||
because it does not exist!).
|
||||
* Updated notepad_fast.py to make it easier to profile (adde a method)
|
||||
|
||||
* Added ListViewWrapper.Deselect() per Chistophe Keller's suggestion.
|
||||
While I was at it I added a check on the item value passed in and added
|
||||
a call to WaitGuiIdle(self) so that the control has a chance to process
|
||||
the message.
|
||||
* Changed WrapHandle to use a cache for classes it has matched - this is
|
||||
to avoid having to match against all classes constantly.
|
||||
|
||||
* Changed default timeout in SendMessageTimeout to .001 seconds from .4
|
||||
seconds this results in a significant speedup. Will need to make this
|
||||
value modifiable via the timing module/routine.
|
||||
|
||||
* WaitNot was raising an error if the control was not found - it should
|
||||
have returned (i.e. success - control is not in any particular state
|
||||
because it does not exist!).
|
||||
|
||||
* Added ListViewWrapper.Deselect() per Chistophe Keller's suggestion.
|
||||
While I was at it I added a check on the item value passed in and added
|
||||
a call to WaitGuiIdle(self) so that the control has a chance to process
|
||||
the message.
|
||||
|
||||
* Changed doc templates and moved dependencies into pywinauto
|
||||
subversion to ensure that all files were availabe at www.openqa.org and
|
||||
that they are not broken when viewed there.
|
||||
|
||||
* Moved all timing information into the timings.Timings class. There are
|
||||
some simple methods for changing the timings.
|
||||
|
||||
* Changed doc templates and moved dependencies into pywinauto
|
||||
subversion to ensure that all files were availabe at www.openqa.org and
|
||||
that they are not broken when viewed there.
|
||||
|
||||
* Moved all timing information into the timings.Timings class. There are
|
||||
some simple methods for changing the timings.
|
||||
|
||||
|
||||
0.3.0 Added Application data - now useful for localization testing
|
||||
------------------------------------------------------------------
|
||||
20-Mar-2006
|
||||
|
||||
* Added automatic Application data collection which can be used when
|
||||
running the same test on a different spoken language version. Support
|
||||
is still preliminary and is expected to change. Please treat as early
|
||||
Alpha.
|
||||
* Added automatic Application data collection which can be used when
|
||||
running the same test on a different spoken language version. Support
|
||||
is still preliminary and is expected to change. Please treat as early
|
||||
Alpha.
|
||||
|
||||
If you have a different language version of Windows then you can try
|
||||
this out by running the notepad_fast.py example with the langauge
|
||||
argument e.g. ::
|
||||
|
||||
examples\notepad_fast.py language
|
||||
|
||||
This will load the application data from the supplied file
|
||||
notepad_fast.pkl and use it for finding the right menu items and
|
||||
controls to select.
|
||||
|
||||
* Test implementation to make it easier to start using an application.
|
||||
Previously you needed to write code like ::
|
||||
|
||||
app = Application().connect_(title = 'Find')
|
||||
app.Find.Close.Click()
|
||||
app.NotePad.MenuSelect("File->Exit")
|
||||
|
||||
1st change was to implement static methods ``start()`` and
|
||||
``connect()``. These methods return a new Application instance
|
||||
so the above code becomes::
|
||||
|
||||
app = Application.connect(title = 'Find')
|
||||
app.Find.Close.Click()
|
||||
app.NotePad.MenuSelect("File->Exit")
|
||||
|
||||
I also wanted to make it easier to start working with a simple
|
||||
application - that may or may not have only one dialog. To make this
|
||||
situation easier I made ``window_()`` not throw if the application has not
|
||||
been ``start()ed`` or ``connect()ed`` first. This leads to simpler code
|
||||
like::
|
||||
|
||||
app = Application()
|
||||
app.Find.Close.Click()
|
||||
app.NotePad.MenuSelect("File->Exit")
|
||||
|
||||
What happens here is that when you execute any of Application.window_(),
|
||||
Application.__getattr__() or Application.__getitem__() when the
|
||||
application hasn't been connected or started. It looks for the window
|
||||
that best matches your specification and connects the application to
|
||||
that process.
|
||||
|
||||
This is extra functionality - existing connect_() and
|
||||
start_() methods still exist
|
||||
|
||||
* Fixed HwndWrapper.SetFocus() so that it would work even if the window
|
||||
was not in the foreground. (it now makes the window foreground as well
|
||||
as giving it focus). This overcomes a restriction in Windows where
|
||||
you can only change the foreground window if you own the foreground
|
||||
window.
|
||||
|
||||
* Changed some 2.4'isms that an anonymous commenter left on my blog :-)
|
||||
with these changes pywinauto should run on Python 2.3 (though I haven't
|
||||
done extensive testing).
|
||||
|
||||
* Commented out controls.common_controls.TabControlWrapper.GetTabState()
|
||||
and TabStates() as these did not seem to be returning valid values anyway.
|
||||
|
||||
* Fixed documentation issues were parts of the documentation were not
|
||||
getting generated to the HTML files.
|
||||
|
||||
* Fixed issue where MenuSelect would sometimes not work as expected.
|
||||
Some Menu actions require that the window that owns the menu be active.
|
||||
Added a call to SetFocus() before selecting a menu item to ensure that
|
||||
the window was active.
|
||||
|
||||
* Fixed Bug 1452832 where clipboard was not closed in clipboard.GetData()
|
||||
|
||||
* Added more unit tests now up to 248 from 207
|
||||
If you have a different language version of Windows then you can try
|
||||
this out by running the notepad_fast.py example with the langauge
|
||||
argument e.g. ::
|
||||
|
||||
examples\notepad_fast.py language
|
||||
|
||||
This will load the application data from the supplied file
|
||||
notepad_fast.pkl and use it for finding the right menu items and
|
||||
controls to select.
|
||||
|
||||
* Test implementation to make it easier to start using an application.
|
||||
Previously you needed to write code like ::
|
||||
|
||||
app = Application().connect_(title = 'Find')
|
||||
app.Find.Close.Click()
|
||||
app.NotePad.MenuSelect("File->Exit")
|
||||
|
||||
1st change was to implement static methods ``start()`` and
|
||||
``connect()``. These methods return a new Application instance
|
||||
so the above code becomes::
|
||||
|
||||
app = Application.connect(title = 'Find')
|
||||
app.Find.Close.Click()
|
||||
app.NotePad.MenuSelect("File->Exit")
|
||||
|
||||
I also wanted to make it easier to start working with a simple
|
||||
application - that may or may not have only one dialog. To make this
|
||||
situation easier I made ``window_()`` not throw if the application has not
|
||||
been ``start()ed`` or ``connect()ed`` first. This leads to simpler code
|
||||
like::
|
||||
|
||||
app = Application()
|
||||
app.Find.Close.Click()
|
||||
app.NotePad.MenuSelect("File->Exit")
|
||||
|
||||
What happens here is that when you execute any of Application.window_(),
|
||||
Application.__getattr__() or Application.__getitem__() when the
|
||||
application hasn't been connected or started. It looks for the window
|
||||
that best matches your specification and connects the application to
|
||||
that process.
|
||||
|
||||
This is extra functionality - existing connect_() and
|
||||
start_() methods still exist
|
||||
|
||||
* Fixed HwndWrapper.SetFocus() so that it would work even if the window
|
||||
was not in the foreground. (it now makes the window foreground as well
|
||||
as giving it focus). This overcomes a restriction in Windows where
|
||||
you can only change the foreground window if you own the foreground
|
||||
window.
|
||||
|
||||
* Changed some 2.4'isms that an anonymous commenter left on my blog :-)
|
||||
with these changes pywinauto should run on Python 2.3 (though I haven't
|
||||
done extensive testing).
|
||||
|
||||
* Commented out controls.common_controls.TabControlWrapper.GetTabState()
|
||||
and TabStates() as these did not seem to be returning valid values anyway.
|
||||
|
||||
* Fixed documentation issues were parts of the documentation were not
|
||||
getting generated to the HTML files.
|
||||
|
||||
* Fixed issue where MenuSelect would sometimes not work as expected.
|
||||
Some Menu actions require that the window that owns the menu be active.
|
||||
Added a call to SetFocus() before selecting a menu item to ensure that
|
||||
the window was active.
|
||||
|
||||
* Fixed Bug 1452832 where clipboard was not closed in clipboard.GetData()
|
||||
|
||||
* Added more unit tests now up to 248 from 207
|
||||
|
||||
|
||||
0.2.5 More refactoring, more tests
|
||||
------------------------------------------------
|
||||
07-Mar-2006
|
||||
|
||||
* Added wrapper classes for Menus and MenuItems this enabled cleaner
|
||||
interaction with Menu's. It also gives more functionality - you can now
|
||||
programmatically Click() on menus, and query if a menu item is checked
|
||||
or not.
|
||||
|
||||
* Added application.WindowSpecification.Wait() and WaitNot() methods.
|
||||
These methods allow you to wait for a control to exist, be visible,
|
||||
be enabled, be ready (both enabled and visible!) or to wait for the
|
||||
control to not be in any of these states. WaitReady(),
|
||||
WaitNotEnabled(), WaitNotVisible() now use these methods. I was able to also
|
||||
add the missing methods WaitNotReady(), WaitEnabled(), WaitVisible(),
|
||||
WaitExists(), WaitnotExists(). Please use Wait() and WaitNot() as I have
|
||||
Deprecated these Wait* methods.
|
||||
|
||||
* Slightly modified timeout waits for control resolution so that a timed
|
||||
function more accurately follows the timeout value specified.
|
||||
|
||||
* Added application.Application.start() and connect() static methods. These
|
||||
methods are factory methods in that they will return an initialized Application
|
||||
instance. They work exactly the same as start_() and connect() as they are
|
||||
implemented in terms of those.
|
||||
|
||||
from pywinauto.application import Application
|
||||
notepad = Application.start("notepad")
|
||||
same_notepad = Application.connect(path = "notepad")
|
||||
|
||||
* Updated the examples to follow changes to the code - and to make them a little
|
||||
more robust.
|
||||
* Added wrapper classes for Menus and MenuItems this enabled cleaner
|
||||
interaction with Menu's. It also gives more functionality - you can now
|
||||
programmatically Click() on menus, and query if a menu item is checked
|
||||
or not.
|
||||
|
||||
* Added a new Controls Overview document page which lists all the actions on
|
||||
all controls.
|
||||
|
||||
* Added more unit tests now up to 207 from 134 (added 68 tests)
|
||||
* Added application.WindowSpecification.Wait() and WaitNot() methods.
|
||||
These methods allow you to wait for a control to exist, be visible,
|
||||
be enabled, be ready (both enabled and visible!) or to wait for the
|
||||
control to not be in any of these states. WaitReady(),
|
||||
WaitNotEnabled(), WaitNotVisible() now use these methods. I was able to also
|
||||
add the missing methods WaitNotReady(), WaitEnabled(), WaitVisible(),
|
||||
WaitExists(), WaitnotExists(). Please use Wait() and WaitNot() as I have
|
||||
Deprecated these Wait* methods.
|
||||
|
||||
* Slightly modified timeout waits for control resolution so that a timed
|
||||
function more accurately follows the timeout value specified.
|
||||
|
||||
* Added application.Application.start() and connect() static methods. These
|
||||
methods are factory methods in that they will return an initialized Application
|
||||
instance. They work exactly the same as start_() and connect() as they are
|
||||
implemented in terms of those.
|
||||
|
||||
from pywinauto.application import Application
|
||||
notepad = Application.start("notepad")
|
||||
same_notepad = Application.connect(path = "notepad")
|
||||
|
||||
* Updated the examples to follow changes to the code - and to make them a little
|
||||
more robust.
|
||||
|
||||
* Added a new Controls Overview document page which lists all the actions on
|
||||
all controls.
|
||||
|
||||
* Added more unit tests now up to 207 from 134 (added 68 tests)
|
||||
|
||||
|
||||
|
||||
@ -208,122 +227,122 @@
|
||||
------------------------------------------------
|
||||
17-Feb-2006
|
||||
|
||||
* Quick release to get many changes out there - but this release has
|
||||
been less tested then I would like for a .3 release.
|
||||
|
||||
* Allow access to non text controls using the closest Text control.
|
||||
This closest text control will normally be the static/label associated
|
||||
with the control. For example in Notepad, Format->Font dialog, the 1st
|
||||
combobox can be refered to as "FontComboBox" rather than "ComboBox1"
|
||||
|
||||
* Added a new control wrapper - ``PopupMenuWrapper`` for context menu's
|
||||
You can now work easily with context menu's
|
||||
e.g. ::
|
||||
|
||||
app.Notepad.Edit.RightClick()
|
||||
# need to use MenuClick rather then MenuSelect
|
||||
app.PopupMenu.MenuClick("Select All")
|
||||
app.Notepad.Edit.RightClick()
|
||||
app.PopupMenu.MenuClick("Copy")
|
||||
|
||||
I could think of merging the ``RightClick()`` and ``MenuSelect()`` into one method
|
||||
``ContextMenuSelect()`` if that makes sense to most people.
|
||||
|
||||
* Added Support for Up-Down controls
|
||||
|
||||
* Not all top level windows now have a FriendlyClassName of "Dialog".
|
||||
I changed this because it made it hard to get windows of a particular
|
||||
class. For example the main Notepad window has a class name of "Notepad".
|
||||
|
||||
This was primarily implemented due to work I did getting the System Tray.
|
||||
|
||||
* Renamed ``StatusBarWrapper.PartWidths()`` to ``PartRightEdges()`` as this
|
||||
is more correct for what it returns.
|
||||
|
||||
* Changed HwndWrapper.Text() and SetText() to WindowText() and
|
||||
SetWindowText() respectively to try and make it clearer that it is
|
||||
the text returned by GetWindowText and not the text that is visible
|
||||
on the control. This change also suggested that EditWrapper.SetText()
|
||||
be changed to SetEditText() (though this is not a hard requirement
|
||||
EditWrapper.SetText() still exists - but may be deprecated.
|
||||
|
||||
* Added ClickInput, DoubleClickInput, RightClickInput, PressMouseInput
|
||||
ReleaseMouseInput to HwndWrapper - these use SendInput rather then
|
||||
WM_LBUTTONDOWN, WM_RBUTTONUP, etc used by Click, DoubleClick etc.
|
||||
|
||||
I also added a MenuClick method that allows you to click on menu
|
||||
items. This means you can now 'physically' drop menus down.
|
||||
|
||||
* Some further working with tooltips that need to be cleaned up.
|
||||
* Quick release to get many changes out there - but this release has
|
||||
been less tested then I would like for a .3 release.
|
||||
|
||||
* Fixed a bug where coordinates passed to any of the Click operations had
|
||||
the X and Y coordinates swapped.
|
||||
* Allow access to non text controls using the closest Text control.
|
||||
This closest text control will normally be the static/label associated
|
||||
with the control. For example in Notepad, Format->Font dialog, the 1st
|
||||
combobox can be refered to as "FontComboBox" rather than "ComboBox1"
|
||||
|
||||
* Added new MenuItem and Menu classes that are to the most part hidden
|
||||
but you can get a menu item by doing ::
|
||||
|
||||
app.Notepad.MenuItem("View")
|
||||
app.Notepad.MenuItem("View->Status Bar")
|
||||
|
||||
MenuItems have various actions so for example you can use
|
||||
``MenuItem.IsChecked()`` to check if the menu item is checked.
|
||||
Among other methods there are ``Click()`` and ``Enabled()``.
|
||||
* Added a new control wrapper - ``PopupMenuWrapper`` for context menu's
|
||||
You can now work easily with context menu's
|
||||
e.g. ::
|
||||
|
||||
* Modified the 'best match' algorithm for finding controls.
|
||||
It now searches a couple of times, and tries to find the best
|
||||
fit for the text passed to it. The idea here is to make it more
|
||||
"Select what I want - not that other thing that looks a bit like
|
||||
what I want!". It is possible this change could mean you need to
|
||||
use new identifiers in scripts - but in general very little modification
|
||||
should be necessary.
|
||||
|
||||
There was also a change to the algorithm that looked for the closest
|
||||
text control. It missed some obvious controls in the previous
|
||||
implementation. It also had a bug for controls above the control
|
||||
rather than to the left.
|
||||
|
||||
* Added a new example scripts SaveFromInternetExplorer.py and
|
||||
SaveFromFirefox.py which show automating downloading of a page
|
||||
from either of these browsers.
|
||||
app.Notepad.Edit.RightClick()
|
||||
# need to use MenuClick rather then MenuSelect
|
||||
app.PopupMenu.MenuClick("Select All")
|
||||
app.Notepad.Edit.RightClick()
|
||||
app.PopupMenu.MenuClick("Copy")
|
||||
|
||||
* Added yet more unit tests, there are now a total of 134 tests.
|
||||
I could think of merging the ``RightClick()`` and ``MenuSelect()`` into one method
|
||||
``ContextMenuSelect()`` if that makes sense to most people.
|
||||
|
||||
* Added Support for Up-Down controls
|
||||
|
||||
* Not all top level windows now have a FriendlyClassName of "Dialog".
|
||||
I changed this because it made it hard to get windows of a particular
|
||||
class. For example the main Notepad window has a class name of "Notepad".
|
||||
|
||||
This was primarily implemented due to work I did getting the System Tray.
|
||||
|
||||
* Renamed ``StatusBarWrapper.PartWidths()`` to ``PartRightEdges()`` as this
|
||||
is more correct for what it returns.
|
||||
|
||||
* Changed HwndWrapper.Text() and SetText() to WindowText() and
|
||||
SetWindowText() respectively to try and make it clearer that it is
|
||||
the text returned by GetWindowText and not the text that is visible
|
||||
on the control. This change also suggested that EditWrapper.SetText()
|
||||
be changed to SetEditText() (though this is not a hard requirement
|
||||
EditWrapper.SetText() still exists - but may be deprecated.
|
||||
|
||||
* Added ClickInput, DoubleClickInput, RightClickInput, PressMouseInput
|
||||
ReleaseMouseInput to HwndWrapper - these use SendInput rather then
|
||||
WM_LBUTTONDOWN, WM_RBUTTONUP, etc used by Click, DoubleClick etc.
|
||||
|
||||
I also added a MenuClick method that allows you to click on menu
|
||||
items. This means you can now 'physically' drop menus down.
|
||||
|
||||
* Some further working with tooltips that need to be cleaned up.
|
||||
|
||||
* Fixed a bug where coordinates passed to any of the Click operations had
|
||||
the X and Y coordinates swapped.
|
||||
|
||||
* Added new MenuItem and Menu classes that are to the most part hidden
|
||||
but you can get a menu item by doing ::
|
||||
|
||||
app.Notepad.MenuItem("View")
|
||||
app.Notepad.MenuItem("View->Status Bar")
|
||||
|
||||
MenuItems have various actions so for example you can use
|
||||
``MenuItem.IsChecked()`` to check if the menu item is checked.
|
||||
Among other methods there are ``Click()`` and ``Enabled()``.
|
||||
|
||||
* Modified the 'best match' algorithm for finding controls.
|
||||
It now searches a couple of times, and tries to find the best
|
||||
fit for the text passed to it. The idea here is to make it more
|
||||
"Select what I want - not that other thing that looks a bit like
|
||||
what I want!". It is possible this change could mean you need to
|
||||
use new identifiers in scripts - but in general very little modification
|
||||
should be necessary.
|
||||
|
||||
There was also a change to the algorithm that looked for the closest
|
||||
text control. It missed some obvious controls in the previous
|
||||
implementation. It also had a bug for controls above the control
|
||||
rather than to the left.
|
||||
|
||||
* Added a new example scripts SaveFromInternetExplorer.py and
|
||||
SaveFromFirefox.py which show automating downloading of a page
|
||||
from either of these browsers.
|
||||
|
||||
* Added yet more unit tests, there are now a total of 134 tests.
|
||||
|
||||
|
||||
0.2.0 Significant refactoring
|
||||
------------------------------------------------
|
||||
06-Feb-2006
|
||||
|
||||
* Changed how windows are searched for (from application)
|
||||
This chage should not be a significant change for users
|
||||
|
||||
* Started adding unit tests (and the have already uncovered bugs
|
||||
that been fixed). They also point to areas of missing functionality
|
||||
that will be addded with future updates
|
||||
|
||||
* Changed from property access to Control attributes to function access
|
||||
If your code was accessing properties of controls then this might be a
|
||||
significant change! The main reasons for doing this were due to the
|
||||
inheritability of properties (or lack there-of!) and the additional
|
||||
scafolding that was required to define them all.
|
||||
|
||||
* Updated the ``DialogWrapper.MenuSelect()`` method to notify the parent
|
||||
that it needs to initialize the menu's before it retrieves the items
|
||||
|
||||
* Added functionality to associate 'non-text' controls with the 'text'
|
||||
control closest to them. This allows controls to be referenced by::
|
||||
|
||||
app.dlg.<Nearby_text><Window_class>
|
||||
|
||||
e.g. to reference the "Footer" edit control in the Page Setup dialog
|
||||
you could use::
|
||||
|
||||
app.PageSetup.FooterEdit
|
||||
|
||||
* Added a MoveWindow method to HwndWrapper
|
||||
|
||||
* Did some more cleanup (fixing pylint warnings) but still not finished
|
||||
* Changed how windows are searched for (from application)
|
||||
This chage should not be a significant change for users
|
||||
|
||||
* Added some better support for .NET controls (not to be considered final)
|
||||
* Started adding unit tests (and the have already uncovered bugs
|
||||
that been fixed). They also point to areas of missing functionality
|
||||
that will be addded with future updates
|
||||
|
||||
* Changed from property access to Control attributes to function access
|
||||
If your code was accessing properties of controls then this might be a
|
||||
significant change! The main reasons for doing this were due to the
|
||||
inheritability of properties (or lack there-of!) and the additional
|
||||
scafolding that was required to define them all.
|
||||
|
||||
* Updated the ``DialogWrapper.MenuSelect()`` method to notify the parent
|
||||
that it needs to initialize the menu's before it retrieves the items
|
||||
|
||||
* Added functionality to associate 'non-text' controls with the 'text'
|
||||
control closest to them. This allows controls to be referenced by::
|
||||
|
||||
app.dlg.<Nearby_text><Window_class>
|
||||
|
||||
e.g. to reference the "Footer" edit control in the Page Setup dialog
|
||||
you could use::
|
||||
|
||||
app.PageSetup.FooterEdit
|
||||
|
||||
* Added a MoveWindow method to HwndWrapper
|
||||
|
||||
* Did some more cleanup (fixing pylint warnings) but still not finished
|
||||
|
||||
* Added some better support for .NET controls (not to be considered final)
|
||||
|
||||
|
||||
|
||||
@ -332,52 +351,52 @@
|
||||
------------------------------------------------
|
||||
15-Jan-2006
|
||||
|
||||
* Wrote doc strings for all modules, classes and functions
|
||||
* Ran pychecker and pylint and fixed some errors/warning
|
||||
* changed ::
|
||||
|
||||
_connect, _start, _window, _control, _write
|
||||
|
||||
respectively to ::
|
||||
|
||||
connect_, start_, window_, connect_, write_
|
||||
|
||||
If you forget to change ``_window``, ``_connect`` and ``_start`` then you will probably get the following error. ::
|
||||
|
||||
TypeError: '_DynamicAttributes' object is not callable
|
||||
|
||||
* pywinauto is now a package name - you need to import it or its modules
|
||||
* Changes to the code to deal with pywinauto package name
|
||||
* Fixed searching for windows if a Parent is passed in
|
||||
* Added Index to retrieved MenuItem dictionary
|
||||
* Added a check to ensure that a windows Handle is a valid window
|
||||
* Refactored some of the methods in common_controls
|
||||
* Refactored how FriendlyClassName is discovered (and still not really happy!
|
||||
|
||||
* Wrote doc strings for all modules, classes and functions
|
||||
* Ran pychecker and pylint and fixed some errors/warning
|
||||
* changed ::
|
||||
|
||||
_connect, _start, _window, _control, _write
|
||||
|
||||
respectively to ::
|
||||
|
||||
connect_, start_, window_, connect_, write_
|
||||
|
||||
If you forget to change ``_window``, ``_connect`` and ``_start`` then you will probably get the following error. ::
|
||||
|
||||
TypeError: '_DynamicAttributes' object is not callable
|
||||
|
||||
* pywinauto is now a package name - you need to import it or its modules
|
||||
* Changes to the code to deal with pywinauto package name
|
||||
* Fixed searching for windows if a Parent is passed in
|
||||
* Added Index to retrieved MenuItem dictionary
|
||||
* Added a check to ensure that a windows Handle is a valid window
|
||||
* Refactored some of the methods in common_controls
|
||||
* Refactored how FriendlyClassName is discovered (and still not really happy!
|
||||
|
||||
|
||||
|
||||
0.1.2 Add Readme and rollup various changes
|
||||
------------------------------------------------
|
||||
15-Jan-2006
|
||||
|
||||
* Updated Readme (original readme was incorrect)
|
||||
* Added clipboard module
|
||||
* Fixed DrawOutline part of tests.__init__.print_bugs
|
||||
* Added a NotifyParent to HwndWrapper
|
||||
* Make sure that HwndWrapper.ref is initialized to None
|
||||
* Refactored some methods of ComboBox and ListBox
|
||||
* Updated Combo/ListBox selection methods
|
||||
* Removed hardcoded paths from test_application.py
|
||||
* Added section to save the document as UTF-8 in MinimalNotepadTest
|
||||
* Fixed EscapeSpecials and UnEscapeSpecials in XMLHelpers
|
||||
* Made sure that overly large bitmaps do not break XML writing
|
||||
* Updated Readme (original readme was incorrect)
|
||||
* Added clipboard module
|
||||
* Fixed DrawOutline part of tests.__init__.print_bugs
|
||||
* Added a NotifyParent to HwndWrapper
|
||||
* Make sure that HwndWrapper.ref is initialized to None
|
||||
* Refactored some methods of ComboBox and ListBox
|
||||
* Updated Combo/ListBox selection methods
|
||||
* Removed hardcoded paths from test_application.py
|
||||
* Added section to save the document as UTF-8 in MinimalNotepadTest
|
||||
* Fixed EscapeSpecials and UnEscapeSpecials in XMLHelpers
|
||||
* Made sure that overly large bitmaps do not break XML writing
|
||||
|
||||
|
||||
0.1.1 Minor bug fix release
|
||||
------------------------------------------------
|
||||
12-Jan-2006
|
||||
|
||||
* Fixed some minor bugs discovered after release
|
||||
* Fixed some minor bugs discovered after release
|
||||
|
||||
0.1.0 Initial Release
|
||||
------------------------------------------------
|
||||
|
@ -47,7 +47,7 @@ one of the following:
|
||||
:path: The path of the executable of the process (``GetModuleFileNameEx``
|
||||
is used to find the path of each process and compared against
|
||||
the value passed in) e.g.
|
||||
|
||||
|
||||
::
|
||||
|
||||
app = Application()
|
||||
@ -60,6 +60,16 @@ passed to the ``findwindows.find_windows()`` function. e.g. ::
|
||||
app.connect_(title_re = ".*Notepad", class_name = "Notepad")
|
||||
|
||||
|
||||
**Note**: I have since added static methods Application.start() and
|
||||
Application.connect() these can be used the same as above - except that
|
||||
you no longer need to instantiate an Application object first.
|
||||
|
||||
**Note2**: The application has to be ready before you can use connect*().
|
||||
There is no timeout or retries like there is when finding the application
|
||||
after start*(). So if you start the application outside of pywinauto you
|
||||
need to either sleep or program a wait loop to wait until the application
|
||||
has fully started.
|
||||
|
||||
|
||||
How to sepcify a dialog of the application
|
||||
------------------------------------------
|
||||
@ -102,6 +112,12 @@ module select the dialog you want. Once you have the handle you need
|
||||
then use ::
|
||||
|
||||
Application.window_(handle = win)
|
||||
|
||||
**Note**: If the title of the dialog is very long - then attribute access
|
||||
might be very long to type, in those cases it is usually easier to use::
|
||||
|
||||
app.window_(title_re = ".*Part of Title.*")
|
||||
|
||||
|
||||
|
||||
How to specify a control on a dialog
|
||||
@ -131,9 +147,6 @@ the contol. And append the friendly class. So the list becomes
|
||||
|
||||
Once a set of identifiers has been created for all controls in the dialog
|
||||
we disambiguate them.
|
||||
|
||||
|
||||
|
||||
|
||||
use the `WindowSpecification.print_control_identifiers()` method
|
||||
|
||||
@ -262,7 +275,6 @@ To see an example of this see ``examples\MiscExamples.py.GetInfo()``
|
||||
|
||||
How to deal with controls that do not respond as expected (e.g. OwnerDraw Controls)
|
||||
------------------------------------------------------------------------------------
|
||||
|
||||
Some controls (especially Ownerdrawn controls) do not respond to events as
|
||||
expected. For example if you look at any HLP file and go to the Index Tab (click
|
||||
'Search' button) you will see a listbox. Running Spy or Winspector on this
|
||||
@ -317,7 +329,6 @@ Edit control above the list, and you CAN get the text of the item from there e.g
|
||||
|
||||
How to Access the System Tray (aka SysTray, aka 'Notification Area')
|
||||
------------------------------------------------------------------------------------
|
||||
|
||||
Near the clock are icons representing running applications, this area is
|
||||
normally referred to as the "System Tray". There are actually many different
|
||||
windows/controls in this area. The control that contains the icons is actually
|
||||
|
@ -23,4 +23,4 @@ Python package for automating GUI manipulation on Windows
|
||||
|
||||
"""
|
||||
__revision__ = "$Revision$"
|
||||
__version__ = "0.3.3"
|
||||
__version__ = "0.3.4"
|
Loading…
Reference in New Issue
Block a user