function rename for connecting to chrome

main
Yuriy 1 year ago
parent 0f0899909c
commit 5d0932c150

@ -39,14 +39,14 @@ ShowSeleniumErrorMsgbox(){
; -------------------------------Tab Navigation & Activation------------------------------- ; -------------------------------Tab Navigation & Activation-------------------------------
CheckSeleniumDriver(){ CheckSeleniumDriver(){
try Driver := SChrome_Get("", ChromeProfile := "") ; open new tab page with with specified profile try Driver := ConnectToChrome("", ChromeProfile := "") ; open new tab page with with specified profile
catch e { catch e {
ShowSeleniumErrorMsgbox() ShowSeleniumErrorMsgbox()
; Message = Failed to Make Connection to Chrome. Check for Any Open Dialogue Boxes or out of date ChromeDriver ; Message = Failed to Make Connection to Chrome. Check for Any Open Dialogue Boxes or out of date ChromeDriver
; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging") ; SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
Return "Failed" Return "Failed"
} }
; Driver := SChrome_Get("https://www.bitchute.com/", ChromeProfile) ; open new tab page with with specified profile ; Driver := ConnectToChrome("https://www.bitchute.com/", ChromeProfile) ; open new tab page with with specified profile
; driver.executeScript("return document.readyState").equals("complete") ; wait until page loads completely before proceeding ; driver.executeScript("return document.readyState").equals("complete") ; wait until page loads completely before proceeding
try driver.executeScript("return document.readyState").equals("complete") ; wait until page loads completely before proceeding try driver.executeScript("return document.readyState").equals("complete") ; wait until page loads completely before proceeding
catch e { catch e {
@ -483,8 +483,8 @@ SaveDriverURL(){ ; save the url of the result page. That way if a tab is not fou
} }
; -------------------------------SChrome_Get------------------------------- ; -------------------------------ConnectToChrome-------------------------------
SChrome_Get(URL := "", Profile := "Profile 1", IP_Port := "127.0.0.1:9222"){ ConnectToChrome(URL := "", Profile := "Profile 1", IP_Port := "127.0.0.1:9222"){
Message = Trying to Connect to Chrome Message = Trying to Connect to Chrome
SaveOrPostProgress(Message:=Message,PostType:="Tooltip") SaveOrPostProgress(Message:=Message,PostType:="Tooltip")
@ -517,6 +517,7 @@ SChrome_Get(URL := "", Profile := "Profile 1", IP_Port := "127.0.0.1:9222"){
} }
} }
if(ChromeFilepath = ""){ if(ChromeFilepath = ""){
GetChromeFilepath() GetChromeFilepath()
} }
@ -536,7 +537,7 @@ SChrome_Get(URL := "", Profile := "Profile 1", IP_Port := "127.0.0.1:9222"){
return Driver return Driver
} }
; -------------------------------/SChrome_Get------------------------------- ; -------------------------------/ConnectToChrome-------------------------------
/* /*
*/ */

Loading…
Cancel
Save