|
|
|
@ -20,9 +20,27 @@ global chromedriverDLURL64
|
|
|
|
|
; Chrome Related Functions
|
|
|
|
|
;------------------------------------------------
|
|
|
|
|
DownladAndExtractZip(URL, Directory){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; UrlDownloadToFile, %, Filename
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CheckForChromeUpdates(ChromeFilepath := ""){
|
|
|
|
|
if(ChromeFilepath = "")
|
|
|
|
|
ChromeFilepath := GetChromeFilepath
|
|
|
|
|
|
|
|
|
|
CurrentChromeVersion := GetChromeVersion()
|
|
|
|
|
CurrentChromeStableVersion := GetLatestChromeStableVersion()
|
|
|
|
|
|
|
|
|
|
if(CurrentChromeVersion < CurrentChromeStableVersion){
|
|
|
|
|
ChromeUpdateAvailable := 1
|
|
|
|
|
return ChromeUpdateAvailable
|
|
|
|
|
}
|
|
|
|
|
else, Return 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GetChromeFilepath(){
|
|
|
|
|
; ChromeFilepath is global variable
|
|
|
|
@ -46,6 +64,7 @@ GetChromeFilepath(){
|
|
|
|
|
ChromeFilepath = C:\Program Files\Google\Chrome\Application\chrome.exe
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
ToolTip
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -63,7 +82,10 @@ GetChromeVersion(){
|
|
|
|
|
|
|
|
|
|
GetChromeVersionCommand = powershell (Get-Item '%ChromeFilepath%').VersionInfo.ProductVersion
|
|
|
|
|
Chromeversion := RunCMD(GetChromeVersionCommand)
|
|
|
|
|
ChromeVersion := StrReplace(ChromeVersion, "`r")[1] ; replace any newline characters that powershell returns
|
|
|
|
|
|
|
|
|
|
if(InStr(ChromeVersion, "`r"))
|
|
|
|
|
ChromeVersion := StrReplace(ChromeVersion, "`r") ; replace any newline characters that powershell returns
|
|
|
|
|
|
|
|
|
|
return ChromeVersion
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|