iamtech Posted May 29, 2018 Share Posted May 29, 2018 (edited) My code is : WinWait ("Windows Internet Explorer") WinActivate ("Windows Internet Explorer") ControlClick ("Windows Internet Explorer", "&Retry", "[CLASS:Button; INSTANCE:1]", "left", 1) But, it was not working. Autoit windows info : expandcollapse popup>>>> Window <<<< Title: Windows Internet Explorer Class: #32770 Position: 469, 279 Size: 445, 229 Style: 0x94C801C5 ExStyle: 0x00010101 Handle: 0x00000000016008BC >>>> Control <<<< Class: Instance: ClassnameNN: Name: Advanced (Class): ID: Text: Position: Size: ControlClick Coords: Style: ExStyle: Handle: >>>> Mouse <<<< Position: 646, 468 Cursor ID: 0 Color: 0xF0F0F0 >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< &Retry Cancel To display the webpage again, the web browser needs to resend the information you've previously submitted. If you were making a purchase, you should click Cancel to avoid a duplicate transaction. Otherwise, click Retry to display the webpage again. >>>> Hidden Text <<<< Edited May 29, 2018 by iamtech Link to comment Share on other sites More sharing options...
Earthshine Posted May 29, 2018 Share Posted May 29, 2018 (edited) look in the help file for the IE functions specifically to automate IE It's near the bottom of the folder list in the help file, under User Defined Functions->IE Management Edited May 29, 2018 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
iamtech Posted May 30, 2018 Author Share Posted May 30, 2018 13 hours ago, Earthshine said: look in the help file for the IE functions specifically to automate IE It's near the bottom of the folder list in the help file, under User Defined Functions->IE Management @Earthshine there are no option about the IE pop up box Link to comment Share on other sites More sharing options...
junkew Posted May 30, 2018 Share Posted May 30, 2018 Whats your definition of "not working" does script come to an end or is it "waiting" for the popup to go away. Its important to know what you do before you start waiting for your popup. If you called a javascript (in)directly that triggers the popup autoit will wait till your js is finished so you have some kind of deadlock. 1. Use a 2nd script to click away modal dialogs 2. Do not call a blocking JS script but send a "normal" mouseclick that doesn't cause the deadlock 3. Check for adlib register function option 1 will allways work whereas for 2 & 3 its not allways possible FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
iamtech Posted May 30, 2018 Author Share Posted May 30, 2018 1 hour ago, junkew said: Whats your definition of "not working" does script come to an end or is it "waiting" for the popup to go away. Its important to know what you do before you start waiting for your popup. If you called a javascript (in)directly that triggers the popup autoit will wait till your js is finished so you have some kind of deadlock. 1. Use a 2nd script to click away modal dialogs 2. Do not call a blocking JS script but send a "normal" mouseclick that doesn't cause the deadlock 3. Check for adlib register function option 1 will allways work whereas for 2 & 3 its not allways possible @junkew My Full code is : #include <IE.au3> _IELoadWait($oIE) _IENavigate($oIE, "my website") $consent = _IEGetObjById($oIE,"consent") _IEAction($consent,"click") _IELoadWait($oIE) $imgcio = _IEGetObjById($oIE,"imgcio") _IEAction($imgcio,"click") For $i = 1 to 6 _IEAction($oIE,"refresh") WinWait ("Windows Internet Explorer") WinActivate ("Windows Internet Explorer") ControlClick ("Windows Internet Explorer", "&Retry", "[CLASS:Button; INSTANCE:1]", "left", 1) _IELoadWait($oIE) $imgcio = _IEGetObjById($oIE,"imgcio") _IEAction($imgcio,"click") Next imgcio is the js button and i want to re-send the information. Link to comment Share on other sites More sharing options...
junkew Posted May 30, 2018 Share Posted May 30, 2018 your code blocks due to that you call the event click which most likely has a blocking dialog triggered by the JS script _IEAction($imgcio,"click") see https://www.autoitscript.com/autoit3/docs/libfunctions/_IEPropertyGet.htm 2nd example on how to get the dimensions of your element and move the mouse to that element. Small step for you to make mousemove a mouseclick FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets 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