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%
; DevModeMsgBox(Message)
DevModeMsgBox("getting url")
; DevModeMsgBox("getting url")
try driver.Get(URL) ;Open selected URL
catch e {
@ -1101,7 +1101,7 @@ NavigateFromBaseURLTo(URL,PageTitle := "TodoDeleteme"){
CheckForAlerts(){
Message = Checking for Any Obstructing Alerts in Chrome
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
status := 1
try driver.SwitchToAlert()
catch e {
@ -1116,12 +1116,23 @@ CheckForAlerts(){
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
try driver.switchToalert().accept()
; 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
; -------------------------------/NavigateFromBaseURL-------------------------------

Loading…
Cancel
Save