Xanzz Posted November 23, 2019 Share Posted November 23, 2019 Hey, I'm new to this all and have followed a tutorial on this but I keep getting the same error it doesn't click on the login button #cs Reference https://www.v3schools.com/jsref/prop_win_innerheight.asp #ce #include <IE.au3> #include "wd_core.au3" #include "wd_helper.au3" #include <Misc.au3> ;Is pressed #include <string.au3> Local $sDesiredCapabilities, $sSession SetupChrome() _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, "https://steamcommunity.com/login/home/?goto=") _ChromeSetInputValueById($sSession,'steamAccountName','abc') _ChromeSetInputValueById($sSession,'steamPassword','123') $sButton _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "///a[@id= 'login_btn_signin']" _WD_ElementAction($sSession,$sButton,'click') _WD_Shutdown() Func SetupChrome() _WD_Option('Driver', 'chromedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"chromeOptions": {"w3c": true, "args":[' & """start-maximized""," & " ""disable-infobars""" & "" & '] }}}}' EndFunc ;==>SetupChrome Func _ChromeSetInputValueById($sSession,$Id,$Value) $sButton = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@id='"&$Id&"']") _WD_ElementAction($sSession,$sButton,'value', $Value) EndFunc Link to comment Share on other sites More sharing options...
Xanzz Posted November 23, 2019 Author Share Posted November 23, 2019 Looking to make a automated password filler and strong password generator (like the lastpass extension) with this Link to comment Share on other sites More sharing options...
Danp2 Posted November 23, 2019 Share Posted November 23, 2019 1. Remove the IE.au3 as this isn't needed 2. It would help if you showed us the error you're receiving. 😏 3. Make sure you familiarize yourself with the forum rules Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Xanzz Posted November 23, 2019 Author Share Posted November 23, 2019 Oowh sorry didn't notice it, Quote _WDStartup: OS: WIN_10 WIN32_NT 18362 _WDStartup: AutoIt: 3.3.14.5 _WDStartup: WD.au3: 0.1.0.15 _WDStartup: Driver: chromedriver.exe _WDStartup: Params: --log-path="C:\Users\thoma\Desktop\Chromedriver\chrome.log" _WDStartup: Port: 9515 __WD_Post: URL=HTTP://127.0.0.1:9515/session; $sData={"capabilities": {"alwaysMatch": {"chromeOptions": {"w3c": true, "args":["start-maximized", "disable-infobars"] }}}} __WD_Post: StatusCode=200; ResponseText={"value":{"capabilities":{"acceptInsecureCerts":false,"acceptSslCerts":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"browserName":"chrome","chrome":{"chromedriverVersion":"2.43.600210 (68dcf5eebde37173d4027fa8635e332711d2874a)","userDataDir":"C:\\Users\\thoma\\AppData\\Local\\Temp\\scoped_dir12940_8166"},"cssSelectorsEnabled":true,"databaseEnabled":false,"goog:chromeOptions":{"debuggerAddress":"localhost:49709"},"handlesAlerts":true,"hasTouchScreen":false,"javascriptEnabled":true,"locationContextEnabled":true,"mobileEmulationEnabled":false,"nativeEvents":true,"networkConnectionEnabled":false,"pageLoadStrategy":"normal","platform":"Windows NT","rotatable":false,"setWindowRect":true,"takesHeapSnapshot":true,"takesScreenshot":true,"unhandledPromptBehavior":"","version":"78.0.3904.108","webStorageEnabled":true},"sessionId":"ccefe7fa38da8b93d7b43ec5cb903b56"}} _WD_CreateSession: {"value":{"capabilities":{"acceptInsecureCerts":false,"acceptSslCerts":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"browserName":"chrome","chrome":{"chromedriverVersion":"2.43.600210 (68dcf5eebde37173d4027fa8635e332711d2874a)","userDataDir":"C:\\Users\\thoma\\AppData\\Local\\Temp\\scoped_dir12940_8166"},"cssSelectorsEnabled":true,"databaseEnabled":false,"goog:chromeOptions":{"debuggerAddress":"localhost:49709"},"handlesAlerts":true,"hasTouchScreen":false,"javascriptEnabled":true,"locationContextEnabled":true,"mobileEmulationEnabled":false,"nativeEvents":true,"networkConnectionEnabled":false,"pageLoadStrategy":"normal","platform":"Windows NT","rotatable":false,"setWindowRect":true,"takesHeapSnapshot":true,"takesScreenshot":true,"unhandledPromptBehavior":"","version":"78.0.3904.108","webStorageEnabled":true},"sessionId":"ccefe7fa38da8b93d7b43ec5cb903b56"}} __WD_Post: URL=HTTP://127.0.0.1:9515/session/ccefe7fa38da8b93d7b43ec5cb903b56/url; $sData={"url":"https://steamcommunity.com/openid/login?openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=checkid_setup&openid.return_to=http%3A%2F%2Fwww.unturnedhaven.com%2Fapi%2Flogin&openid.realm=http%3A%2F%2Fwww.unturnedhaven.com&openid.ns.sreg=http%3A%2F%2Fopenid.net%2Fextensions%2Fsreg%2F1.1&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select"} __WD_Post: StatusCode=200; ResponseText={"value":null} _WD_Navigate: {"value":null} __WD_Post: URL=HTTP://127.0.0.1:9515/session/ccefe7fa38da8b93d7b43ec5cb903b56/element; $sData={"using":"xpath","value":"//input[@id='steamAccountName']"} __WD_Post: StatusCode=200; ResponseText={"value":{"element-6066-11e4-a52e-4f735466cecf":"36b8f756-3981-4a5e-aa57-fd69bc41882c"}} _WD_FindElement: {"value":{"element-6066-11e4-a52e-4f735466cecf":"36b8f756-3981-4a5e-aa57-fd69bc41882c"}} __WD_Post: URL=HTTP://127.0.0.1:9515/session/ccefe7fa38da8b93d7b43ec5cb903b56/element/36b8f756-3981-4a5e-aa57-fd69bc41882c/value; $sData={"id":"36b8f756-3981-4a5e-aa57-fd69bc41882c", "text":"shamooo101", "value":["s","h","a","m","o","o","o","1","0","1"]} __WD_Post: StatusCode=200; ResponseText={"value":null} _WD_ElementAction: {"value":null} __WD_Post: URL=HTTP://127.0.0.1:9515/session/ccefe7fa38da8b93d7b43ec5cb903b56/element; $sData={"using":"xpath","value":"//input[@id='steamPassword']"} __WD_Post: StatusCode=200; ResponseText={"value":{"element-6066-11e4-a52e-4f735466cecf":"8f330542-37f6-4b69-bc68-f1dd5a96589d"}} _WD_FindElement: {"value":{"element-6066-11e4-a52e-4f735466cecf":"8f330542-37f6-4b69-bc68-f1dd5a96589d"}} __WD_Post: URL=HTTP://127.0.0.1:9515/session/ccefe7fa38da8b93d7b43ec5cb903b56/element/8f330542-37f6-4b69-bc68-f1dd5a96589d/value; $sData={"id":"8f330542-37f6-4b69-bc68-f1dd5a96589d", "text":"lunaluna6", "value":["l","u","n","a","l","u","n","a","6"]} __WD_Post: StatusCode=200; ResponseText={"value":null} _WD_ElementAction: {"value":null} "C:\Users\thoma\Desktop\Chromedriver\wd_demo.au3" (17) : ==> Variable used without being declared.: $sButton _WD_FindElement($sSession,$_WD_LOCATOR_ByXPath,"///a[@id= 'login_btn_signin']" ^ ERROR >Exit code: 1 Time: 6.941 Link to comment Share on other sites More sharing options...
Danp2 Posted November 24, 2019 Share Posted November 24, 2019 1 hour ago, Xanzz said: _WDStartup: WD.au3: 0.1.0.15 That's an out of date version. Please update and then report back. P.s. Suggest that you change your password as you posted it in the output above.😂 FrancescoDiMuro 1 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
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