changed check for alerts return message

main
Yuriy 2 years ago
parent 9218794b5a
commit 89c1042e01

@ -1070,7 +1070,7 @@ NavigateFromBaseURLTo(URL,PageTitle := "TodoDeleteme"){
; Message = Reusing Tab. `nCurrentTabURl: %CurrentTabURl%`nURL Navigating to: %URL% ; Message = Reusing Tab. `nCurrentTabURl: %CurrentTabURl%`nURL Navigating to: %URL%
; DevModeMsgBox(Message) ; DevModeMsgBox(Message)
DevModeMsgBox("getting url") ; DevModeMsgBox("getting url")
try driver.Get(URL) ;Open selected URL try driver.Get(URL) ;Open selected URL
catch e { catch e {
@ -1116,12 +1116,23 @@ CheckForAlerts(){
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging") SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
try driver.switchToalert().accept() try driver.switchToalert().accept()
; try driver.switchToalert().dismiss() ; try driver.switchToalert().dismiss()
return "AlertFound" return "True"
} }
} }
CheckURLForSubstring(Substring){
try CurrentTabURL := driver.url
if(InStr(CurrentTabURL, Substring))
return "True"
else,
return
}
; End of Function ; End of Function
; -------------------------------/NavigateFromBaseURL------------------------------- ; -------------------------------/NavigateFromBaseURL-------------------------------

Loading…
Cancel
Save