Closed dagiccross closed 4 years ago
FileCreateDir, ChromeProfile ChromeInst := new Chrome("ChromeProfile")
PageInst := ChromeInst.GetPage() PageInst.Call("Page.navigate", {"url": "https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_select"}) PageInst.WaitForLoad()
PageInst.Evaluate("document.getElementsByName(""cars"")[0].options[1].selected=true")
Unable to call this JS function..
It turns out w3schools is not the best example for testing out codes... It actually worked on a normal website with dropdown lists.
Include ../Chrome.ahk
FileCreateDir, ChromeProfile ChromeInst := new Chrome("ChromeProfile")
PageInst := ChromeInst.GetPage() PageInst.Call("Page.navigate", {"url": "https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_select"}) PageInst.WaitForLoad()
PageInst.Evaluate("document.getElementsByName(""cars"")[0].options[1].selected=true")
Unable to call this JS function..