Jump to content
MRAJ

Click on Yes button in Question -- Webpage Dialog

Recommended Posts

MRAJ

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}")

image.png.08c491b88217a6b97dc85479e4bfa6a1.png

Share this post


Link to post
Share on other sites
Andreik

You should take a look at IE UDF.


When the words fail... music speaks

Share this post


Link to post
Share on other sites
MRAJ

i didnt get you..can you please elaborate.

Share this post


Link to post
Share on other sites
MRAJ

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.

  • Haha 1

Share this post


Link to post
Share on other sites
Andreik

Check AutoIt help file for user defined functions reference and more exact IE Management.


When the words fail... music speaks

Share this post


Link to post
Share on other sites
junkew

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.

Share this post


Link to post
Share on other sites
MRAJ

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 <<<<

Share this post


Link to post
Share on other sites
MRAJ

Could you provide me sample for 2nd script and i have to click on Yes button..

Share this post


Link to post
Share on other sites
junkew

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

  1. Start your main script that deals with internet explorer
  2. 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

     

  3. 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.

 

 

Share this post


Link to post
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

×