Jump to content

Recommended Posts

Posted (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 by CaptainBeardsEyesBeard
Posted

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)

Posted

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 }}}}'

ย 

Posted

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

==> 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)

Posted
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!

Posted

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.

  1. 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.
  2. 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

==> 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)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...