I have been playing around UI Automation and IronPython for several days now. My impression is that they don't play each other well. Or maybe I missed something.
I am trying to dig deeper to understand why..... Probably this issue is not fixed yet? http://blogs.msdn.com/b/shrib/archive/2008/03/24/ironpython-cannot-call-automationelement-fromhandle.aspx On Wed, Jun 16, 2010 at 3:32 AM, Stanger, Wolfram < wolfram.stan...@kratzer-automation.com> wrote: > 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 > > _______________________________________________ > Users mailing list > Users@lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > >
_______________________________________________ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com