MRAJ Posted May 14, 2018 Share Posted May 14, 2018 Hi, Below is the screenshot of the page, on which i am not able to click on Yes button. Please help I tried with codes but it is not working. ControlClick($hWnd, "Question -- Webpage Dialog", "[CLASS:Internet Explorer_Server; INSTANCE:1]","left",2) Sleep(2000) Send("{TAB}","{ENTER}") Link to comment Share on other sites More sharing options...
Andreik Posted May 14, 2018 Share Posted May 14, 2018 You should take a look at IE UDF. Link to comment Share on other sites More sharing options...
MRAJ Posted May 14, 2018 Author Share Posted May 14, 2018 i didnt get you..can you please elaborate. Link to comment Share on other sites More sharing options...
junkew Posted May 14, 2018 Share Posted May 14, 2018 Take a look at faq 31 see link below 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...
MRAJ Posted May 15, 2018 Author Share Posted May 15, 2018 Can you please provide me that portion of scripts or content where this issue solution i can get in FAQ 31, as there are many pages. Earthshine 1 Link to comment Share on other sites More sharing options...
Andreik Posted May 15, 2018 Share Posted May 15, 2018 Check AutoIt help file for user defined functions reference and more exact IE Management. Link to comment Share on other sites More sharing options...
junkew Posted May 15, 2018 Share Posted May 15, 2018 Did you try to find more info on the control with au3inf or other spying tools as given in faq 31. Every control has details that you should post here like class, id, name and based on that info you get a better answer. And if its a modal dialog window it can be a little more challenging. 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...
MRAJ Posted May 16, 2018 Author Share Posted May 16, 2018 Below is the summary from the finder tool for the dialog window: >>>> Window <<<< Title: Question -- Webpage Dialog Class: Internet Explorer_TridentDlgFrame Position: 390, 229 Size: 515, 289 Style: 0x96CC0000 ExStyle: 0x00000101 Handle: 0x00000000000B0424 >>>> Control <<<< Class: Internet Explorer_Server Instance: 1 ClassnameNN: Internet Explorer_Server1 Name: No HTML page for this dialog window. Advanced (Class): [CLASS:Internet Explorer_Server; INSTANCE:1] ID: Text: Position: 0, 26 Size: 500, 225 ControlClick Coords: 441, 150 Style: 0x56000000 ExStyle: 0x00000000 Handle: 0x000000000005041A >>>> Mouse <<<< Position: 838, 435 Cursor ID: 0 Color: 0xCCCCCC >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< Link to comment Share on other sites More sharing options...
junkew Posted May 16, 2018 Share Posted May 16, 2018 in general modal dialogs stop your script till the modal dialog dissapears. To circumvent this you have to run a 2nd scripts with the only purpose of clicking on the modal dialog https://www.autoitscript.com/autoit3/docs/intro/running.htm 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...
MRAJ Posted May 16, 2018 Author Share Posted May 16, 2018 Could you provide me sample for 2nd script and i have to click on Yes button.. Link to comment Share on other sites More sharing options...
junkew Posted May 16, 2018 Share Posted May 16, 2018 yes i could but i will not as you could find it in help and in forum searching for modal dialog, read faq 31, .... please read the manuals https://www.autoitscript.com/autoit3/docs/functions/Run.htm High level you have to code this Start your main script that deals with internet explorer One of the first steps is to run a 2nd script that "runs forever" till it sees the modal popup (close to your first post) or just a few lines before you expect it below a start. You could enhance this instead forever looping loop n times ~; 2nd script While true ~; TODO: wait for window and click button ControlClick($hWnd, "Question -- Webpage Dialog", "[CLASS:Internet Explorer_Server; INSTANCE:1]","left",2) Sleep(2000) ; Check for it every n seconds , 2 in this case WEnd Do your IE manipulation things and once the modal pops up this script will "freeze" till the modal dissapears due to script 2 clicking the modal away Dealing with IE iis not straight forward with modal dialogs so please try to understand more on what you are trying to accomplish and put some search effort in it. 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