CaptainBeardsEyesBeard Posted January 20 Posted January 20 (edited) Hi My webriver isn't startingย ย The output I currently get isย _WD_Option ==> Success [0] : Parameters: Option=Driver Value=H:\WebDriverUDF\chromedriver.exe _WD_Option ==> Success [0] : Parameters: Option=Port Value=9515 _WD_Option ==> Success [0] : Parameters: Option=DriverParams Value=--log-path="H:\AutoIT Scripts\AutomationTest\Framework\chrome.log" _WD_GetFreePort ==> Success [0 / 9515] : Parameters: MinPort=9515 MaxPort=Default _WD_IsLatestRelease ==> Success [0] : True _WD_Startup: OS: WIN_10 X64 19045 _WD_Startup: AutoIt: 3.3.16.1 _WD_Startup: Webdriver UDF: 1.4.0 (Up to date) _WD_Startup: WinHTTP: 1.6.4.2 _WD_Startup: Driver: H:\Quality Assurance\WebDriverUDF\chromedriver.exe (64 Bit) _WD_Startup: Params: --log-path="H:\AutoIT Scripts\AutomationTest\Framework\chrome.log" _WD_Startup: Port: 9515 _WD_Startup: Command: "H:\WebDriverUDF\chromedriver.exe" --log-path="H:\\AutoIT Scripts\AutomationTest\Framework\chrome.log" _WD_Startup ==> Success [0] __WD_Post ==> Send / Recv error [6] : HTTP status = 0 _WD_CreateSession ==> Webdriver Exception [10] __WD_Delete ==> Send / Recv error [6] : HTTP status = 0 _WD_DeleteSession ==> Webdriver Exception [10] : Error occurs when trying to delete session >Exit code: 0 ย Edited January 20 by CaptainBeardsEyesBeard
SOLVE-SMART Posted January 20 Posted January 20 HI @CaptainBeardsEyesBeardย ๐ , I strongly guess you missed to add the port also to the DriverParams option like so in your case: _WD_Option('DriverParams', '--port=9515 --log-path="H:\AutoIT Scripts\AutomationTest\Framework\chrome.log') Also next time please show your capabilities string (or json) for a better analysis, thanks ๐ค . Best regards Sven ==> AutoIt related: ๐ GitHub, ๐ Discord Server Spoiler ๐ย Au3Forums ๐ฒ AutoIt (en) Cheat Sheet ๐ AutoIt limits/defaults ๐ Code Katas: [...] (comming soon) ๐ญ Collection of GitHub users with AutoIt projects ๐ย False-Positives ๐ฎย Me on GitHub ๐ฌย Opinion about new forum sub category ๐ย UDF wiki list โย VSCode-AutoItSnippets ๐ย WebDriver FAQs ๐จโ๐ซย WebDriver Tutorial (coming soon)
CaptainBeardsEyesBeard Posted January 20 Author Posted January 20 My setup chrome function is which includes the port no?ย _WD_Option('Driver', 'H:\Quality Assurance\WebDriverUDF\chromedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true }}}}' ย
SOLVE-SMART Posted January 20 Posted January 20 You need the port at two places: _WD_Option('Port', <PORT>) _WD_Option('DriverParams', --port=<PORT> ...) See my post above. Simple replace ... _WD_Option('DriverParams', '--log-path="' & @ScriptDir & '\chrome.log"') by this ... _WD_Option('DriverParams', '--port=9515 --log-path="' & @ScriptDir & '\chrome.log"') ... and it should work. Otherwise there are more issues, but I don't think so ๐ . Best regards Sven Danp2 1 ==> AutoIt related: ๐ GitHub, ๐ Discord Server Spoiler ๐ย Au3Forums ๐ฒ AutoIt (en) Cheat Sheet ๐ AutoIt limits/defaults ๐ Code Katas: [...] (comming soon) ๐ญ Collection of GitHub users with AutoIt projects ๐ย False-Positives ๐ฎย Me on GitHub ๐ฌย Opinion about new forum sub category ๐ย UDF wiki list โย VSCode-AutoItSnippets ๐ย WebDriver FAQs ๐จโ๐ซย WebDriver Tutorial (coming soon)
SEKOMD Posted January 22 Posted January 22 On 1/20/2025 at 4:36 PM, SOLVE-SMART said: by this ... Please tell me why I need to specify the port twice? _WD_Option('Port', '9515') _WD_Option('DriverParams', '--port=9515 --log-path="' & @ScriptDir & '\chrome.log"') sorry my English!
SOLVE-SMART Posted January 22 Posted January 22 Hi @SEKOMDย ๐ , chomium based browsers like Chrome or MSEdge are try to use a random port on opening (since ~Aug 2024). Googles explanation why they changed the behavior can be found here. You simply need the port in DriverParams to override the intended behavior to randomly find a available server port, by supplying the desired port number as a parameter. On 8/23/2024 at 11:57 PM, Danp2 said: The _WD_Option('Port', 9515) line lets the webdriver UDF know the port number to use to communicate with the webdriver console [...] I guess this should be explanation enough, right ๐ ? Best regards Sven SEKOMD 1 ==> AutoIt related: ๐ GitHub, ๐ Discord Server Spoiler ๐ย Au3Forums ๐ฒ AutoIt (en) Cheat Sheet ๐ AutoIt limits/defaults ๐ Code Katas: [...] (comming soon) ๐ญ Collection of GitHub users with AutoIt projects ๐ย False-Positives ๐ฎย Me on GitHub ๐ฌย Opinion about new forum sub category ๐ย UDF wiki list โย VSCode-AutoItSnippets ๐ย WebDriver FAQs ๐จโ๐ซย WebDriver Tutorial (coming soon)
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