Gaurang Posted August 19, 2009 Share Posted August 19, 2009 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 ??? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 19, 2009 Moderators Share Posted August 19, 2009 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 More sharing options...
Gaurang Posted August 20, 2009 Author Share Posted August 20, 2009 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 More sharing options...
Rishav Posted August 20, 2009 Share Posted August 20, 2009 whats the GUI made in? if it is .net just ask to set the name, classnamenn properties for the control. They need to expose the control properties. Most likely they haven't exposed the control. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now