[IronPython] IronPython 2.6[.1]: UI Automation: Wrong values for ControlType, AutomationElementID and more.

Stanger, Wolfram 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
our company.
Now they will do it and - who hat thougth that - I've got the job! And I
had to bring the job to success!
 
My Environment:
------------------------
I've succesfully presented a test automation solution only build from
Internet-Software. It includes:
 
Keyword-Driven Tables in HTML (done with Winword)
                                  !
                           Python 2.6
                                  !
                      Robot-Framework
                       !                      !
             ApplTestlib.py    SeleniumLibrary
                      !                         !
              pyWinAuto       WEB-AppToTest
                      !
         WIN32-AppToTest
 
Later we will embed the solution in a QAtrac process.
 
Now it's time to test automate GUIs build from Windows-Forms and WPF
too.
 
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
HTML-Report-File.
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
content yet).
 
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:
http://lists.ironpython.com/pipermail/users-ironpython.com/2009-November
/011583.html
 
and heself stated a own solution in
http://lists.ironpython.com/pipermail/users-ironpython.com/2009-November
/011630.html
 
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
ok.'
 
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.
 
Greetings
Wolfram
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100219/5be70e75/attachment.html>


More information about the Ironpython-users mailing list