AustinJH has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,

I have been employed for some time testing software. I have been engaged the last few years in advocating using Perl to test our GUIs and other things, and have been very successful in spreading the Perl gospel. However, with our developers moving to c#/.Net, I have stumbled upon the juggernaut that Win32::GuiTest and others seem to not be able to slay.

I have done hours of searching.

Can I test .NET GUIs with Perl? (No, I don't want to do x,y clicks and screen images.) Any Win32::DotnetTest modules or the like available?

Please help! I may have to abandon my beloved Perl, and fork over good company money for some Microsquash proprietary software testing suite!

Replies are listed 'Best First'.
Re: Perl to test .NET GUIs?
by BrowserUk (Patriarch) on Apr 20, 2010 at 18:26 UTC
    (No, I don't want to do x,y clicks and screen images.)

    What do you want to do?

      I want to get and set contents of text boxes, get and set value of pulldowns, press buttons (like PushChildButton from Win32::GuiTest), etc. Basically anything that Win32::GuiTest can do to test a GUI, I want to do to a .NET-created GUI.

        And you have some indictation that .NET built windows are somehow incompatible with Win32::GUITest? (<< Corrected!)


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.
        Oops. Looks like I have two different login names. AustinJH == AutomateWithPerl == me.
Re: Perl to test .NET GUIs?
by marto (Cardinal) on Apr 23, 2010 at 18:10 UTC

    Have either of you tried using Win32::GuiTest to automate a .Net application? Surely that would take you all of five minutes to actually try? Have you experienced any problems?

      Win32::GuiTest relies on "windows handles" to access and control windows components.

      I get a handle to a text box, checkbox, button, pulldown, etc through various methods, then I can check or set the value, press the button, check the checkbox, etc.

      For .Net GUIs, I can only get handles to text boxes, nothing else. It simply does not see them.

      I would love to have an alternative Perl Module or method to find the handles.

      Any ideas?