Added extra error logging to try to track down why switching tabs sometimes fails
This commit is contained in:
@@ -948,6 +948,23 @@ if(TotalTabsFound = 1){
|
||||
ToolTip,
|
||||
}
|
||||
|
||||
CheckCurrentTabForCurrentSite(){
|
||||
try CurrentTabURL := driver.url
|
||||
|
||||
if(!InStr(CurrentTabURL, "CurrentSite")){
|
||||
Message = Chromedriver failed to switch to %CurrentSite%. Please see errorlog for website it got stuck on.
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
return "Failed"
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
; msgbox % InStr(CurrentTabURL,CurrentSite)
|
||||
|
||||
}
|
||||
|
||||
|
||||
; -------------------------------NavigateFromBaseURLTo-------------------------------
|
||||
NavigateFromBaseURLTo(URL){
|
||||
if(!DriverStatus){ ; if not connected to selenium chrome, then re-connect
|
||||
@@ -1031,6 +1048,9 @@ if(TotalTabsFound = 1){
|
||||
|
||||
|
||||
if(InStr(CurrentTabURL, URLBase)){
|
||||
Message = CurrentTabURL is %CurrentTabURL% and it contains %URLBase%
|
||||
SaveOrPostProgress(Message:=Message,PostType:="ErrorLoggingTextFile")
|
||||
|
||||
; msgbox, found it.`n%CurrentTabTitle% = %PageTitle%`n%CurrentTabURL% = %URLBase%
|
||||
TabFoundSuccessfully := 1
|
||||
; message = %CurrentTabTitle%: %PageTitle%
|
||||
@@ -1457,7 +1477,7 @@ SaveDriverURLOFErrorPage(){ ; save the url of the result page. That way if a tab
|
||||
|
||||
|
||||
FindAndActivateTab(TabURL){
|
||||
DevModeMsgBox(TabURL)
|
||||
; DevModeMsgBox(TabURL)
|
||||
Loop, {
|
||||
if(A_index = 30)
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user