Skip to content

Commit

Permalink
Merge branch 'pywinauto64master'
Browse files Browse the repository at this point in the history
Conflicts:
	LICENSE.txt
	MANIFEST.in
	MakeBackup.bat
	Readme.txt
	doc_src/HISTORY.TXT
	doc_src/HowTo.txt
	doc_src/TODO.txt
	doc_src/build_autodoc_files.py
	doc_src/code/code.txt
	doc_src/code/pywinauto.SendKeysCtypes.txt
	doc_src/code/pywinauto.XMLHelpers.txt
	doc_src/code/pywinauto.application.txt
	doc_src/code/pywinauto.clipboard.txt
	doc_src/code/pywinauto.controlproperties.txt
	doc_src/code/pywinauto.controls.HwndWrapper.txt
	doc_src/code/pywinauto.controls.common_controls.txt
	doc_src/code/pywinauto.controls.menuwrapper.txt
	doc_src/code/pywinauto.controls.win32_controls.txt
	doc_src/code/pywinauto.findbestmatch.txt
	doc_src/code/pywinauto.findwindows.txt
	doc_src/code/pywinauto.fuzzydict.txt
	doc_src/code/pywinauto.handleprops.txt
	doc_src/code/pywinauto.taskbar.txt
	doc_src/code/pywinauto.tests.allcontrols.txt
	doc_src/code/pywinauto.tests.asianhotkey.txt
	doc_src/code/pywinauto.tests.comboboxdroppedheight.txt
	doc_src/code/pywinauto.tests.comparetoreffont.txt
	doc_src/code/pywinauto.tests.leadtrailspaces.txt
	doc_src/code/pywinauto.tests.miscvalues.txt
	doc_src/code/pywinauto.tests.missalignment.txt
	doc_src/code/pywinauto.tests.missingextrastring.txt
	doc_src/code/pywinauto.tests.overlapping.txt
	doc_src/code/pywinauto.tests.repeatedhotkey.txt
	doc_src/code/pywinauto.tests.translation.txt
	doc_src/code/pywinauto.tests.truncation.txt
	doc_src/code/pywinauto.timings.txt
	doc_src/conf.py
	doc_src/contents.txt
	doc_src/controls_overview.txt
	doc_src/credits.txt
	doc_src/dev_notes.txt
	doc_src/getting_started.txt
	doc_src/index.txt
	examples/ForteAgentSample.py
	examples/MiscExamples.py
	examples/SaveFromFirefox.py
	examples/SaveFromInternetExplorer.py
	examples/examples_watsup/watsup_ex1.py
	examples/get_winrar_info.py
	examples/mspaint.py
	examples/notepad_item.py
	examples/notepad_slow.py
	examples/test_sakura.py
	examples/test_sakura2.py
	examples/windowmediaplayer.py
	makedocs.bat
	pywinauto/SendKeysCtypes.py
	pywinauto/XMLHelpers.py
	pywinauto/__init__.py
	pywinauto/application.py
	pywinauto/clipboard.py
	pywinauto/controlproperties.py
	pywinauto/controls/HwndWrapper.py
	pywinauto/controls/__init__.py
	pywinauto/controls/common_controls.py
	pywinauto/controls/menuwrapper.py
	pywinauto/controls/win32_controls.py
	pywinauto/docs/_static/pygments.css
	pywinauto/findbestmatch.py
	pywinauto/findwindows.py
	pywinauto/fuzzydict.py
	pywinauto/handleprops.py
	pywinauto/taskbar.py
	pywinauto/tests/__init__.py
	pywinauto/tests/_menux.py
	pywinauto/tests/allcontrols.py
	pywinauto/tests/asianhotkey.py
	pywinauto/tests/comboboxdroppedheight.py
	pywinauto/tests/comparetoreffont.py
	pywinauto/tests/leadtrailspaces.py
	pywinauto/tests/miscvalues.py
	pywinauto/tests/missalignment.py
	pywinauto/tests/missingextrastring.py
	pywinauto/tests/overlapping.py
	pywinauto/tests/repeatedhotkey.py
	pywinauto/tests/translation.py
	pywinauto/tests/truncation.py
	pywinauto/timings.py
	pywinauto/unittests/test.txt
	pywinauto/unittests/test_HwndWrapper.py
	pywinauto/unittests/test_SendKeys.py
	pywinauto/unittests/test_XMLHelpers.py
	pywinauto/unittests/test_application.py
	pywinauto/unittests/test_clipboard.py
	pywinauto/unittests/test_common_controls.py
	pywinauto/unittests/test_findbestmatch.py
	pywinauto/unittests/test_findwindows.py
	pywinauto/unittests/test_handleprops.py
	pywinauto/unittests/test_menuwrapper.py
	pywinauto/unittests/test_win32controls.py
	pywinauto/unittests/test_win32functions.py
	pywinauto/unittests/testall.py
	pywinauto/unittests/testtext.txt
	pywinauto/win32defines.py
	pywinauto/win32functions.py
	pywinauto/win32structures.py
	sandbox/ActionDialog.py
	sandbox/DemiTest.py
	sandbox/WindowInformation.py
	sandbox/_Controls_Standard_Before_XML_Change.DELETE_py
	sandbox/_DrawDialog_Wx.py
	sandbox/_DrawDialog_win32_1.py
	sandbox/__DeadCodeRepository__.py
	sandbox/_find_control_distance.py
	sandbox/controlactions.py
	sandbox/playing_RepeatedHotkeyFixing.py
	sandbox/recorder.py
	setup.cfg
	setup.py
  • Loading branch information
vasily-v-ryabov committed May 25, 2015
2 parents 3f08937 + f3c6a05 commit a912f58
Show file tree
Hide file tree
Showing 158 changed files with 8,684 additions and 1,865 deletions.
54 changes: 54 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.cache
nosetests.xml
coverage.xml

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/
505 changes: 505 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

169 changes: 169 additions & 0 deletions LICENSE.txt

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<<<<<<< HEAD
include Readme.txt
include dev_notes.txt
include HISTORY.TXT
Expand Down Expand Up @@ -28,3 +29,35 @@ exclude docs\pywinauto\.svn\*
exclude docs\pywinauto\controls\.svn\*
exclude docs\pywinauto\tests\.svn\*
exclude docs\.doctrees\*
=======
include Readme.txt
include dev_notes.txt
include HISTORY.TXT
include LICENSE.txt
include TODO.txt
include setup.cfg
include setup.py


include pywinauto
include pywinauto\controls\*.py
include pywinauto\tests\*.py
include pywinauto\unittests\*.py
exclude pywinauto\.svn\*

# include the examples - but not Watsup or .svn directories
include pywinauto\examples\*.pkl
include examples\*.py
include examples\*.txt
exclude examples\.svn\README.txt
exclude examples\examples_watsup\*.*

# include all the website folder and make sure that
# the sub version files are not included
include docs\*.*
exclude docs\.svn\*
exclude docs\pywinauto\.svn\*
exclude docs\pywinauto\controls\.svn\*
exclude docs\pywinauto\tests\.svn\*
exclude docs\.doctrees\*
>>>>>>> pywinauto64master
39 changes: 39 additions & 0 deletions MakeBackup.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<<<<<<< HEAD
@echo off
if (%1)==() goto VersionNotGiven

Expand Down Expand Up @@ -34,3 +35,41 @@ echo.
goto finished

:finished
=======
@echo off
if (%1)==() goto VersionNotGiven

md previousReleases\%1

if not exist previousReleases\%1 goto FolderNotCreated

md previousReleases\%1\DlgCheck2
if not exist previousReleases\%1 goto FolderTwoNotCreated

copy *.py previousReleases\%1
copy dlgCheck2 previousReleases\%1\DlgCheck2


goto finished

:FolderNotCreated
echo.
echo Could not create the folder "previousReleases\%1"
echo.
goto finished

:FolderTwoNotCreated
echo.
echo Could not create the folder "previousReleases\%1\DlgCheck2"
echo.
goto finished


VersionNotGiven
echo.
echo please specify the version of the backup
echo.
goto finished

:finished
>>>>>>> pywinauto64master
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
pywinauto-64
============

pywinauto (c) Mark Mc Mahon and Co., 2006 - 2015

pywinauto is coming back! Set of python modules to automate the Microsoft Windows GUI
allows you to send mouse and keyboard actions to windows dialogs and controls,
but it also supports more complex actions.

Newer version adds 64-bit support and works on Python 3.x.

### Roadmap
* pywinauto 0.5.0 is planned until end of June, 2015.
- [x] 64-bit Python is supported
- [x] Python 2.x/3.x compatibility
- [!] Added pyWin32 dependency
- [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] `RemoteMemoryBlock` can now detect memory corruption by checking guard signature
- [ ] 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] `create_new_console` flag in `Application.start_` method

### Supported controls
* Native Windows controls (full support through Win32 API)
* .NET Windows Forms (partial support through Win32 API, some basic controls only)


### Dependencies
* pyWin32 package ([build 219](http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/) is recommended). This is NOT required for ActivePython (except 3.4 64-bit).

### Setup

* Install pyWin32 extensions above (no need for Active Python)
* Download [master branch as ZIP](https://github.com/vasily-v-ryabov/pywinauto-64/archive/master.zip)
* Just unpack and run **python.exe setup.py install**

### Testing status

* [Unit tests pass rate for master branch](https://github.com/vasily-v-ryabov/pywinauto-64/wiki/Unit-testing-status)

#### Packages required for running unit tests
* [Pillow](https://pypi.python.org/pypi/Pillow/2.7.0) or PIL
* [coverage](https://pypi.python.org/pypi/coverage)
89 changes: 89 additions & 0 deletions Readme.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<<<<<<< HEAD
pywinauto
(c) Mark Mc Mahon 2006
Released under the LGPL licence
Expand Down Expand Up @@ -84,4 +85,92 @@ Some similar tools for comparison
- WinRunner
- SilkTest
- Visual Test
=======
pywinauto
(c) Mark Mc Mahon 2006
Released under the LGPL licence


What is it
----------
pywinauto is a set of python modules to automate the Microsoft Windows GUI.
At it's simplest it allows you to send mouse and keyboard actions to windows
dialogs and controls.


Installation
------------

Unzip the pywinauto zip file to a folder.
Install the following Python packages
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/

To check you have it installed correctly
run Python
>>> import application
>>> app = application.Application().start_("notepad")
>>> 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.

Note: These examples currently only work on English.


How does it work
----------------
A lot is done through attribute access (__getattr__) for each class. For example
when you get the attribute of an Application or Dialog object it looks for a
dialog or control (respectively).

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

myapp.PageSetup.OK # looks first for a dialog with a title like "PageSetup"
# then it looks for a control on that dialog with a title
# like "OK"

This attribute resolution is delayed (currently a hard coded amount of time) until
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.SaveAs.ComboBox5.Select("UTF-8")
app.SaveAs.edit1.SetText("Example-utf8.txt")
app.SaveAs.Save.Click()

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 avoid the user having to use time.sleep or a "WaitForDialog" function.


Some similar tools for comparison
---------------------------------
* Python tools
- Watsup
- winGuiAuto

* Other scripting language tools
- Perl Win32::GuiTest
- Ruby GuiTest
- others?

* Other free tools
- AutoIt
- See collection at:

* Commercial tools
- WinRunner
- SilkTest
- Visual Test
>>>>>>> pywinauto64master
- Many Others
Binary file added apps/ControlSpy_20/ControlSpyV6.exe
Binary file not shown.
Binary file added apps/MFC_samples/CmnCtrl1.exe
Binary file not shown.
Binary file added apps/MFC_samples/CmnCtrl2.exe
Binary file not shown.
Binary file added apps/MFC_samples/CmnCtrl3.exe
Binary file not shown.
Binary file added apps/MFC_samples/RowList.exe
Binary file not shown.
Binary file added apps/MFC_samples/x64/CmnCtrl1.exe
Binary file not shown.
Binary file added apps/MFC_samples/x64/CmnCtrl2.exe
Binary file not shown.
Binary file added apps/MFC_samples/x64/CmnCtrl3.exe
Binary file not shown.
Binary file added apps/MFC_samples/x64/RowList.exe
Binary file not shown.
Binary file added apps/MFC_tutorial/MFC_Tutorial9.exe
Binary file not shown.
Binary file added apps/MFC_tutorial/x64/MFC_Tutorial9.exe
Binary file not shown.
Binary file added apps/controlspy0998/Animation.exe
Binary file not shown.
Binary file added apps/controlspy0998/ComCtl32Ver.exe
Binary file not shown.
Binary file added apps/controlspy0998/ComboBoxEx.exe
Binary file not shown.
Binary file added apps/controlspy0998/Date and Time Picker.exe
Binary file not shown.
Binary file added apps/controlspy0998/Drag List Box.exe
Binary file not shown.
Binary file added apps/controlspy0998/Flat Scroll Bar.exe
Binary file not shown.
Binary file added apps/controlspy0998/Header.exe
Binary file not shown.
Binary file added apps/controlspy0998/Hot Key.exe
Binary file not shown.
Binary file added apps/controlspy0998/IP Address.exe
Binary file not shown.
Binary file added apps/controlspy0998/Image List.exe
Binary file not shown.
Binary file added apps/controlspy0998/List View.exe
Binary file not shown.
Binary file added apps/controlspy0998/Month Calendar.exe
Binary file not shown.
Binary file added apps/controlspy0998/Pager.exe
Binary file not shown.
Binary file added apps/controlspy0998/Progress Bar.exe
Binary file not shown.
Binary file added apps/controlspy0998/Property Sheet.exe
Binary file not shown.
Binary file added apps/controlspy0998/Rebar.exe
Binary file not shown.
Binary file added apps/controlspy0998/Status Bar.exe
Binary file not shown.
Binary file added apps/controlspy0998/Tab.exe
Binary file not shown.
Binary file added apps/controlspy0998/Toolbar.exe
Binary file not shown.
Binary file added apps/controlspy0998/Tooltip.exe
Binary file not shown.
Binary file added apps/controlspy0998/Trackbar.exe
Binary file not shown.
Binary file added apps/controlspy0998/Tree View.exe
Binary file not shown.
Binary file added apps/controlspy0998/Up-Down.exe
Binary file not shown.
Binary file added apps/controlspy0998/x64/Animation.exe
Binary file not shown.
Binary file added apps/controlspy0998/x64/ComCtl32Ver.exe
Binary file not shown.
Binary file added apps/controlspy0998/x64/ComboBoxEx.exe
Binary file not shown.
Binary file added apps/controlspy0998/x64/Date and Time Picker.exe
Binary file not shown.
Binary file added apps/controlspy0998/x64/Drag List Box.exe
Binary file not shown.
Binary file added apps/controlspy0998/x64/Flat Scroll Bar.exe
Binary file not shown.
Binary file added apps/controlspy0998/x64/Header.exe
Binary file not shown.
Binary file added apps/controlspy0998/x64/Hot Key.exe
Binary file not shown.
Binary file added apps/controlspy0998/x64/IP Address.exe
Binary file not shown.
Binary file added apps/controlspy0998/x64/Image List.exe
Binary file not shown.
Binary file added apps/controlspy0998/x64/List View.exe
Binary file not shown.
Binary file added apps/controlspy0998/x64/Month Calendar.exe
Binary file not shown.
Binary file added apps/controlspy0998/x64/Pager.exe
Binary file not shown.
Binary file added apps/controlspy0998/x64/Progress Bar.exe
Binary file not shown.
Binary file added apps/controlspy0998/x64/Property Sheet.exe
Binary file not shown.
Binary file added apps/controlspy0998/x64/Rebar.exe
Binary file not shown.
Binary file added apps/controlspy0998/x64/Status Bar.exe
Binary file not shown.
Binary file added apps/controlspy0998/x64/Tab.exe
Binary file not shown.
Binary file added apps/controlspy0998/x64/Toolbar.exe
Binary file not shown.
Binary file added apps/controlspy0998/x64/Tooltip.exe
Binary file not shown.
Binary file added apps/controlspy0998/x64/Trackbar.exe
Binary file not shown.
Binary file added apps/controlspy0998/x64/Tree View.exe
Binary file not shown.
Binary file added apps/controlspy0998/x64/Up-Down.exe
Binary file not shown.
1 change: 1 addition & 0 deletions apps/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This folder contains test applications (mostly binaries) which are used for unit testing.
Loading

0 comments on commit a912f58

Please sign in to comment.