added function to get the baseurl of current tab, small bug fix within chrome tab activation function
This commit is contained in:
@@ -15,6 +15,12 @@ CheckCurrentTabForCurrentSite(){
|
||||
*/
|
||||
|
||||
|
||||
GetCurrentTabURlBase(){
|
||||
try, TabURL := driver.url
|
||||
TabURL := ExtractBaseURL(TabURL)
|
||||
return TabURL
|
||||
}
|
||||
|
||||
|
||||
ExtractBaseURL(URL){
|
||||
URLBase := StrReplace(URL,"https://","") ; remove beginning of URL
|
||||
@@ -76,7 +82,7 @@ NavigateFromBaseURLTo(URL,PageTitle := "TodoDeleteme"){
|
||||
ChromeTabsURLArray.Push(URL) ; Append the new url to the array
|
||||
NewTabCreated := 1
|
||||
sleep, 1000
|
||||
status := ActivateChromeTab(URLBase)
|
||||
status := ActivateChromeTab(URL)
|
||||
if(Status = "Failed"){
|
||||
Message = Failed to activate tab for %urlBase% after 2 atteppts. Chrome stuck on a dialog box of some sort?
|
||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||
@@ -122,9 +128,10 @@ NavigateFromBaseURLTo(URL,PageTitle := "TodoDeleteme"){
|
||||
}
|
||||
|
||||
|
||||
|
||||
; -------------------------------ActivateChromeTab-------------------------------
|
||||
ActivateChromeTab(URL){
|
||||
; convert to baseUR
|
||||
|
||||
; Extract Base URL if necessary
|
||||
if(InStr(URL, "/")){
|
||||
URLBase := ExtractBaseURL(URL)
|
||||
}
|
||||
@@ -300,7 +307,7 @@ SChrome_Get(URL := "", Profile := "Profile 1", IP_Port := "127.0.0.1:9222"){
|
||||
; Save current chrome version to ini file
|
||||
return Driver
|
||||
}
|
||||
|
||||
|
||||
; -------------------------------/SChrome_Get-------------------------------
|
||||
/*
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user