Jump to content

Prevent this page from creating additional dialogues


CYCho
 Share

Recommended Posts

Browsers seem to have a built-in feature to insert a check box (Prevent this page from creating additional dialogues) into the message box created by an web site. This check box seems to appear when the same message box is triggered in succession within a short span of time. My problem is that AutoIt cannot read the text of the IE11 message box when this check box is included. I started to experence this after my Windows 10 was updated to Anniversay Update. I would like to know if anyone has experienced the same thing and if there is a solution to let the AutoIt read the text.

Edited by CYCho
Link to comment
Share on other sites

On ‎2018‎년 ‎1‎월 ‎24‎일 at 1:27 AM, XaelloNegative said:

I think you could use your Window info tool to get the classes and/or ClassNN, title and instances. Let us know what it says, so we could explore other options.

Thank you for your attention. This is the screen capture. It is in Korean, but basically au3info can detect only the title, the size of the message box and the text "Confirm" which is  a button. The title says "Message from web page." I can think of using the size as an identifier of this message box, but I am afraid I may encounter same size message boxes with different contexts, requring me to take different actions after the message is closed.

 

1709.png

Edited by CYCho
Link to comment
Share on other sites

14 hours ago, CYCho said:

Thank you for your attention. This is the screen capture. It is in Korean, but basically au3info can detect only the title, the size of the message box and the text "Confirm" which is  a button. The title says "Message from web page." I can think of using the size as an identifier of this message box, but I am afraid I may encounter same size message boxes with different contexts, requring me to take different actions after the message is closed.

Well done. At least you have the title and some identifiers, we could work with that. Now, what do you want to do with the said pop-up?

;) ~XN~ ;)

Link to comment
Share on other sites

  • 2 weeks later...

Since each pop-up message has a distinct pixel checksum value, I think PixelChecksum() funtion can solve my problem, even though I still want to be able to read the text. I found that it takes less than 20 millisecs to get the pixel checksum of a pop-up window and that's fast enough.

Link to comment
Share on other sites

1 hour ago, Danp2 said:

You may want to take a look at the Web Driver UDF, as it has the ability to retrieve the text from an alert window.

Thanks for your suggestion. I am not familiar with web driver, so please pardon me if my question is too silly. In your documentation, I see the links for Chrome and FireFox web drivers but none for IE. Does this UDF work on IE as well? I use IE because I have to use -noframemerging command line to establish several independent sessions at the same time.

Link to comment
Share on other sites

Based upon the recent feedback from @Chimp, I would say yes. Not all Web Drivers have fully implemented the W3C protocol. You can see details on the IE implementation here.  You may want to write a test script just to see if you can attach to an existing instance of IE and then interact with it, read the Alert text, etc.

P.S. This is an early rendition of the UDF so things are likely to change slightly as development continues.

Link to comment
Share on other sites

Thank you Danp2. I failed with MicrosoftWebDriver on IE, but was successful with Chrome. Chrome did not produce "Prevent this page..." checkbox, and au3info could not detect the Chrome pop-up anyway, but your UDF could detect the pop-up and accurately read the text. I think I now see a light at the end of the tunnel. By the way, how would you keep the sessions alive while I do the logins, navigate and do other chores? Should I place a while loop after the sessions are created and trigger functions by hot keys?

P.S.  It is good to learn that Chrome multisession is the norm under your UDF.

Edited by CYCho
Link to comment
Share on other sites

Since I have to use _WD_Alert($Session, "gettext") function intermittently while web pages are open, I have to keep the session alive. I'm using a while loop and it works great. The only complaint I can think of  is that I can't get rid of the DOS box while session is alive. Thanks a lot.

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

×
×
  • Create New...