From 74e67e5ab9c21511e42290cfac3dbb837cea5c32 Mon Sep 17 00:00:00 2001 From: yuriy Date: Sat, 16 Sep 2023 21:31:53 -0400 Subject: [PATCH] started on adding chrome/chromedriver auto downloading --- Chrome-Functions.ahk | 10 ++++++++-- Selenium-Functions.ahk | 6 +++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Chrome-Functions.ahk b/Chrome-Functions.ahk index bccf0d9..86ac256 100644 --- a/Chrome-Functions.ahk +++ b/Chrome-Functions.ahk @@ -13,12 +13,17 @@ global DriverTitleArray global LastWebsitePostURL global CurrentTabURL global URLOfLastErrorPage - - +global chromeDLURL64 +global chromedriverDLURL64 ; Chrome Related Functions ;------------------------------------------------ +DownladAndExtractZip(URL, Directory){ + ; UrlDownloadToFile, %, Filename +} + + GetChromeFilepath(){ ; ChromeFilepath is global variable ; Establish Variable with Filepath to be used throughout the script @@ -41,6 +46,7 @@ GetChromeFilepath(){ ChromeFilepath = C:\Program Files\Google\Chrome\Application\chrome.exe } } + } GetChromeVersion(){ diff --git a/Selenium-Functions.ahk b/Selenium-Functions.ahk index 1b0d5fb..1648ac0 100644 --- a/Selenium-Functions.ahk +++ b/Selenium-Functions.ahk @@ -220,8 +220,8 @@ NavigateFromBaseURLTo(URL,PageTitle := "TodoDeleteme"){ ; extract Base URL from Full URL URLBase := ExtractBaseURL(URL) - Message = Checking for URLBase: %URLBase% within ChromeTabsURLArray - SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging") + ; Message = Checking for URLBase: %URLBase% within ChromeTabsURLArray + ; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile") ; msgbox % HasSubstringVal(ChromeTabsURLArray, URLBase) . "`n`n is the status of URLbase in ChromeTabsURLArray" @@ -229,7 +229,7 @@ NavigateFromBaseURLTo(URL,PageTitle := "TodoDeleteme"){ if(!HasSubstringVal(ChromeTabsURLArray, URLBase)) { ; DevModeMsgBox("Creating new tab") - Message = Chrome tab does not exist. Creating new tab ;. Creating new tab with URL: %URL% + Message = Chrome tab does not exist in ChromeTabsURLArray. Creating new tab ;. Creating new tab with URL: %URL% SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging") try, run "%ChromeFilepath%" "%URL%"