|
|
@ -946,9 +946,9 @@ ActivateChromeTab(URL){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Message = Finding Tab with URL base: %URLBase%
|
|
|
|
; Message = Finding Tab with URL base: %URLBase%
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
DevModeMsgBox(Message)
|
|
|
|
; DevModeMsgBox(Message)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; if not connected to selenium chrome, then re-connect
|
|
|
|
; if not connected to selenium chrome, then re-connect
|
|
|
@ -964,8 +964,8 @@ ActivateChromeTab(URL){
|
|
|
|
TabFoundSuccessfully :=
|
|
|
|
TabFoundSuccessfully :=
|
|
|
|
|
|
|
|
|
|
|
|
NumberOfTabActivationLoops := ChromeTabsURLArray.Length()
|
|
|
|
NumberOfTabActivationLoops := ChromeTabsURLArray.Length()
|
|
|
|
Message := "NumberOfTabActivationLoops: " NumberOfTabActivationLoops
|
|
|
|
; Message := "NumberOfTabActivationLoops: " NumberOfTabActivationLoops
|
|
|
|
DevModeMsgBox(Message)
|
|
|
|
; DevModeMsgBox(Message)
|
|
|
|
|
|
|
|
|
|
|
|
; NumberOfTabLoops := Driver.Windows.Count + 2
|
|
|
|
; NumberOfTabLoops := Driver.Windows.Count + 2
|
|
|
|
loop % NumberOfTabActivationLoops { ; loop through tabs to find matching tab
|
|
|
|
loop % NumberOfTabActivationLoops { ; loop through tabs to find matching tab
|
|
|
@ -978,8 +978,8 @@ ActivateChromeTab(URL){
|
|
|
|
|
|
|
|
|
|
|
|
if(InStr(CurrentTabURL, URLBase)){
|
|
|
|
if(InStr(CurrentTabURL, URLBase)){
|
|
|
|
|
|
|
|
|
|
|
|
Message = Found Tab:.`n%CurrentTabTitle% = %PageTitle%`n%CurrentTabURL% = %URLBase%
|
|
|
|
; Message = Found Tab:.`n%CurrentTabTitle% = %PageTitle%`n%CurrentTabURL% = %URLBase%
|
|
|
|
DevModeMsgBox(message)
|
|
|
|
; DevModeMsgBox(message)
|
|
|
|
|
|
|
|
|
|
|
|
TabFoundSuccessfully := 1
|
|
|
|
TabFoundSuccessfully := 1
|
|
|
|
; msgbox %CurrentTabTitle% = %PageTitle%
|
|
|
|
; msgbox %CurrentTabTitle% = %PageTitle%
|
|
|
@ -1050,8 +1050,8 @@ NavigateFromBaseURLTo(URL,PageTitle := "TodoDeleteme"){
|
|
|
|
sleep, 1000
|
|
|
|
sleep, 1000
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message = NewTabCreated: %NewTabCreated%
|
|
|
|
; message = NewTabCreated: %NewTabCreated%
|
|
|
|
DevModeMsgBox(message)
|
|
|
|
; DevModeMsgBox(message)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
status := ActivateChromeTab(URLBase)
|
|
|
|
status := ActivateChromeTab(URLBase)
|
|
|
@ -1067,9 +1067,10 @@ NavigateFromBaseURLTo(URL,PageTitle := "TodoDeleteme"){
|
|
|
|
|
|
|
|
|
|
|
|
; Double check that the current tab URL matches the url base
|
|
|
|
; Double check that the current tab URL matches the url base
|
|
|
|
try, CurrentTabURl := driver.url
|
|
|
|
try, CurrentTabURl := driver.url
|
|
|
|
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")
|
|
|
|
|
|
|
|
|
|
|
|
try driver.Get(URL) ;Open selected URL
|
|
|
|
try driver.Get(URL) ;Open selected URL
|
|
|
|
catch e {
|
|
|
|
catch e {
|
|
|
@ -1098,6 +1099,9 @@ NavigateFromBaseURLTo(URL,PageTitle := "TodoDeleteme"){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CheckForAlerts(){
|
|
|
|
CheckForAlerts(){
|
|
|
|
|
|
|
|
Message = Checking for Any Obstructing Alerts in Chrome
|
|
|
|
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile")
|
|
|
|
|
|
|
|
|
|
|
|
status := 1
|
|
|
|
status := 1
|
|
|
|
try driver.SwitchToAlert()
|
|
|
|
try driver.SwitchToAlert()
|
|
|
|
catch e {
|
|
|
|
catch e {
|
|
|
@ -1107,9 +1111,11 @@ CheckForAlerts(){
|
|
|
|
|
|
|
|
|
|
|
|
if(status){
|
|
|
|
if(status){
|
|
|
|
; msgbox, alert found
|
|
|
|
; msgbox, alert found
|
|
|
|
Message = Page Alert Found. Dismissing.
|
|
|
|
; Message = Page Alert Found. Dismissing.
|
|
|
|
|
|
|
|
Message = Page Alert Found. Accepting.
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
|
|
try driver.switchToalert().dismiss()
|
|
|
|
try driver.switchToalert().accept()
|
|
|
|
|
|
|
|
; try driver.switchToalert().dismiss()
|
|
|
|
return "AlertFound"
|
|
|
|
return "AlertFound"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|