Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re^4: Win32::GuiTest control id

by abt (Novice)
on Jan 28, 2013 at 07:55 UTC ( #1015638=note: print w/replies, xml ) Need Help??

in reply to Re^3: Win32::GuiTest control id
in thread Win32::GuiTest control id

I can not fully control the program using a keyboard and more over, the program is part of a family of programs that are subject to change. The basic structure is there, but buttons and menu is subject to change. Problem is that the control-id's are provided, but doesnt seem to work.

Replies are listed 'Best First'.
Re^5: Win32::GuiTest control id
by marto (Archbishop) on Jan 28, 2013 at 10:12 UTC

    Stop guessing what these things are, don't assume the list you have been given by someone is correct, use the tools provided with Win32::GuiTest to discover what the control IDs actually are. If they're subject to change, you'll need to keep your automation code up to date with any changes to this.

      That is exactly what I am trying to do. But even Button ID's that are returned do not seem to be clickable. Even getting third party class refs. Problem seems to be related to embeded objects. Those seem to be untouchable. Will browse the monks archive for related issues and solutions. Tnx for all the help.

        Perhaps the buttons are in a disabled state for some reason for example, imagine a "Continue" button which is not click-able until a check box marked "I have read, understand and agree to the license agreement" is checked.

        It's unlikely that anyone here can help (outside providing truisms) unless you provide more data. You've provided no code or output and provide no details of the application you're trying to automate. I suggest this is something you spend time debugging in conjunction with a coworker familiar with the application and automation, in such circumstances asking others to speculate what the problems may be isn't a productive use of anyone's time IMHO.

        Update: please mark updates to your posts, read and understand How do I post a question effectively?.

        Let's break this down into steps. First, you need to get the window IDs of the buttons that you want to click on. You've got two routes. Find them yourself using utilities like I had suggested or using Win32::GuiTest to write your own code to dig through the structure of the program. Or you can get the information from the program's source code (or from someone maintaining that source code). I really don't see how you can get around that.

        Next, there's the clicking of the buttons. Not trying to be mean here, but have you taken the time to read through Win32::GuiTest's documentation? You keep mentioning only PushButton and MouseClick functions. If you take another look at that documentation, you'll notice that one of the first functions it describes is one called SendMouse.

        Again, I'll point you to take a look at the code I posted in Re: Problems with WIN32::GUITEST. Look at the section for the 'mouse' emulation. That section is using SendMouse to click on the buttons. If you run that code, you should see the mouse cursor moving to the buttons. Try using something like that with your code.

        If you still can't get the button clicks going, try writing some short code to push buttons on the calc.exe from Windows and you can post that code to get more help on grasping the basics concepts.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1015638]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2018-10-20 00:06 GMT
Find Nodes?
    Voting Booth?
    When I need money for a bigger acquisition, I usually ...

    Results (111 votes). Check out past polls.

    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!