From 3f559f2f81da580263ffcc72795c30f8c89a1603 Mon Sep 17 00:00:00 2001 From: yuriy Date: Sun, 2 Apr 2023 23:17:52 -0400 Subject: [PATCH] Fixed selenium tab loop function to not incredement by 3 each time moving on to new site, updated errorlogging messages --- Selenium-Shared-Functions.ahk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Selenium-Shared-Functions.ahk b/Selenium-Shared-Functions.ahk index 63baed7..46d043d 100644 --- a/Selenium-Shared-Functions.ahk +++ b/Selenium-Shared-Functions.ahk @@ -104,14 +104,14 @@ CreateArrayOfChromeTabs() { ; 5 is arbitrary number to do some extra loops to make sure all tabs are gone through ; most likely not necessary because unloaded tabs cannot be activated - TotalTabLoops := TotalTabsFound + 5 + TotalTabLoops := TotalTabsFound + 2 Message = Total Pre-Existing Tabs in Chrome: %TotalTabsFound%`nTotal Times looping through tabs to create Chrome Tabs Array: %TotalTabLoops% SaveOrPostProgress(Message,PostType:="ErrorLoggingTextFile,DiscordErrorLogging") - Message = Creating an Array of All Chrome Tabs`n(Sometimes might get stuck for a short while if there is something loading in a tab) + Message = Creating an Array of All Chrome Tabs`n(Sometimes might get stuck for a short while if acive tab's page is reloading/loading) SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile") @@ -264,7 +264,7 @@ NavigateFromBaseURLTo(URL,PageTitle := "TodoDeleteme"){ if(Status = "Failed"){ try currentURL := GetCurrentTabURLBase() Message = Failed to switch active tab to %URLBase%. Current tab is: %currentURL% - SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging") + SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging") CheckForAlerts() @@ -353,7 +353,9 @@ ActivateChromeTab(URL){ TabFoundSuccessfully := - NumberOfTabActivationLoops := ChromeTabsURLArray.Length() + 3 + NumberOfTabActivationLoops := ChromeTabsURLArray.Length() + ; Message = NumberOfTabActivationLoops has been increased by 3 + SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging") Message = Looping through tabs -> %NumberOfTabActivationLoops% <- times to find tab with URL: %urlBase% SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")