Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Perl on Windows: automate WPF applications, similar to Win32::GUI ?

by localJoe (Initiate)
on Oct 13, 2015 at 21:32 UTC ( [id://1144761]=perlquestion: print w/replies, xml ) Need Help??

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

Dear PerlMonks,

Greetings.

I am working on Windows. Is there a module similar to Win32::GUI but will work with WPF (Windows Presentation Foundation) applications?

Win32::GUI works great for older style Win32 applications but ... it does not work well with WPF-type applications, as it does not see the child controls within an WPF application.

If possible, I wish to use Perl to automate the UI in a WPF application.

Thanks,

localJoe

  • Comment on Perl on Windows: automate WPF applications, similar to Win32::GUI ?

Replies are listed 'Best First'.
Re: Perl on Windows: automate WPF applications, similar to Win32::GUI ?
by dasgar (Priest) on Oct 13, 2015 at 21:45 UTC

    I believe that either you're looking at the wrong module or you've listed the wrong module name in your post. The Win32::GUI module is used to create a GUI interface. The Win32::GuiTest module is used to automate GUI based applications.

    I haven't tried to automate a GUI based application in a while, but is there a reason why you think that Win32::GuiTest can't/won't automate a GUI based WPF application?

      Hi dasgar,

      Since all windows is based on window ids/handles ... you can use Win32::GUI to automate the widgets provided by the module, they use the same APIs (user32.dll / gdi32.dll), its must easier to use Win32::GUI to deal with a list control than it is to use straight guitest calls

      WPF is a totally new api/library, and neither guitest nor win32::gui will work well with those, you have to use WPF IUAutomation... good luck with that

      @dasgar: Yes, you are right, I was wrong. I had the wrong module in mind, it is Win32:GuiTest that I meant. Win32::GuiTest detects the application but does not detect the child controls in a WPF application.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1144761]
Approved by sundialsvc4
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-04-24 23:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found