Skip to content

Commit

Permalink
Update docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
vasily-v-ryabov committed Jun 29, 2015
1 parent b834ba7 commit 731ee80
Show file tree
Hide file tree
Showing 79 changed files with 15,187 additions and 2,143 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ but it also supports more complex actions.

### Roadmap
* pywinauto 0.5.0 is planned until end of June, 2015.
- [x] 64-bit Python is supported
- [x] 64-bit Python and 64-bit apps is supported (but 32-bit Python is recommended for 32-bit apps)
- [x] Python 2.x/3.x compatibility
- [!] Added pyWin32 dependency
- [!] Added pyWin32 dependency (silent install by pip for 2.7 and 3.1+)
- [x] Improvements for Toolbar, TreeView, UpDown and DateTimePicker wrappers
- [x] Improved `best_match` algorithm allows names like `ToolbarFile`
- [x] Clicks can be performed with pressed Ctrl or Shift
- [x] Drag-n-drop and scrolling methods (DragMouse, DragMouseInput, MouseWheelInput)
- [x] Improved menu support: handling OWNERDRAW menu items; access by command_id (like `$23453`)
- [x] Resolved issues with py2exe and cx_freeze
- [x] `RemoteMemoryBlock` can now detect memory corruption by checking guard signature
- [ ] Upgraded `taskbar` module
- [x] Upgraded `taskbar` module
- [x] `sysinfo` module for checking 32-bit or 64-bit OS and Python
- [x] `set_foreground` flag in `TypeKeys` method for typing into in-place controls
- [x] flags `create_new_console` and `wait_for_idle` in `Application.start` method
Expand Down
2 changes: 1 addition & 1 deletion doc_src/HowTo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -436,5 +436,5 @@ e.g.
taskbar.ClickSystemTrayIcon("Microsoft Outlook")

# Select an item in the popup menu
outlook.PopupMenu.MenuClick("Cancel Server Request")
outlook.PopupMenu.Menu().GetMenuPath("Cancel Server Request")[0].Click()

34 changes: 19 additions & 15 deletions doc_src/index.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
====================
What is pywinauto
====================
© Mark Mc Mahon (maintainance by Intel Corporation since 2015)
(project is maintained by Intel Corporation since 2015)

© Mark Mc Mahon

Released under the LGPL v2.1 or later

Expand All @@ -23,12 +25,14 @@ Installation

- *Optional* Pillow (fork of PIL) https://pypi.python.org/pypi/Pillow/2.7.0

- Download pywinauto from https://github.com/pywinauto/pywinauto/archive/master.zip
- Unzip the pywinauto zip file to a folder.
- Download latest pywinauto from https://github.com/pywinauto/pywinauto/releases
- Unzip the pywinauto zip file to a folder
- Run ``python.exe setup.py install``

Installation in silent mode
------------
(Python 2.7, 3.1, 3.2, 3.3, 3.4, 3.5)

- Just run ``pip install pywinauto``


Expand All @@ -37,15 +41,7 @@ Run Python ::

>>> from pywinauto.application import Application
>>> app = Application.start("notepad.exe")
>>> app.notepad.TypeKeys("%FX")


Where to start
--------------
Look at the examples provided in test_application.py
There are examples in there to work with Notepad and MSPaint.

Code examples can also be found here: https://gist.github.com/vasily-v-ryabov
>>> app.UntitledNotepad.TypeKeys("%FX")


How does it work
Expand All @@ -67,7 +63,7 @@ This attribute resolution is delayed (currently a hard coded amount of time) unt
it succeeds. So for example if you Select a menu option and then look for the
resulting dialog e.g. ::

app.Notepad.MenuSelect("File->SaveAs")
app.UntitledNotepad.MenuSelect("File->SaveAs")
app.SaveAs.ComboBox5.Select("UTF-8")
app.SaveAs.edit1.SetText("Example-utf8.txt")
app.SaveAs.Save.Click()
Expand All @@ -76,9 +72,17 @@ At the 2nd line the SaveAs dialog might not be open by the time this line is
executed. So what happens is that we wait until we have a control to resolve
before resolving the dialog. At that point if we can't find a SaveAs dialog with
a ComboBox5 control then we wait a very short period of time and try again,
this is repeated up to a maximum time (currently 1 second!)
this is repeated up to a maximum time (currently 5 seconds!)

This avoid the user having to use time.sleep or a "Wait" function.

If your application performs long time operation, new dialog can appear or
disappear later. You can wait for its new state like so ::

This avoid the user having to use time.sleep or a "WaitForDialog" function.
app.Open.Open.Click() # opening large file
app.Open.WaitNot('visible') # make sure "Open" dialog became invisible
# wait for up to 30 seconds until data.txt is loaded
app.Window(title='data.txt - Notepad').Wait('ready', timeout=30)


Some similar tools for comparison
Expand Down
4 changes: 2 additions & 2 deletions pywinauto/docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 97a1932bfd54002b353d4958ce730c51
tags: fbb0d17656682115ca4d033fb2f83ba1
config: 9b299e0ecf1908b9a5b6f6d8f58b52f1
tags: 645f666f9bcd5a90fca523b33c5a78b7
Loading

0 comments on commit 731ee80

Please sign in to comment.