diff --git a/Freedomain-Posters-Shared-Functions.ahk b/Freedomain-Posters-Shared-Functions.ahk index 881b751..c1e0cf9 100644 --- a/Freedomain-Posters-Shared-Functions.ahk +++ b/Freedomain-Posters-Shared-Functions.ahk @@ -946,9 +946,9 @@ ActivateChromeTab(URL){ } - Message = Finding Tab with URL base: %URLBase% - SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile") - DevModeMsgBox(Message) + ; Message = Finding Tab with URL base: %URLBase% + ; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile") + ; DevModeMsgBox(Message) ; if not connected to selenium chrome, then re-connect @@ -964,8 +964,8 @@ ActivateChromeTab(URL){ TabFoundSuccessfully := NumberOfTabActivationLoops := ChromeTabsURLArray.Length() - Message := "NumberOfTabActivationLoops: " NumberOfTabActivationLoops - DevModeMsgBox(Message) + ; Message := "NumberOfTabActivationLoops: " NumberOfTabActivationLoops + ; DevModeMsgBox(Message) ; NumberOfTabLoops := Driver.Windows.Count + 2 loop % NumberOfTabActivationLoops { ; loop through tabs to find matching tab @@ -978,8 +978,8 @@ ActivateChromeTab(URL){ if(InStr(CurrentTabURL, URLBase)){ - Message = Found Tab:.`n%CurrentTabTitle% = %PageTitle%`n%CurrentTabURL% = %URLBase% - DevModeMsgBox(message) + ; Message = Found Tab:.`n%CurrentTabTitle% = %PageTitle%`n%CurrentTabURL% = %URLBase% + ; DevModeMsgBox(message) TabFoundSuccessfully := 1 ; msgbox %CurrentTabTitle% = %PageTitle% @@ -1050,8 +1050,8 @@ NavigateFromBaseURLTo(URL,PageTitle := "TodoDeleteme"){ sleep, 1000 } - message = NewTabCreated: %NewTabCreated% - DevModeMsgBox(message) + ; message = NewTabCreated: %NewTabCreated% + ; DevModeMsgBox(message) status := ActivateChromeTab(URLBase) @@ -1067,9 +1067,10 @@ NavigateFromBaseURLTo(URL,PageTitle := "TodoDeleteme"){ ; Double check that the current tab URL matches the url base try, CurrentTabURl := driver.url - Message = Reusing Tab. `nCurrentTabURl: %CurrentTabURl%`nURL Navigating to: %URL% - DevModeMsgBox(Message) + ; Message = Reusing Tab. `nCurrentTabURl: %CurrentTabURl%`nURL Navigating to: %URL% + ; DevModeMsgBox(Message) + DevModeMsgBox("getting url") try driver.Get(URL) ;Open selected URL catch e { @@ -1098,6 +1099,9 @@ 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 { @@ -1107,9 +1111,11 @@ CheckForAlerts(){ if(status){ ; 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") - try driver.switchToalert().dismiss() + try driver.switchToalert().accept() + ; try driver.switchToalert().dismiss() return "AlertFound" }