Jump to content

Click on Yes button in Question -- Webpage Dialog


Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

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.

 

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...