网页地址:https wyagd001.github.io /zh-cn/docs/AutoHotkey.htm Broken Link for safety
我尝试用论坛里找到的办法,但都不成功,希望能得到帮助,先感谢!
Code: Select all
;https://www.autohotkey.com/boards/viewtopic.php?f=7&t=87159
wd := ComObjCreate("SeleniumBasic.IWebDriver")
svc := ComObjCreate("SeleniumBasic.ChromeDriverService")
options := ComObjCreate("SeleniumBasic.ChromeOptions")
svc.CreateDefaultService.driverPath := ".\tools\SeleniumBasic"
svc.HideCommandPromptWindow := True
options.BinaryLocation := "C:\Program Files\Google\Chrome\Application\chrome.exe"
options.DebuggerAddress := "127.0.0.1:9333"
wd.New_ChromeDriver(svc,Options)
wd.ExecuteScript("window.open('https wyagd001.github.io /zh-cn/docs/AutoHotkey.htm')")
sleep 1000
; wd.FindElementByName("Index tab").Click() ;无效
; wd.findElementByCssSelector("#head > div > div.h-tabs > ul > li:nth-child(2) > button").Click() ;无效
; wd.FindElementByXPath("//*[@id='head']/div/div[1]/ul/li[2]/button").Click() ;无效
wd.Quit()