tak09 Posted June 9, 2020 Posted June 9, 2020 #include "wd_core.au3" #include "wd_helper.au3" SetupChrome() Local $sDesiredCapabilities, $sSession _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, "https://www.google.com") _WD_Shutdown() Func SetupChrome() _WD_Option('Driver', 'chromedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true }}}}' EndFunc Func _ChromeSetInputValueById($sSession, $Id, $Value) $sButton = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@id='"&$Id&"']") _WD_ElementAction($sSession, $sButton, 'value', $Value) EndFunc
Danp2 Posted June 9, 2020 Posted June 9, 2020 See the following for the proper way to post code on the forum -- Also, it's preferred that you post the output as text instead of a screen shot when possible. To solve your issue, try moving this line before you call SetupChrome -- Local $sDesiredCapabilities, $sSession Latest Webdriver UDF Release Webdriver Wiki FAQs
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now