samibb Posted November 18 Share Posted November 18 (edited) Dear @Danp2 i am facing this error and i could not get connect to exist session. expandcollapse popupFunc SetupChrome() ConsoleWrite('@@ (1881) :(' & @MIN & ':' & @SEC & ') SetupChrome()' & @CR) ;### Trace Function ;Local $IPORT = _WD_GETFREEPORT(9515,5600) ProcessClose("chromedriver.exe") _WD_Shutdown() If Number(StringLeft(_WD_GetBrowserVersion('CHROME'),3)) < 126 Then _WD_Option('Driver', 'chromedriver.exe') Local $IPORT = _WD_GETFREEPORT(9515,5600) ;MsgBox(0,$IPORT,Number(StringLeft(_WD_GetBrowserVersion('CHROME'),3)) ) _WD_Option('Port',$IPORT); _WD_Option('DriverParams', '--verbose --log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"debuggerAddress": "localhost:9222"}}}}' EndIf If Number(StringLeft(_WD_GetBrowserVersion('CHROME'),3)) > 125 Then _WD_Option('Driver', 'chromedriver.exe') Local $iPort = _WD_GetFreePort(5000, 5600) ; ;MsgBox(0,$iPort,Number(StringLeft(_WD_GetBrowserVersion('CHROME'),3))) _WD_Option('Port', $iPort) _WD_Option('DriverParams', '--port=' & $iPort & ' --verbose --log-path="' & "C:\Users\HP\Desktop\AutoIt" & '\chrome.log') ;_WD_Option('DriverParams', '--verbose --log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"debuggerAddress": "localhost:9222"}}}}' ;MsgBox(0,'',$sDesiredCapabilities) EndIf _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) EndFunc ********************************************************************************************************************************************** >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\11003813\Desktop\AutoIT\test99.au3" /UserParams +>09:46:38 Starting AutoIt3Wrapper (21.316.1639.1) from:SciTE.exe (4.4.6.0) Keyboard:00000409 OS:WIN_10/2009 CPU:X64 OS:X64 Environment(Language:0409) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\11003813\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\11003813\AppData\Local\AutoIt v3\SciTE >Running AU3Check (3.3.16.1) from:C:\Program Files (x86)\AutoIt3 input:C:\Users\11003813\Desktop\AutoIT\test99.au3 +>09:46:39 AU3Check ended.rc:0 >Running:(3.3.16.1):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "C:\Users\11003813\Desktop\AutoIT\test99.au3" +>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+BREAK to Stop. @@ (1881) :(46:39) SetupChrome() _WD_GetBrowserPath ==> Success [0 / 0] : Parameters: Browser=CHROME _WD_GetBrowserVersion ==> Success [0 / 0] : Parameters: Browser=CHROME _WD_GetBrowserPath ==> Success [0 / 0] : Parameters: Browser=CHROME _WD_GetBrowserVersion ==> Success [0 / 0] : Parameters: Browser=CHROME _WD_Option ==> Success [0] : Parameters: Option=Driver Value=chromedriver.exe _WD_GetFreePort ==> Success [0 / 5000] : Parameters: MinPort=5000 MaxPort=5600 _WD_Option ==> Success [0] : Parameters: Option=Port Value=5000 _WD_Option ==> Success [0] : Parameters: Option=DriverParams Value=--port=5000 --verbose --log-path="C:\Users\HP\Desktop\AutoIt\chrome.log _WD_GetFreePort ==> Success [0 / 5000] : Parameters: MinPort=5000 MaxPort=Default _WD_IsLatestRelease ==> General Error [1] _WD_Startup: OS: WIN_10 X64 19045 _WD_Startup: AutoIt: 3.3.16.1 _WD_Startup: Webdriver UDF: 1.4.0 (Update status unknown [1]) _WD_Startup: WinHTTP: 1.6.4.2 _WD_Startup: Driver: chromedriver.exe (64 Bit) _WD_Startup: Params: --port=5000 --verbose --log-path="C:\Users\HP\Desktop\AutoIt\chrome.log _WD_Startup: Port: 5000 _WD_Startup: Command: "chromedriver.exe" --port=5000 --verbose --log-path="C:\Users\HP\Desktop\AutoIt\chrome.log _WD_Startup ==> General Error [1] : Error launching WebDriver! __WD_Post ==> Send / Recv error [6] : HTTP status = 0 _WD_CreateSession ==> Webdriver Exception [10] +>09:46:44 AutoIt3.exe ended.rc:0 +>09:46:44 AutoIt3Wrapper Finished. >Exit code: 0 Time: 6.198 test99.au3 Edited November 18 by samibb Link to comment Share on other sites More sharing options...
Danp2 Posted November 18 Share Posted November 18 Did you check the wiki? https://www.autoitscript.com/wiki/WebDriver#FAQ Did you launch the browser with any special parameters? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
samibb Posted November 20 Author Share Posted November 20 Yes "C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 Link to comment Share on other sites More sharing options...
Danp2 Posted November 20 Share Posted November 20 On 11/17/2024 at 11:55 PM, samibb said: _WD_Option('DriverParams', '--port=' & $iPort & ' --verbose --log-path="' & "C:\Users\HP\Desktop\AutoIt" & '\chrome.log') I suspect that the issue is associated with this line. Hint: If the path isn't valid, then chromedriver won't load correctly. samibb 1 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
samibb Posted November 21 Author Share Posted November 21 Really thank you🤩 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