Repository navigation
Closed
Description
Hers is the code
public function testOperaBrowser()
{
$desired_capabilities = DesiredCapabilities::opera();
$desired_capabilities->setCapability('acceptSslCerts', true);
$driver = RemoteWebDriver::create('http://localhost:4444/wd/hub', $desired_capabilities);
$driver->get('http://docs.seleniumhq.org/');
$driver->wait(10);
echo "The title is '" . $driver->getTitle() . "'\n";
$driver->quit();
}
Error Message
/usr/bin/php "/Users/smunukuntla/Documents/Selenium PHP/vendor/phpunit/phpunit/phpunit" --no-configuration --filter "/::testOperaBrowser( .*)?$/" Selenium_Drivers_Implementation "/Users/smunukuntla/Documents/Selenium PHP/tests/1_Selenium_Drivers_Browsers/Selenium_Drivers_Implementation.php" --teamcity
Testing started at 4:53 PM ...
PHPUnit 5.5.7 by Sebastian Bergmann and contributors.
Curl error thrown for http POST to /session with params: {"desiredCapabilities":{"browserName":"opera","platform":"ANY","acceptSslCerts":true}}
Operation timed out after 30004 milliseconds with 0 bytes received
/Users/smunukuntla/Documents/Selenium PHP/vendor/facebook/webdriver/lib/Exception/WebDriverException.php:92
/Users/smunukuntla/Documents/Selenium PHP/vendor/facebook/webdriver/lib/Remote/HttpCommandExecutor.php:320
/Users/smunukuntla/Documents/Selenium PHP/vendor/facebook/webdriver/lib/Remote/RemoteWebDriver.php:100
/Users/smunukuntla/Documents/Selenium PHP/tests/1_Selenium_Drivers_Browsers/Selenium_Drivers_Implementation.php:51
Metadata
Metadata
Assignees
Labels
No labels
Activity
OndraM commentedon Oct 15, 2016
Hi @smunukuntla, what version of Opera do you use? If it is one of the latest blink-based Opera (version >12), you have to use
operablinkas name of the browser. The opera v12 and older are no longer supported by Selenium Server.The support for the Opera-Blink is currently not builtin to php-webdriver helper functions, but you can easily do it manually:
Due to bug in OperaChromiumDriver you also have to define path to opera binary (operasoftware/operachromiumdriver#9), like this:
With this set-up and with Opera 40.0.2308.54 it does work for me. However, I created new issue (#344) to track the built-in support of Opera in php-webdriver.
salarmehr commentedon Jun 30, 2017
@OndraM Trying this in Windows I get: