We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calling the \WebDriver\WebDriver::session is always attempting to create a non-W3C compatible session for Selenium 3/4.
\WebDriver\WebDriver::session
An exception, that is thrown upon a W3C session creation attempt (which is immediately caught) looks like this:
Expected to read a START_COLLECTION but instead have: START_MAP. Last 30 characters read: {"capabilities":{"firstMatch":, next 128 characters to read: {"browserName":"chrome","name":"Behat Test","goog:chromeOptions":{"binary":"\/path\/to\/custom\/browser-binary Build info: version: '4.17.0', revision: 'e52b1be057*' Driver info: driver.version: unknown
The \WebDriver\WebDriver::session method arguments:
chrome
array ( 'browserName' => 'chrome', 'name' => 'Behat Test', 'goog:chromeOptions' => array ( 'binary' => '/path/to/custom/browser-binary, ), )
null
Replace
// default to W3C WebDriver API $firstMatch = $desiredCapabilities ?: array(); $firstMatch[] = array('browserName' => Browser::CHROME);
with
$firstMatch = $desiredCapabilities ? array($desiredCapabilities) : array(); $firstMatch[] = array('browserName' => Browser::CHROME);
Done in #135.
After fixing the above problem the exception message is now different:
Illegal key values seen in w3c capabilities: [name]
Covert desired/required capabilities array using an approach similar to https://github.com/php-webdriver/php-webdriver/blob/5d8e66ff849b5614015d35e99d759252e371ce26/lib/Remote/DesiredCapabilities.php#L206-L265 .
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Problem 1 - incorrectly built $parameters array
Calling the
\WebDriver\WebDriver::session
is always attempting to create a non-W3C compatible session for Selenium 3/4.An exception, that is thrown upon a W3C session creation attempt (which is immediately caught) looks like this:
The
\WebDriver\WebDriver::session
method arguments:chrome
null
Solution
Replace
with
Done in #135.
Problem 2 - the non-W3C capabilities aren't converted to W3C capabilities
After fixing the above problem the exception message is now different:
Solution
Covert desired/required capabilities array using an approach similar to https://github.com/php-webdriver/php-webdriver/blob/5d8e66ff849b5614015d35e99d759252e371ce26/lib/Remote/DesiredCapabilities.php#L206-L265 .
The text was updated successfully, but these errors were encountered: