Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

usage of pushbutton

by nisu (Initiate)
on Nov 21, 2012 at 16:51 UTC ( [id://1004955]=perlquestion: print w/replies, xml ) Need Help??

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

hi all... while installing any software through perl GUI scripting, what code should be written to select "OK" button??? I used command as PushButton("control ID").. Will it work???

Replies are listed 'Best First'.
Re: usage of pushbutton
by marto (Cardinal) on Nov 21, 2012 at 16:58 UTC

    Are you talking about automating the installation process of some applications? If so you don't give much to go on. You don't mention which OS, how you're doing this to get to the stage of a button press. Also one questionmark will do. See How do I post a question effectively?.

    For discussion sake we'll pretend you're using a Microsoft Windows platform. I suggest you take a look at the Win32::GuiTest and what it has to offer in terms of identifying elements of and intereacting with user interfaces.

    Update:

    "I used command as PushButton("control ID").. Will it work???"

    What happened when you tested it?

      Im using perl monks online help for the first time. If any thing is wrong please forgive. Im using Windows 2008 R2 OS. Even though i use PushButton("Control ID") it is not at all proceding further. Im able to select "setup.exe" and then start installation. But when it give OK or Cancel option, im not able to select that through script. Please let me know if you have any solution.
Re: usage of pushbutton
by marto (Cardinal) on Nov 21, 2012 at 17:13 UTC
      Im refering Win32::GuiTest itself. I have gone through calculator example and im using that . Can you please tell me how to use PushButton command to click OK or Cancel in any installation screen. If that works, i can proceed further without any problem.

        The buttons for the application are most likely different from that of calc.exe. A google search for the names of the tools you claimed to be using shows GUI tests automation - Tutorial (among other) which is a good starting point.

        Again you've not given any specific information. I know you are new to this site, and perhaps to Perl and programming in general, however basic problem solving skills are required regardless of the language. You haven't shown an example of what you've tried, or explained how it doesn't work. In order to make it easier for people to help you, please read and understand the links I have already provided.

        Can you please tell me how to use PushButton command to click OK or Cancel in any installation screen. If that works, i can proceed further without any problem.

        What happened when you tried, did it work?

        See Win32/OLE related tutorials/examples/resources , there is a good number of guitest related tutorials utilities

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-03-29 05:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found