AI123 Posted September 3, 2019 Share Posted September 3, 2019 (edited) Hello, I try to use Chrome with WebDriver. I found the following code at a youtube video (bad link with virus bottom to the youtube video so I deleted the youtube link) But if I start the script I get an error message: _WD_Startup ==> General Error: Error launching web driver! I use ChromeDriver 76.0.3809.126 (https://chromedriver.storage.googleapis.com/76.0.3809.126/chromedriver_win32.zip) and my Chrome Version is Version 76.0.3809.132 (Offizieller Build) (64-Bit). I use this WebDriver https://github.com/Danp2/WebDriver/releases/tag/0.1.0.20. I tried it with running chromedriver in a dos box before starting and also without starting the chromedriver before starting. This is the script: #include "wd_core.au3" #include "wd_helper.au3" Local $sDesiredCapabilities, $sSession SetupChrome() _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, "https://www.facebook.com") _ChromeSetInputValueById($sSession,'email','abc') _ChromeSetInputValueById($sSession,'pass','xyz') _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}}}}' ;$sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"chromeOptions": {"w3c": true, "args":[' & """start=maximized""," & " ""disable=infobars""" & "" & ']}}}}' EndFunc Func _ChromeSetInputValueById($sSession,$Id,$Value) $sButton = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@id='"&$Id&"']") _WD_ElementAction($sSession,$sButton,'value', $Value) EndFunc This is what I get after starting the script: expandcollapse popup_WDStartup: OS: WIN_10 WIN32_NT 17763 _WDStartup: AutoIt: 3.3.14.5 _WDStartup: WD.au3: 0.1.0.20 _WDStartup: Driver: chromedriver.exe _WDStartup: Params: --log-path=C:\Users\q\Downloads\chrome.log _WDStartup: Port: 9515 _WD_Startup ==> General Error: Error launching web driver! __WD_Post: URL=HTTP://127.0.0.1:9515/session; $sData={"capabilities": {"alwaysMatch": {"chromeOptions": {"w3c": true}}}} __WD_Post: StatusCode=0; ResponseText=0 __WD_Post ==> Send / Recv error _WD_CreateSession: 0 _WD_CreateSession ==> Webdriver Exception: HTTP status = 0 __WD_Post: URL=HTTP://127.0.0.1:9515/session//url; $sData={"url":"https://www.facebook.com"} __WD_Post: StatusCode=0; ResponseText=0 __WD_Post ==> Send / Recv error _WD_Navigate: 0 _WD_Navigate ==> Webdriver Exception: HTTP status = 0 __WD_Post: URL=HTTP://127.0.0.1:9515/session//element; $sData={"using":"xpath","value":"//input[@id='email']"} __WD_Post: StatusCode=0; ResponseText=0 __WD_Post ==> Send / Recv error _WD_FindElement: 0 _WD_FindElement ==> Send / Recv error: HTTP status = 0 __WD_Post: URL=HTTP://127.0.0.1:9515/session//element//value; $sData={"id":"", "text":"abc"} __WD_Post: StatusCode=0; ResponseText=0 __WD_Post ==> Send / Recv error _WD_ElementAction: 0... _WD_ElementAction ==> Send / Recv error __WD_Post: URL=HTTP://127.0.0.1:9515/session//element; $sData={"using":"xpath","value":"//input[@id='pass']"} __WD_Post: StatusCode=0; ResponseText=0 __WD_Post ==> Send / Recv error _WD_FindElement: 0 _WD_FindElement ==> Send / Recv error: HTTP status = 0 __WD_Post: URL=HTTP://127.0.0.1:9515/session//element//value; $sData={"id":"", "text":"xyz"} __WD_Post: StatusCode=0; ResponseText=0 __WD_Post ==> Send / Recv error _WD_ElementAction: 0... _WD_ElementAction ==> Send / Recv error +>17:22:32 AutoIt3.exe ended.rc:0 +>17:22:32 AutoIt3Wrapper Finished. >Exit code: 0 Time: 6.888 So does anybody no what's wrong with script or drivers and how can I correct it? Edited September 3, 2019 by AI123 Link to comment Share on other sites More sharing options...
Danp2 Posted September 3, 2019 Share Posted September 3, 2019 53 minutes ago, AI123 said: WARNUNG: Don't use the link to source code (...ouo...) at bottom of the youtbe video that I link here -> Virus warnung and a Chrome extension tries to install!!! If that's true, then I suggest that you edit your post and remove the link as it doesn't add any value to your post. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Danp2 Posted September 3, 2019 Share Posted September 3, 2019 56 minutes ago, AI123 said: _WD_Startup ==> General Error: Error launching web driver! Try adding the following line before the call to _WD_Startup -- $_WD_DEBUG = $_WD_DEBUG_Info This should result in additional details appearing in the Scite output panel. Rerun the script and post the new output results. You should also get in the habit of checking @error following each UDF call. That way, you can take corrective action or abort the script execution rather than blinding continuing as if an error hasn't occurred. AI123 1 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Danp2 Posted September 3, 2019 Share Posted September 3, 2019 1 hour ago, AI123 said: $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"chromeOptions": {"w3c": true}}}}' Hmmm.... I guess you never read my prior reply to you from April? 🙄 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
AI123 Posted September 3, 2019 Author Share Posted September 3, 2019 (edited) 1 hour ago, Danp2 said: If that's true, then I suggest that you edit your post and remove the link as it doesn't add any value to your post. I deleted the link. Edited September 3, 2019 by AI123 Danp2 1 Link to comment Share on other sites More sharing options...
AI123 Posted September 3, 2019 Author Share Posted September 3, 2019 2 hours ago, Danp2 said: Hmmm.... I guess you never read my prior reply to you from April? 🙄 Sorry, I read it but had other things to do the last month and so I forgot it. Link to comment Share on other sites More sharing options...
AI123 Posted September 3, 2019 Author Share Posted September 3, 2019 (edited) 2 hours ago, Danp2 said: Hmmm.... I guess you never read my prior reply to you from April? 🙄 Sorry, I read it but had other things to do the last months and so I forgot it. Edited September 3, 2019 by AI123 Link to comment Share on other sites More sharing options...
AI123 Posted September 3, 2019 Author Share Posted September 3, 2019 I changed $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"chromeOptions": {"w3c": true}}}}' to $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true}}}}' as Danp2 said to do i another thread. And after starting the script I get this error messeages: expandcollapse popup_WDStartup: OS: WIN_10 WIN32_NT 17763 _WDStartup: AutoIt: 3.3.14.5 _WDStartup: WD.au3: 0.1.0.20 _WDStartup: Driver: chromedriver.exe _WDStartup: Params: --log-path=C:\Users\q\Downloads\chrome.log _WDStartup: Port: 9515 _WD_Startup ==> General Error: Error launching web driver! __WD_Post: URL=HTTP://127.0.0.1:9515/session; $sData={"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true}}}} __WD_Post: StatusCode=0; ResponseText=0 __WD_Post ==> Send / Recv error _WD_CreateSession: 0 _WD_CreateSession ==> Webdriver Exception: HTTP status = 0 __WD_Post: URL=HTTP://127.0.0.1:9515/session//url; $sData={"url":"https://www.facebook.com"} __WD_Post: StatusCode=0; ResponseText=0 __WD_Post ==> Send / Recv error _WD_Navigate: 0 _WD_Navigate ==> Webdriver Exception: HTTP status = 0 __WD_Post: URL=HTTP://127.0.0.1:9515/session//element; $sData={"using":"xpath","value":"//input[@id='email']"} __WD_Post: StatusCode=0; ResponseText=0 __WD_Post ==> Send / Recv error _WD_FindElement: 0 _WD_FindElement ==> Send / Recv error: HTTP status = 0 __WD_Post: URL=HTTP://127.0.0.1:9515/session//element//value; $sData={"id":"", "text":"abc"} __WD_Post: StatusCode=0; ResponseText=0 __WD_Post ==> Send / Recv error _WD_ElementAction: 0... _WD_ElementAction ==> Send / Recv error __WD_Post: URL=HTTP://127.0.0.1:9515/session//element; $sData={"using":"xpath","value":"//input[@id='pass']"} __WD_Post: StatusCode=0; ResponseText=0 __WD_Post ==> Send / Recv error _WD_FindElement: 0 _WD_FindElement ==> Send / Recv error: HTTP status = 0 __WD_Post: URL=HTTP://127.0.0.1:9515/session//element//value; $sData={"id":"", "text":"xyz"} __WD_Post: StatusCode=0; ResponseText=0 __WD_Post ==> Send / Recv error _WD_ElementAction: 0... _WD_ElementAction ==> Send / Recv error +>21:11:52 AutoIt3.exe ended.rc:0 +>21:11:52 AutoIt3Wrapper Finished. >Exit code: 0 Time: 6.872 Link to comment Share on other sites More sharing options...
Danp2 Posted September 3, 2019 Share Posted September 3, 2019 Looks like it can't find chromedriver.exe. Either place it in your working directory or change the following line to include the full path -- _WD_Option('Driver', 'chromedriver.exe') AI123 1 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
AI123 Posted September 3, 2019 Author Share Posted September 3, 2019 (edited) 34 minutes ago, Danp2 said: Looks like it can't find chromedriver.exe. Either place it in your working directory or change the following line to include the full path -- _WD_Option('Driver', 'chromedriver.exe') Yes thank you that was the problem. After adding full path it's running without "Error launching web driver!". An Chrome browser is automatically opened and the facebbok site is opened automatically. But it doesn't fill in the data I set in _ChromeSetInputValueById($sSession,'email','abc') _ChromeSetInputValueById($sSession,'pass','xyz') I checked the input field Id's at the facebook site. They are furthermore email and pass. So wrong Id's couldn't be the problem. But in the output I see there are lines like __WD_Post: URL=HTTP://127.0.0.1:9515/session/d28536443b6e7d3d7547dd1b8e171db7/element//value; $sData={"id":"", "text":"abc"} __WD_Post: URL=HTTP://127.0.0.1:9515/session/d28536443b6e7d3d7547dd1b8e171db7/element//value; $sData={"id":"", "text":"xyz"} Is that a hint that the Id's aren't processed correctly? This is the whole output I get now if I run the script: _WDStartup: OS: WIN_10 WIN32_NT 17763 _WDStartup: AutoIt: 3.3.14.5 _WDStartup: WD.au3: 0.1.0.20 _WDStartup: Driver: C:\Users\q\Downloads\chromedriver_win32_76_0_3809_126\chromedriver.exe _WDStartup: Params: --log-path=C:\Users\q\Downloads\chrome.log _WDStartup: Port: 9515 __WD_Post: URL=HTTP://127.0.0.1:9515/session; $sData={"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true}}}} __WD_Post: StatusCode=0; ResponseText={"value":{"capabilities":{"acceptInsecureCerts":false,"browserName":"chrome","browserVersion":"76.0.3809.132","chrome":{"chromedriverVersion":"76.0.3809.126 (d80a294506b4c9d18015e755cee48f953ddc3f2f-refs/branch-heads/3809@{#1024})","userDataDir":"C:\\Users\\q\\AppData\\Local\\Temp\\scoped_dir12868_192127786"},"goog:chromeOptions":{"debuggerAddress":"localhost:52561"},"networkConnectionEnabled":false,"pageLoadStrategy":"normal","platformName":"windows nt","proxy":{},"setWindowRect":true,"strictFileInteractability":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"unhandledPromptBehavior":"dismiss and notify"},"sessionId":"d28536443b6e7d3d7547dd1b8e171db7"}} _WD_CreateSession: {"value":{"capabilities":{"acceptInsecureCerts":false,"browserName":"chrome","browserVersion":"76.0.3809.132","chrome":{"chromedriverVersion":"76.0.3809.126 (d80a294506b4c9d18015e755cee48f953ddc3f2f-refs/branch-heads/3809@{#1024})","userDataDir":"C:\\Users\\q\\AppData\\Local\\Temp\\scoped_dir12868_192127786"},"goog:chromeOptions":{"debuggerAddress":"localhost:52561"},"networkConnectionEnabled":false,"pageLoadStrategy":"normal","platformName":"windows nt","proxy":{},"setWindowRect":true,"strictFileInteractability":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"unhandledPromptBehavior":"dismiss and notify"},"sessionId":"d28536443b6e7d3d7547dd1b8e171db7"}} __WD_Post: URL=HTTP://127.0.0.1:9515/session/d28536443b6e7d3d7547dd1b8e171db7/url; $sData={"url":"https://www.facebook.com"} __WD_Post: StatusCode=0; ResponseText={"value":null} _WD_Navigate: {"value":null} __WD_Post: URL=HTTP://127.0.0.1:9515/session/d28536443b6e7d3d7547dd1b8e171db7/element; $sData={"using":"xpath","value":"//input[@id='email']"} __WD_Post: StatusCode=0; ResponseText={"value":{"element-6066-11e4-a52e-4f735466cecf":"da430ef0-15ad-4f8e-ade3-d98cc684b4b7"}} _WD_FindElement: {"value":{"element-6066-11e4-a52e-4f735466cecf":"da430ef0-15ad-4f8e-ade3-d98cc684b4b7"}} _WD_FindElement ==> Webdriver Exception: HTTP status = 0 __WD_Post: URL=HTTP://127.0.0.1:9515/session/d28536443b6e7d3d7547dd1b8e171db7/element//value; $sData={"id":"", "text":"abc"} __WD_Post: StatusCode=0; ResponseText={"value":{"error":"no such element","message":"no such element: Element_id length is invalid\n (Session info: chrome=76.0.3809.132)","stacktrace":"Backtrace:\n\tOrdinal0 [0x00DB7C53+1473619]\n\tOrdinal0 [0x00D3AD71+961905]\n\tOrdinal0 [0x00CC42B3+475827]\n\tOrdinal0 [0x00C66000+90112]\n\tOrdinal0 [0x00C6361D+79389]\n\tOrdinal0 [0x00C7758D+161165]\n\tOrdinal0 [0x00C62626+75302]\n\tOrdinal0 [0x00C777A1+161697]\n\tOrdinal0 [0x00C7E7AB+190379]\n\tOrdinal0 [0x00C7742B+160811]\n\tOrdinal0 [0x00C60AE6+68326]\n\tOrdinal0 [0x00C61BF0+72688]\n\tOrdinal0 [0x00C61B89+72585]\n\tOrdinal0 [0x00D54B37+1067831]\n\tGetHandleVerifier [0x00E56845+506677]\n\tGetHandleVerifier [0x00E565E0+506064]\n\tGetHandleVerifier [0x00E5D188+533624]\n\tGetHandleVerifier [0x00E5701A+508682]\n\tOrdinal0 [0x00D4C226+1032742]\n\tOrdinal0 [0x00D4C09F+1032351]\n\tOrdinal0 [0x00D56A4B+1075787]\n\tOrdinal0 [0x00D56BB3+1076147]\n\tOrdinal0 [0x00D55B65+1071973]\n\tBaseThreadInitThunk [0x76DB0419+25]\n\tRtlGetAppContainerNamedObjectPath [0x7738662D+237]\n\tRtlGetAppContainerNamedObjectPath [0x773865FD+189]\n"}} _WD_ElementAction: {"value":{"error":"no such element","message":"no such element: Element_id length is invalid\n (Ses... _WD_ElementAction ==> Webdriver Exception: {"value":{"error":"no such element","message":"no such element: Element_id length is invalid\n (Session info: chrome=76.0.3809.132)","stacktrace":"Backtrace:\n\tOrdinal0 [0x00DB7C53+1473619]\n\tOrdinal0 [0x00D3AD71+961905]\n\tOrdinal0 [0x00CC42B3+475827]\n\tOrdinal0 [0x00C66000+90112]\n\tOrdinal0 [0x00C6361D+79389]\n\tOrdinal0 [0x00C7758D+161165]\n\tOrdinal0 [0x00C62626+75302]\n\tOrdinal0 [0x00C777A1+161697]\n\tOrdinal0 [0x00C7E7AB+190379]\n\tOrdinal0 [0x00C7742B+160811]\n\tOrdinal0 [0x00C60AE6+68326]\n\tOrdinal0 [0x00C61BF0+72688]\n\tOrdinal0 [0x00C61B89+72585]\n\tOrdinal0 [0x00D54B37+1067831]\n\tGetHandleVerifier [0x00E56845+506677]\n\tGetHandleVerifier [0x00E565E0+506064]\n\tGetHandleVerifier [0x00E5D188+533624]\n\tGetHandleVerifier [0x00E5701A+508682]\n\tOrdinal0 [0x00D4C226+1032742]\n\tOrdinal0 [0x00D4C09F+1032351]\n\tOrdinal0 [0x00D56A4B+1075787]\n\tOrdinal0 [0x00D56BB3+1076147]\n\tOrdinal0 [0x00D55B65+1071973]\n\tBaseThreadInitThunk [0x76DB0419+25]\n\tRtlGetAppContainerNamedObjectPath [0x7738662D+237]\n\tRtlGetAppContainerNamedObjectPath [0x773865FD+189]\n"}} __WD_Post: URL=HTTP://127.0.0.1:9515/session/d28536443b6e7d3d7547dd1b8e171db7/element; $sData={"using":"xpath","value":"//input[@id='pass']"} __WD_Post: StatusCode=0; ResponseText={"value":{"element-6066-11e4-a52e-4f735466cecf":"34387810-dc5e-449e-9406-1f4ad2ea2608"}} _WD_FindElement: {"value":{"element-6066-11e4-a52e-4f735466cecf":"34387810-dc5e-449e-9406-1f4ad2ea2608"}} _WD_FindElement ==> Webdriver Exception: HTTP status = 0 __WD_Post: URL=HTTP://127.0.0.1:9515/session/d28536443b6e7d3d7547dd1b8e171db7/element//value; $sData={"id":"", "text":"xyz"} __WD_Post: StatusCode=0; ResponseText={"value":{"error":"no such element","message":"no such element: Element_id length is invalid\n (Session info: chrome=76.0.3809.132)","stacktrace":"Backtrace:\n\tOrdinal0 [0x00DB7C53+1473619]\n\tOrdinal0 [0x00D3AD71+961905]\n\tOrdinal0 [0x00CC42B3+475827]\n\tOrdinal0 [0x00C66000+90112]\n\tOrdinal0 [0x00C6361D+79389]\n\tOrdinal0 [0x00C7758D+161165]\n\tOrdinal0 [0x00C62626+75302]\n\tOrdinal0 [0x00C777A1+161697]\n\tOrdinal0 [0x00C7E7AB+190379]\n\tOrdinal0 [0x00C7742B+160811]\n\tOrdinal0 [0x00C60AE6+68326]\n\tOrdinal0 [0x00C61BF0+72688]\n\tOrdinal0 [0x00C61B89+72585]\n\tOrdinal0 [0x00D54B37+1067831]\n\tGetHandleVerifier [0x00E56845+506677]\n\tGetHandleVerifier [0x00E565E0+506064]\n\tGetHandleVerifier [0x00E5D188+533624]\n\tGetHandleVerifier [0x00E5701A+508682]\n\tOrdinal0 [0x00D4C226+1032742]\n\tOrdinal0 [0x00D4C09F+1032351]\n\tOrdinal0 [0x00D56A4B+1075787]\n\tOrdinal0 [0x00D56BB3+1076147]\n\tOrdinal0 [0x00D55B65+1071973]\n\tBaseThreadInitThunk [0x76DB0419+25]\n\tRtlGetAppContainerNamedObjectPath [0x7738662D+237]\n\tRtlGetAppContainerNamedObjectPath [0x773865FD+189]\n"}} _WD_ElementAction: {"value":{"error":"no such element","message":"no such element: Element_id length is invalid\n (Ses... _WD_ElementAction ==> Webdriver Exception: {"value":{"error":"no such element","message":"no such element: Element_id length is invalid\n (Session info: chrome=76.0.3809.132)","stacktrace":"Backtrace:\n\tOrdinal0 [0x00DB7C53+1473619]\n\tOrdinal0 [0x00D3AD71+961905]\n\tOrdinal0 [0x00CC42B3+475827]\n\tOrdinal0 [0x00C66000+90112]\n\tOrdinal0 [0x00C6361D+79389]\n\tOrdinal0 [0x00C7758D+161165]\n\tOrdinal0 [0x00C62626+75302]\n\tOrdinal0 [0x00C777A1+161697]\n\tOrdinal0 [0x00C7E7AB+190379]\n\tOrdinal0 [0x00C7742B+160811]\n\tOrdinal0 [0x00C60AE6+68326]\n\tOrdinal0 [0x00C61BF0+72688]\n\tOrdinal0 [0x00C61B89+72585]\n\tOrdinal0 [0x00D54B37+1067831]\n\tGetHandleVerifier [0x00E56845+506677]\n\tGetHandleVerifier [0x00E565E0+506064]\n\tGetHandleVerifier [0x00E5D188+533624]\n\tGetHandleVerifier [0x00E5701A+508682]\n\tOrdinal0 [0x00D4C226+1032742]\n\tOrdinal0 [0x00D4C09F+1032351]\n\tOrdinal0 [0x00D56A4B+1075787]\n\tOrdinal0 [0x00D56BB3+1076147]\n\tOrdinal0 [0x00D55B65+1071973]\n\tBaseThreadInitThunk [0x76DB0419+25]\n\tRtlGetAppContainerNamedObjectPath [0x7738662D+237]\n\tRtlGetAppContainerNamedObjectPath [0x773865FD+189]\n"}} +>21:25:24 AutoIt3.exe ended.rc:0 +>21:25:24 AutoIt3Wrapper Finished. >Exit code: 0 Time: 4.656 Edited September 3, 2019 by AI123 Link to comment Share on other sites More sharing options...
AI123 Posted September 3, 2019 Author Share Posted September 3, 2019 (edited) For testing and to guarantee that there is no masking error that avoids to automatically input data in the facebook fields I commented out the function call of _ChromeSetInputValueById. Instead I do this in the main code: $sButton = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@id='email']") _WD_ElementAction($sSession,$sButton,'abc') $sButton = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@id='pass']") _WD_ElementAction($sSession,$sButton, 'xyz') But the input field isn't filled automatically nevertheless. This is the output I get Now: _WDStartup: OS: WIN_10 WIN32_NT 17763 _WDStartup: AutoIt: 3.3.14.5 _WDStartup: WD.au3: 0.1.0.20 _WDStartup: Driver: C:\Users\q\Downloads\chromedriver_win32_76_0_3809_126\chromedriver.exe _WDStartup: Params: --log-path=C:\Users\q\Downloads\chrome.log _WDStartup: Port: 9515 __WD_Post: URL=HTTP://127.0.0.1:9515/session; $sData={"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true}}}} __WD_Post: StatusCode=0; ResponseText={"value":{"capabilities":{"acceptInsecureCerts":false,"browserName":"chrome","browserVersion":"76.0.3809.132","chrome":{"chromedriverVersion":"76.0.3809.126 (d80a294506b4c9d18015e755cee48f953ddc3f2f-refs/branch-heads/3809@{#1024})","userDataDir":"C:\\Users\\q\\AppData\\Local\\Temp\\scoped_dir14512_1948250108"},"goog:chromeOptions":{"debuggerAddress":"localhost:58885"},"networkConnectionEnabled":false,"pageLoadStrategy":"normal","platformName":"windows nt","proxy":{},"setWindowRect":true,"strictFileInteractability":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"unhandledPromptBehavior":"dismiss and notify"},"sessionId":"44748c14a7c1f273d189486b97ef44a7"}} _WD_CreateSession: {"value":{"capabilities":{"acceptInsecureCerts":false,"browserName":"chrome","browserVersion":"76.0.3809.132","chrome":{"chromedriverVersion":"76.0.3809.126 (d80a294506b4c9d18015e755cee48f953ddc3f2f-refs/branch-heads/3809@{#1024})","userDataDir":"C:\\Users\\q\\AppData\\Local\\Temp\\scoped_dir14512_1948250108"},"goog:chromeOptions":{"debuggerAddress":"localhost:58885"},"networkConnectionEnabled":false,"pageLoadStrategy":"normal","platformName":"windows nt","proxy":{},"setWindowRect":true,"strictFileInteractability":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"unhandledPromptBehavior":"dismiss and notify"},"sessionId":"44748c14a7c1f273d189486b97ef44a7"}} __WD_Post: URL=HTTP://127.0.0.1:9515/session/44748c14a7c1f273d189486b97ef44a7/url; $sData={"url":"https://www.facebook.com"} __WD_Post: StatusCode=0; ResponseText={"value":null} _WD_Navigate: {"value":null} __WD_Post: URL=HTTP://127.0.0.1:9515/session/44748c14a7c1f273d189486b97ef44a7/element; $sData={"using":"xpath","value":"//input[@id='email']"} __WD_Post: StatusCode=0; ResponseText={"value":{"element-6066-11e4-a52e-4f735466cecf":"eff2972d-b63a-4978-a820-664041e138f1"}} _WD_FindElement: {"value":{"element-6066-11e4-a52e-4f735466cecf":"eff2972d-b63a-4978-a820-664041e138f1"}} _WD_FindElement ==> Webdriver Exception: HTTP status = 0 _WD_ElementAction ==> Invalid data type: (Name|Rect|Text|Selected|Enabled|Displayed|Active|Attribute|Property|CSS|Clear|Click|Value|Screenshot) $sCommand=>abc __WD_Post: URL=HTTP://127.0.0.1:9515/session/44748c14a7c1f273d189486b97ef44a7/element; $sData={"using":"xpath","value":"//input[@id='pass']"} __WD_Post: StatusCode=0; ResponseText={"value":{"element-6066-11e4-a52e-4f735466cecf":"e44e4f32-5f4e-42b4-9011-a10e264d9727"}} _WD_FindElement: {"value":{"element-6066-11e4-a52e-4f735466cecf":"e44e4f32-5f4e-42b4-9011-a10e264d9727"}} _WD_FindElement ==> Webdriver Exception: HTTP status = 0 _WD_ElementAction ==> Invalid data type: (Name|Rect|Text|Selected|Enabled|Displayed|Active|Attribute|Property|CSS|Clear|Click|Value|Screenshot) $sCommand=>xyz +>22:32:44 AutoIt3.exe ended.rc:0 +>22:32:44 AutoIt3Wrapper Finished. >Exit code: 0 Time: 4.793 What could be the error? Edited September 3, 2019 by AI123 Link to comment Share on other sites More sharing options...
Danp2 Posted September 3, 2019 Share Posted September 3, 2019 12 minutes ago, AI123 said: _WD_FindElement ==> Webdriver Exception: HTTP status = 0 Unsure why, but _WD_FindElement is returning an error. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Danp2 Posted September 3, 2019 Share Posted September 3, 2019 @AI123 You need to figure out why __WD_Post is returning an HTTP result of 0. This should be 200 for a successful execution. Is there something unusual about your setup? What version of Windows? Is it a non-English version? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Danp2 Posted September 3, 2019 Share Posted September 3, 2019 You may want to check the version of WinHttp UDF as well (latest on Github is 1.6.4.2) Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
AI123 Posted September 3, 2019 Author Share Posted September 3, 2019 1 hour ago, Danp2 said: @AI123 You need to figure out why __WD_Post is returning an HTTP result of 0. This should be 200 for a successful execution. Is there something unusual about your setup? What version of Windows? Is it a non-English version? It's Windows 10 64bit German Version. Link to comment Share on other sites More sharing options...
AI123 Posted September 3, 2019 Author Share Posted September 3, 2019 (edited) 1 hour ago, Danp2 said: You may want to check the version of WinHttp UDF as well (latest on Github is 1.6.4.2) I had an older version 1.6.2.5 from here https://github.com/dedmen/Autoit/blob/master/APIS/WinHttp.au3. I now downloaded newest version 1.6.4.2 from here https://github.com/dragana-r/autoit-winhttp/blob/master/WinHttp.au3 (also the https://github.com/dedmen/Autoit/blob/master/APIS/WinHttpConstants.au3) and copied the files in my AutoIt include directory. Now the script is working. Thank you very much. Edited September 3, 2019 by AI123 Danp2 1 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