blehbloo Posted August 8, 2014 Share Posted August 8, 2014 (edited) I have an application where I'm successfully able to ControlClick on a button. This is assuming that I'm logged in to the application and am working. This is the code Local $hWnd = WinWait("[CLASS:WindowsForms10.Window.8.app.0.e4c6c4]", "", 10) Sleep(2000) ControlClick($hWnd, "", "Internet Explorer_Server1", "left", 1, 716, 94) ;this successfully clicks the button I need I run into the issue when the Application is locked and I want my script to unlock the application and click a button. My script enters the password and unlocks the application but the ControlClick no longer registers on the button. This is the code: Local $hWnd = WinWait("[CLASS:WindowsForms10.Window.8.app.0.e4c6c4]", "", 10) Sleep(2000) ControlClick($hWnd, "", "WindowsForms10.EDIT.app.0.e4c6c42", "left", 1, 53, 10) ;this clicks on the password field Sleep(1200) ControlSend($hWnd, "", "WindowsForms10.EDIT.app.0.e4c6c42", "password") ;this successfully sends the password text Sleep(3000) ControlClick($hWnd, "", "Internet Explorer_Server1", "left", 1, 716, 94) ;this fails to click the button I need I've beat my head against the wall all day trying to figure this out but I'm not having any luck. Any ideas? Edited August 8, 2014 by blehbloo Link to comment Share on other sites More sharing options...
Danp2 Posted August 8, 2014 Share Posted August 8, 2014 So this app (name?) is using an embedded IE control? Have you looked at using the _IE functions instead of ControlClick? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Solution blehbloo Posted August 8, 2014 Author Solution Share Posted August 8, 2014 So this app (name?) is using an embedded IE control? Have you looked at using the _IE functions instead of ControlClick? I'm not sure of the difference, to be honest. However, I did just solve it. For some reason, the first ControlClick just wasn't registering. What I did was send two ControlClicks, seperated by about 3 seconds, and it works. Not sure the exact reason behind that. 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