I am new in pywinauto and have just started learning. I have installed pywinauto with pip in my local 32 bit Windows 7 OS.
So, I have this sample code to open an URL in chrome browser.
from pywinauto import application
Traceback (most recent call last):
File "pywinauto_nil.py", line 6, in <module>
File "C:\Python27\lib\site-packages\pywinauto\application.py", line 252, in
ctrls = _resolve_control(self.criteria)
File "C:\Python27\lib\site-packages\pywinauto\application.py", line 758, in _resolve_control
The full answer would be long and complicated. Let's start from your small problem.
Chrome spawns few more processes that is not connected with
app object. Solution: use
Application().connect(title='New tab') (or
title_re or whatever possible for find_windows).
The bigger problem is that Chrome controls cannot be detected and handled by pywinauto 0.5.4 because MS UI Automation support is on the way (70% done in UIA branch on GitHub, see the short intro). By the way, pywinauto/UIA can handle top-level windows in a process-agnostic way:
One more detail about Chrome. It doesn't enable UIA support by default. To enable UIA accessibility it must run so:
chrome.exe --force-renderer-accessibility. Though UIA mode is enabled by default in Firefox and Opera.
And finally pywinauto is not specifically designed for Web automation. Right now it might be combined with Selenium.