Updated Debug tool with 1 example and removed code used for testing purposes

main
Yuriy 2 years ago
parent 4c463c803c
commit d53f6651ea

@ -19,8 +19,10 @@ Chrome_Window_Title := Chrome_Window_Title[1]
Driver := ConnectToChrome("", ConnectActiveTab := 1, ActiveTabTitle := Chrome_Window_Title) ; open new tab page with with specified profile Driver := ConnectToChrome("", ConnectActiveTab := 1, ActiveTabTitle := Chrome_Window_Title) ; open new tab page with with specified profile
; This script can be used to connect to your currently active Chrome tab and for quick debugging purposes
;---MAIN SCRIPT--------------------------------------------------------------------- ;---MAIN SCRIPT---------------------------------------------------------------------
js = return document.querySelector(".header__contain").innerText js = document.querySelector('[id^="What's on your mind"]')[0].click();
try status := driver.executeScript(js) try status := driver.executeScript(js)
ExitApp ExitApp
@ -29,7 +31,6 @@ ExitApp
ConnectToChrome(URL := "", ConnectActiveTab := 0, WinGetActiveChromeTabTitle := ""){ ConnectToChrome(URL := "", ConnectActiveTab := 0, WinGetActiveChromeTabTitle := ""){
; Msgbox % "WinGetActiveChromeTabTitle: " WinGetActiveChromeTabTitle ; Msgbox % "WinGetActiveChromeTabTitle: " WinGetActiveChromeTabTitle
IP_Port := "127.0.0.1:9222" IP_Port := "127.0.0.1:9222"
@ -62,9 +63,6 @@ ConnectToChrome(URL := "", ConnectActiveTab := 0, WinGetActiveChromeTabTitle :=
} }
} }
; yuriy's settings
; IniRead, ChromeFilepath, C:\Users\%A_username%\Documents\Autohotkey\Lib\ScriptSettings.ini, Selenium, %A_Computername%, %A_Space%
; Establish Variable with Filepath to be used throughout the script ; Establish Variable with Filepath to be used throughout the script
if(ChromeFilepath = ""){ if(ChromeFilepath = ""){
if(FileExist("C:\Program Files\Google\Chrome\Application\chrome.exe")){ if(FileExist("C:\Program Files\Google\Chrome\Application\chrome.exe")){
Loading…
Cancel
Save