Reputation: 4930
This popup kills many of my tests. Even simple DOM interactions like .exists? timeout. Is there any way of detecting that it appeared and dismissing it?
Warning: Unresponsive script.
A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.
dom.max_script_run_time=999
dom.max_chrome_script_run_time=19
These websites aren't designed nor influenced by me. I am merely scraping and sending them instructions as customer.
Upvotes: 1
Views: 1144
Reputation: 2016
I run a small autoit3 application that kills popups. If I recall correctly, it waits a little bit to see if the popup is handled before it kills it. This removed many frustrations for me. I also had a version of this that would match certain keywords in the title or body that was read from a file - that allowed me to avoid killing something that needed to stay.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; AutoIt Version: 3.1.0 ;
; Author: Dave McNulla ;
; Script Function: Close unwanted popups during test automation. ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Opt("GUIOnEventMode", 1) ; Change to OnEvent mode
Opt("WinTextMatchMode", 1) ;0=best, 1=quick
Opt("WinTitleMatchMode", 2) ;1=start, 2=subStr, 3=exact, 4=advanced
Opt("TrayIconHide", 0) ;0=show, 1=hide
Opt("TrayMenuMode", 0) ;0=default
TraySetIcon("Shell32.dll", 98)
dim $SleepTime = 2000
dim $Max = 100
$Message = "{ENTER}"
$ButtonClick = "[CLASS:Button; TEXT:OK]"
$Title = "[CLASS:#32770;TITLE:Internet Explorer]"
While 1
If WinExists($Title) Then
WinActivate($Title)
Sleep($SleepTime)
ControlClick($Title, "", $ButtonClick)
EndIf
Sleep($SleepTime)
If $Max < 1 Then Exit(1)
WEnd
Upvotes: 1