[IronPython] IronPython 2.6[.1]: UI Automation: Wrong values for ControlType, AutomationElementID and more.
Wolfram.Stanger at kratzer-automation.com
Fri Feb 19 18:16:03 CET 2010
Hello to all,
over many years I have forced to implement a test automation scenerie in
Now they will do it and - who hat thougth that - I've got the job! And I
had to bring the job to success!
I've succesfully presented a test automation solution only build from
Internet-Software. It includes:
Keyword-Driven Tables in HTML (done with Winword)
Later we will embed the solution in a QAtrac process.
Now it's time to test automate GUIs build from Windows-Forms and WPF
First I switched Python 2.6 to IronPython 2.6[and 2.6.1 RC1] and got
only one, but 'very magic', bug in Robot-Framework when creating the
Second I'm switched the pyWinAuto-Layer to Miscrosoft UI Automation
(.NET >= 3.0) to support all GUI-Frameworks (WIN32, WINFORMS and WPF)
I. In IronPython all UI Automation values ControlTypePropertys (w/o the
window itself) where Type 'panel'. Other values are also not the same
as you can see
with UISpy or UIA Verify (Tool from Codeplex 'white'-Project). The
AutomationIDs has the values from NativeWindowHandles (unique - but
never the same from run to run!).
Only the NamePropertys are OK but often empty (when control has no text
II. All Controls in the window title (titlebar, menubar, menuitems, and
min-, max- and close-Button) where completely hidden in Automation-Tree
(I've tested with Raw-, Control- and ContentViews)! These eight controls
are from IronPython-UI Automation not reachable. This may be a
consequence from point I. above.
In this situation it's unpossible for me to identify Controls in the
application to automate!
I have found, I run in exactly the same problems witch where reported
from Jozef in November 2009:
and heself stated a own solution in
The solution reads:
'Thanks for your response.
Solution to my problem is to first instantiate AutomationElement from
dll, not from IronPython.
Then all subsequent AutomationElement retrieved from IronPython looks
About 30 years I have programmed in ANSI-C (Same SW on Windows,VMS,
Linux, etc.) but now being a newbie to C#, .NET and Python.
Therefore I should have an (syntax-)example for the expression:
'to first instantiate AutomationElement from dll'
Witch DLL (Own written, .NET-DLL. ??)
How to instantiate in C#?
How to transport the AutomationElement to IronPython?
The best will be if jozef.a... will give me some example lines of code
from his solution in nov 2009 in C# and/or Python. Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironpython-users