Jump to content

Not able to indentify control.


Recommended Posts

Hi folks,

I am thinking to automate a application for testing. It has a login box with two fields User name and password and two buttons OK and Cancel.

The problem is, I am not able to identify the controls. I am not able to click on any of the button or not able to set the text in any of the edit box.

I tried following something like below..

for $i=0 to 10 
ControlSetText("Login","","Edit"&$i,"NEw Text")
Next

But as this doesn't work, I tried AutoIt Info. When I Put the cursor on the Editbox or button it shows only Handle in the Control tab. Other things like id, text, Class are blank. see the screenshot for more details.

So the problem is, now how i identify the controls ???

post-51475-12506600622988_thumb.gif

Link to comment
Share on other sites

  • Moderators

If the size of the Login GUI is the same always, you could use the x and y coordinate of the control, with _WinAPI_WindowFromPoint to get the handle of the control.

In the ClassNameNN or ControlID parameter, you can use the HWND as well.

* This is providing that the box that you refer to as an edit box has a unique hwnd.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

If the size of the Login GUI is the same always, you could use the x and y coordinate of the control, with _WinAPI_WindowFromPoint to get the handle of the control.

In the ClassNameNN or ControlID parameter, you can use the HWND as well.

* This is providing that the box that you refer to as an edit box has a unique hwnd.

How reliable is to use Coordinates ???

By the way i talk to the developers and they told me they have used standard Login control, where edit boxes and all other things are property of the login window rather then child control.

So is there any way I can set the property of the window ??

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...