Selenium PHP Web Driver (Facebook) issue - php

I have a problem with web driver startup for selenium on Ubuntu 14.04.
I've already installed Oracle JDK and Selenium Standalone Server, also have no issue with running Selenium Standalone Server on Ubuntu 14.04 (I use cloud9 VDS).
But when I try to run this example an error occurs (Unable to create new service):
Fatal error: Uncaught exception 'Facebook\WebDriver\Exception\SessionNotCreatedException' with message ' in /home/ubuntu/workspace/php-web-driver-test/vendor/facebook/webdriver/lib/Exception/WebDriverException.php on line 154 Facebook\WebDriver\Exception\SessionNotCreatedException: Unable to create new service: ChromeDriverService Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T15:15:08.936Z' System info: host: 'user-selenium-6138185', ip: '173.18.0.42', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.80-c9', java.version: '1.8.0_171' Driver info: driver.version: unknown in /home/ubuntu/workspace/php-web-driver-test/vendor/facebook/webdriver/lib/Exception/WebDriverException.php on line 154 Call Stack: 0.0005 234144 1. {main}() /home/ubuntu/workspace/php-web-driver-test/test-1.php:0 0.0020 307072 2. Facebook\WebDriver\Remote\RemoteWebDriver::create() /home/ubuntu/workspace/php-web-driver-test/test-1.php:11 0.0030 387224 3. Facebook\WebDriver\Remote\HttpCommandExecutor->execute() /home/ubuntu/workspace/php-web-driver-test/vendor/facebook/webdriver/lib/Remote/RemoteWebDriver.php:126 0.1971 486960 4. Facebook\WebDriver\Exception\WebDriverException::throwException() /home/ubuntu/workspace/php-web-driver-test/vendor/facebook/webdriver/lib/Remote/HttpCommandExecutor.php:320
Also there is some response from Selenium Server:
06:04:33.192 INFO [GridLauncherV3.launch] - Selenium build info: version: '3.12.0', revision: '7c6e0b3'
06:04:33.194 INFO [GridLauncherV3$1.launch] - Launching a standalone Selenium Server on port 4444
2018-05-16 06:04:33.330:INFO::main: Logging initialized #566ms to org.seleniumhq.jetty9.util.log.StdErrLog
06:04:33.641 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 4444
06:04:42.085 INFO [ActiveSessionFactory.apply] - Capabilities are: Capabilities {browserName: chrome}
06:04:42.088 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
I don't know why such an error occurs, may be I have to force browser headless mode option or specify exact firefox or chrome location for web driver?

Related

Run tests using Behat and Mink Selenium2 driver for Microsoft Edge browser in Selenium 4

Is it possible to run tests on Edge browser using Mink Selenium2 driver and Selenium 4 grid ?
I've tried using:
default:
suites:
default:
filters:
tags: ~#wip
paths: ['%paths.base%/storage/features']
gherkin:
cache: ~
extensions:
Behat\MinkExtension:
base_url: http://www.google.com
javascript_session: selenium2
browser_name: edge
selenium2:
capabilities:
browserName: MicrosoftEdge
browser: edge
extra_capabilities:
edgeOptions:
args:
- "--no-sandbox"
- "--disable-dev-shm-usage"
- "--headless"
- "--disable-gpu"
- "--dns-prefetch-disable"
- "--disable-setuid-sandbox"
- "--window-size=1920,1080"
- "--remote-debugging-port=9222"
But this gives me some errors saying that the DevToolsActivePort file does not exist:
13:38:41.079 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding
13:38:41.086 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
13:38:41.942 INFO [NodeOptions.getSessionFactories] - Detected 8 available processors
13:38:41.970 INFO [NodeOptions.discoverDrivers] - Discovered 3 driver(s)
13:38:41.997 INFO [NodeOptions.report] - Adding Edge for {"browserName": "MicrosoftEdge"} 8 times
13:38:41.999 INFO [NodeOptions.report] - Adding Chrome for {"browserName": "chrome"} 8 times
13:38:42.000 INFO [NodeOptions.report] - Adding Firefox for {"browserName": "firefox"} 8 times
13:38:42.039 INFO [Node.<init>] - Binding additional locator mechanisms: id, relative, name
13:38:42.067 INFO [LocalDistributor.add] - Added node fb3c75f0-847d-475d-88b0-dea6893c09c2 at http://172.19.0.7:4444. Health check every 120s
13:38:42.068 INFO [GridModel.setAvailability] - Switching node fb3c75f0-847d-475d-88b0-dea6893c09c2 (uri: http://172.19.0.7:4444) from DOWN to UP
13:38:42.251 INFO [Standalone.execute] - Started Selenium Standalone 4.0.0 (revision 3a21814679): http://172.19.0.7:4444
Starting MSEdgeDriver 95.0.1020.30 (09f7018e2a65a55dea3a0a261efca40ae03471ed) on port 36979
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping MSEdgeDriver safe.
MSEdgeDriver was started successfully.
[1634828868.563][SEVERE]: bind() failed: Cannot assign requested address (99)
15:07:48.749 WARN [SeleniumSpanExporter$1.lambda$export$0] - {"traceId": "49c55d39b0c26898585047f89ad32f33","eventTime": 1634828868685689900,"eventName": "exception","attributes": {"driver.url": "http:\u002f\u002flocalhost:36979","exception.message": "Error while creating session with the driver service. Stopping driver service: Could not start a new session. Response code 500. Message: unknown error: MSEdge failed to start: exited abnormally.\n (unknown error: DevToolsActivePort file doesn't exist)\n (The process started from msedge location \u002fusr\u002fbin\u002fmicrosoft-edge is no longer running, so MSEdgeDriver is assuming that MSEdge has crashed.)\nBuild info: version: '4.0.0', revision: '3a21814679'\nSystem info: host: 'dee4c77efe99', ip: '172.19.0.7', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.25-linuxkit', java.version: '11.0.11'\nDriver info: driver.version: unknown","exception.stacktrace": "org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: unknown error: MSEdge failed to start: exited abnormally.\n (unknown error: DevToolsActivePort file doesn't exist)\n (The process started from msedge location \u002fusr\u002fbin\u002fmicrosoft-edge is no longer running, so MSEdgeDriver is assuming that MSEdge has crashed.)\nBuild info: version: '4.0.0', revision: '3a21814679'\nSystem info: host: 'dee4c77efe99', ip: '172.19.0.7', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.25-linuxkit', java.version: '11.0.11'\nDriver info: driver.version: unknown\n\tat org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)\n\tat org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:84)\n\tat org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:62)\n\tat org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply(DriverServiceSessionFactory.java:131)\n\tat org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply(DriverServiceSessionFactory.java:65)\n\tat org.openqa.selenium.grid.node.local.SessionSlot.apply(SessionSlot.java:143)\n\tat org.openqa.selenium.grid.node.local.LocalNode.newSession(LocalNode.java:315)\n\tat org.openqa.selenium.grid.distributor.local.LocalDistributor.startSession(LocalDistributor.java:513)\n\tat org.openqa.selenium.grid.distributor.local.LocalDistributor.newSession(LocalDistributor.java:440)\n\tat org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable.handleNewSessionRequest(LocalDistributor.java:648)\n\tat org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable.lambda$run$1(LocalDistributor.java:612)\n\tat java.base\u002fjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base\u002fjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat java.base\u002fjava.lang.Thread.run(Thread.java:829)\n","exception.type": "org.openqa.selenium.SessionNotCreatedException","logger": "org.openqa.selenium.grid.node.config.DriverServiceSessionFactory","session.capabilities": "{\"browserName\": \"MicrosoftEdge\"}\n"}}```
is there any way to make this work ?
Please make sure you have
127.0.0.1 localhost
in your /etc/hosts file.
To check it, you should go to the terminal and run
sudo vi /etc/hosts
type your user password and paste
127.0.0.1 localhost
to an empty row.
Additionally, please make sure you have ChromeDriver -or the driver of the browser you intend to use- is installed and your program knows the path of ChromeDriver.
You can follow the steps explained here https://www.browserstack.com/guide/run-selenium-tests-using-selenium-chromedriver.
For DevToolsActivePort error try another workaround: add --remote-debugging-port=
I tried a different version of Selenium server with Edge, including version 4, till version 3.5; it is working fine, and above, it gives different errors. I can see that Selenium 4 is in alpha release at the Maven repository, and all other versions were released in October 2021. I would recommend that you use an earlier version for some time. You can refer to this article for the configuration of Edge with Behat Mink Selenium 2.

Javascript testing a Symfony 3 application with Mink and Selenium

I am trying to test some javascript functionality in my Symfony Application. I tried looking at Mink for this:
http://mink.behat.org/en/latest/.
I ran a composer require for behat/mink, behat/mink-goutte-driver, and behat/mink-selenium2-driver.
I then tried to install Selenium in my ubuntu 16.04 dev enviroment.
I've got a bash script that installs java8, selenium 3.9, openjdk-8-jdk-headless, firefox, xvfb and geckodriver 0.18.0. I seem to start up the selenium server OK.
However, when I then try to start a session with Mink in my tests, I am seeing the following:
Behat\Mink\Exception\DriverException: Could not open connection: Unable to find a matching set of capabilities
Build info: version: '3.9.0', revision: '698b3178f0', time: '2018-02-05T14:56:13.134Z'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.60-linuxkit-aufs', java.version: '1.8.0_161'
Driver info: driver.version: unknown
Caused by
WebDriver\Exception\SessionNotCreated: Unable to find a matching set of capabilities
Build info: version: '3.9.0', revision: '698b3178f0', time: '2018-02-05T14:56:13.134Z'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.60-linuxkit-aufs', java.version: '1.8.0_161'
Driver info: driver.version: unknown
I'm trying to start my session in my test class like this:
// Choose a Mink driver. More about it in later chapters.
$driver = new \Behat\Mink\Driver\Selenium2Driver();
$session = new \Behat\Mink\Session($driver);
// start the session
$session->start();
I assume my problem is to do with the versions of java/firefox/selenium/ geckodriver incompatible with each other? But I can't seem to be able to fix it by trying out other versions... Is anyone able to help?
(This is my first ever question here, so let me know if if isn't great and I will try to improve it!)

Unable to run php selenium webdriver for firefox 55

In my ubuntu 16.04, When i run php webdriver sample, it open selenium home page, and in console it throws following error
PHP Fatal error: Uncaught Facebook\WebDriver\Exception\UnrecognizedExceptionException: Failed to convert secure to boolean
Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:54:15.039Z'
System info: host: 'nest-aspire-e5-575', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.10.0-32-generic', java.version: '1.8.0_144'
Driver info: driver.version: unknown in /home/nest/selenium/vendor/facebook/webdriver/lib/Exception/WebDriverException.php:158
Stack trace: #0 /home/nest/selenium/vendor/facebook/webdriver/lib/Remote/HttpCommandExecutor.php(320): Facebook\WebDriver\Exception\WebDriverException::throwException(61, 'Failed to conve...', Array) #1 /home/nest/selenium/vendor/facebook/webdriver/lib/Remote/RemoteWebDriver.php(535): Facebook\WebDriver\Remote\HttpCommandExecutor->execute(Object(Facebook\WebDriver\Remote\WebDriverCommand)) #2 /home/nest/selenium/vendor/facebook/webdriver/lib/Remote/RemoteExecuteMethod.php(40): Facebook\WebDriver\Remote\RemoteWebDriver->e in /home/nest/selenium/vendor/facebook/webdriver/lib/Exception/WebDriverException.php on line 158
Configuration
PHP 7.0.22-0ubuntu0.16.04.1 (cli) ( NTS )
Firefox 55.0.2 (64-bit)
geckodriver-v0.18.0-linux64
selenium-server-standalone-3.5.3
Output of java -Dwebdriver.gecko.driver="/home/nest/selenium/geckodriver" -jar selenium-server-standalone-3.5.3.jar
06:48:12.855 INFO - Selenium build info: version: '3.5.3', revision: 'a88d25fe6b'
06:48:12.856 INFO - Launching a standalone Selenium Server
2017-09-10 06:48:12.872:INFO::main: Logging initialized #223ms to org.seleniumhq.jetty9.util.log.StdErrLog
06:48:12.916 INFO - Driver class not found: com.opera.core.systems.OperaDriver
06:48:12.940 INFO - Driver provider class org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform LINUX
06:48:12.940 INFO - Driver provider class org.openqa.selenium.edge.EdgeDriver registration is skipped:
registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform LINUX
06:48:12.940 INFO - Driver provider class org.openqa.selenium.safari.SafariDriver registration is skipped:
registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform LINUX
06:48:12.962 INFO - Using the passthrough mode handler
2017-09-10 06:48:12.986:INFO:osjs.Server:main: jetty-9.4.5.v20170502
2017-09-10 06:48:13.017:WARN:osjs.SecurityHandler:main: ServletContext#o.s.j.s.ServletContextHandler#18eed359{/,null,STARTING} has uncovered http methods for path: /
2017-09-10 06:48:13.021:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler#18eed359{/,null,AVAILABLE}
2017-09-10 06:48:13.034:INFO:osjs.AbstractConnector:main: Started ServerConnector#1c7348f{HTTP/1.1,[http/1.1]}{0.0.0.0:4444}
2017-09-10 06:48:13.035:INFO:osjs.Server:main: Started #386ms
06:48:13.035 INFO - Selenium Server is up and running
2017-09-10 06:48:29.920:INFO:osjshC.ROOT:qtp1227229563-10: org.openqa.selenium.remote.server.WebDriverServlet-1d057a39: Initialising WebDriverServlet
06:48:29.991 INFO - Binding default provider to: org.openqa.selenium.chrome.ChromeDriverService
06:48:29.992 INFO - Found handler: org.openqa.selenium.remote.server.BeginSession#4c16c489
06:48:29.995 INFO - /session: Executing POST on /session (handler: BeginSession)
06:48:30.056 INFO - Capabilities are: Capabilities {browserName=firefox, platformName=ANY, platform=ANY, firefox_profile=UEsDBBQAAAAAAA42Kkvf9RXUMgA..., }
06:48:30.057 INFO - Capabilities {browserName=firefox, platformName=ANY, platform=ANY, firefox_profile=UEsDBBQAAAAAAA42Kkvf9RXUMgA..., } matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.firefox.GeckoDriverService)
06:48:30.057 INFO - Capabilities {browserName=firefox, platformName=ANY, platform=ANY, firefox_profile=UEsDBBQAAAAAAA42Kkvf9RXUMgA..., } matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
1505006310485 geckodriver INFO geckodriver 0.18.0
1505006310509 geckodriver INFO Listening on 127.0.0.1:11793
1505006311757 geckodriver::marionette INFO Starting browser /usr/bin/firefox with args ["-marionette"]
1505006312726 Marionette INFO Enabled via --marionette
1505006316997 Marionette INFO Listening on port 38555
JavaScript error: chrome://marionette/content/server.js, line 337: NS_ERROR_SOCKET_ADDRESS_IN_USE: Component returned failure code: 0x804b0036 (NS_ERROR_SOCKET_ADDRESS_IN_USE) [nsIServerSocket.initSpecialConnection]
1505006317173 Marionette DEBUG loaded listener.js
06:48:37.478 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession#51dd308a
06:48:37.480 INFO - Handler thread for session 8505af40-68e2-4bb2-9b42-86e6ee81309f (firefox): Executing POST on /session/8505af40-68e2-4bb2-9b42-86e6ee81309f/url (handler: ServicedSession)
1505006317551 Marionette DEBUG Received DOM event "beforeunload" for "about:blank"
1505006318275 Marionette DEBUG Received DOM event "pagehide" for "about:blank"
1505006318277 Marionette DEBUG Received DOM event "unload" for "about:blank"
1505006319120 Marionette DEBUG Received DOM event "DOMContentLoaded" for "http://www.seleniumhq.org/"
1505006320699 Marionette DEBUG Received DOM event "pageshow" for "http://www.seleniumhq.org/"
06:48:40.802 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession#51dd308a
06:48:40.804 INFO - Handler thread for session 8505af40-68e2-4bb2-9b42-86e6ee81309f (firefox): Executing DELETE on /session/8505af40-68e2-4bb2-9b42-86e6ee81309f/cookie (handler: ServicedSession)
06:48:40.870 INFO - Found handler: org.openqa.selenium.remote.server.ServicedSession#51dd308a
06:48:40.872 INFO - Handler thread for session 8505af40-68e2-4bb2-9b42-86e6ee81309f (firefox): Executing POST on /session/8505af40-68e2-4bb2-9b42-86e6ee81309f/cookie (handler: ServicedSession)
You have to set the path of geckodriver I guess:
java -Dwebdriver.gecko.driver="C:\Users\Dev\geckodriver-v0.11.1\geckodriver.exe" -jar C:\wamp\bin\php
\php5.6.25\selenium-server-standalone-3.0.1.jar

moveMouse() selenium gives error

I have used selenium 2.53.3 with nodejs.
to move mouse to particular button I have used
mouseMove(elem) function. ex:
driver.actions().mouseMove(elem).click().perform();
Some time it works and some time it not, what is the matter.
Some time I have got following error:
POST /session/67809eeb-fa66-489d-84de-ab8426e6c796/moveto did not match a known command Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700' System info: host: '185-129-70-172', ip: '185.129.70.172', os.name: 'windows', os.arch: 'x86', os.version: '6.2', java.version: '1.8.0_101' Driver info: org.openqa.selenium.firefox.FirefoxDriver Capabilities [{raisesAccessibilityExceptions=false, browserstack.selenium.jar.version=3.0.1, appBuildId=20161104212021, moz:firefoxOptions={args=[], profile=UEsDBBQACAgIAKQ4MEoAAAAAAAAAAAAAAAAHAAAAdXNlci5qc51Xy27jNhTd9ysKr1qgZpNJZ9Ou0kwGKDBoinGDWRIUeWUxpkiWD8v++15S0vilh52VJZnkfZ1z72H04Kh1UP60KJxp8I14VkJ+lnpNaqYa5oCAZoUCsfjlx5IpDz//8UM87BQs4BprXEhbKmAqVO07wUVbyWf295YrUBbco7WeaNjik9+gN1v413ySfoN7F8xaJTkL0uhfd8rvFqcHaQiNcRtShWCJraSv9sv0t2XeLxXodajwlA8fPw7bd8AE/ggIwAOIz9L58IhBcQW4Lbh4HrepMUE7yitnaqCeO2kDdVHTIOu05eFu2FBghSeYV/2in5TxMJ0WYRqtDBNoS7N1qlBlmm8V6BWmPaV8eLtFp2zwyRitjWBqpoiwDcYoT8A547jR3qjjul2G7+VaG41Zq6EuwK3yq5+OxYP3WDwfDILKgY+YtxIdpdwxX90OD2NBf5a5PnPg6I9RUrf7KOwCOM1UwsTNiC4TOr5GPexzA4VwEp2kjHNAVESNCfSIKsrBhZksCemtYnsQz/d3q78NIjAF+NvwYvwkXvQ3qREn/v6OSLRkXr9+ySkpTAy/F4rpzeISu21ElClF3zxmIzkq2xJeVntnJZYN15KmkgGU9AEP+C9KN4aoBKeNDKRjZY9eDC5hatDI9xoxrAwSaRqyPuE/WlIh+yyeTRtQPDExulTTxVnIqdw6o49EixUGojG15f4Vl4wYAB6dDPvMVbqV0CAcaC13IDIJqdF8hLwTCIo2sfl5MrLecInYxifig5M8UOPkWmpqDQJ9P40hDQ0yn3SpmADCiaPtySR9XMWilpmt/+SPjxnI182AwWMmI/7eILqapnriypEGeuAwhtlk6F+S2JQlroMlSx0DgYv1KvZUQMmiCsMdrU8797aD3jXAAI1oTchogG2GN1xibxLZPXWQZ9hdg9uTtpvn9R/m1k6TZtj1/BnmUN3n//n1yyN5IOwAictkvrEta0fi5BQ5L3xP5mnUXgbt4C1P7UkjLSnS8bckSQHbXp+jo1KzGJJ0SYZWHOGaOuv93dikaD2iGifYFihOOB2GW/GAjHhBLsy6UyjDN7lxvzv4m/vknBxgjlcdJeZUUE1aphMRazuJKWT8VTQ7gbPBGjgphgfTRUM+78QPw0q0HXrLvhUhyEOcGf7d2pE220nOea15pEB8llkHBYLtOOaRN5m5BN5hJ46YbVrFkDnxl35qVePgySfaHENYosTUyNi0fYm6bpmEVfbqnCGTHWs8TZ3OoHlMiJj3pMF7c0e/til6FKiK8Ar45lM7ZP5s/7ldvRAmhEypYTPTe/DS9t7LmjLrdfrYif/JeX3UVnLETziesHEVUqUkarmughpRKKep9kkfBIricqKeR9Z6J98zU2jPcVLjDSRzbJFuLWh2TOymSw5yFq8qM2r30NJU6aNtld5Bh/4PUEsHCEpq6ooxBAAAaQ8AAFBLAQIUABQACAgIAKQ4MEpKauqKMQQAAGkPAAAHAAAAAAAAAAAAAAAAAAAAAAB1c2VyLmpzUEsFBgAAAAABAAEANQAAAGYEAAAAAA==}, platform=XP, specificationLevel=0, browserstack.video.disableWaterMark=true, acceptSslCerts=false, processId=492, browserstack.key=ShpoHTMYgjRnvvprcvm4, browser=firefox, browserVersion=50.0, platformVersion=6.2, acceptSslCert=false, XULappId={ec8030f7-c20a-464f-9b0e-13a3a9e97384}, browserName=firefox, takesScreenshot=true, browser_version=50.0, platformName=windows_nt, 64bit=true, browserstack.debug=false, rotatable=false, browserstack.ie.noFlash=false, firefoxOptions={args=[], profile=UEsDBBQACAgIAKQ4MEoAAAAAAAAAAAAAAAAHAAAAdXNlci5qc51Xy27jNhTd9ysKr1qgZpNJZ9Ou0kwGKDBoinGDWRIUeWUxpkiWD8v++15S0vilh52VJZnkfZ1z72H04Kh1UP60KJxp8I14VkJ+lnpNaqYa5oCAZoUCsfjlx5IpDz//8UM87BQs4BprXEhbKmAqVO07wUVbyWf295YrUBbco7WeaNjik9+gN1v413ySfoN7F8xaJTkL0uhfd8rvFqcHaQiNcRtShWCJraSv9sv0t2XeLxXodajwlA8fPw7bd8AE/ggIwAOIz9L58IhBcQW4Lbh4HrepMUE7yitnaqCeO2kDdVHTIOu05eFu2FBghSeYV/2in5TxMJ0WYRqtDBNoS7N1qlBlmm8V6BWmPaV8eLtFp2zwyRitjWBqpoiwDcYoT8A547jR3qjjul2G7+VaG41Zq6EuwK3yq5+OxYP3WDwfDILKgY+YtxIdpdwxX90OD2NBf5a5PnPg6I9RUrf7KOwCOM1UwsTNiC4TOr5GPexzA4VwEp2kjHNAVESNCfSIKsrBhZksCemtYnsQz/d3q78NIjAF+NvwYvwkXvQ3qREn/v6OSLRkXr9+ySkpTAy/F4rpzeISu21ElClF3zxmIzkq2xJeVntnJZYN15KmkgGU9AEP+C9KN4aoBKeNDKRjZY9eDC5hatDI9xoxrAwSaRqyPuE/WlIh+yyeTRtQPDExulTTxVnIqdw6o49EixUGojG15f4Vl4wYAB6dDPvMVbqV0CAcaC13IDIJqdF8hLwTCIo2sfl5MrLecInYxifig5M8UOPkWmpqDQJ9P40hDQ0yn3SpmADCiaPtySR9XMWilpmt/+SPjxnI182AwWMmI/7eILqapnriypEGeuAwhtlk6F+S2JQlroMlSx0DgYv1KvZUQMmiCsMdrU8797aD3jXAAI1oTchogG2GN1xibxLZPXWQZ9hdg9uTtpvn9R/m1k6TZtj1/BnmUN3n//n1yyN5IOwAictkvrEta0fi5BQ5L3xP5mnUXgbt4C1P7UkjLSnS8bckSQHbXp+jo1KzGJJ0SYZWHOGaOuv93dikaD2iGifYFihOOB2GW/GAjHhBLsy6UyjDN7lxvzv4m/vknBxgjlcdJeZUUE1aphMRazuJKWT8VTQ7gbPBGjgphgfTRUM+78QPw0q0HXrLvhUhyEOcGf7d2pE220nOea15pEB8llkHBYLtOOaRN5m5BN5hJ46YbVrFkDnxl35qVePgySfaHENYosTUyNi0fYm6bpmEVfbqnCGTHWs8TZ3OoHlMiJj3pMF7c0e/til6FKiK8Ar45lM7ZP5s/7ldvRAmhEypYTPTe/DS9t7LmjLrdfrYif/JeX3UVnLETziesHEVUqUkarmughpRKKep9kkfBIricqKeR9Z6J98zU2jPcVLjDSRzbJFuLWh2TOymSw5yFq8qM2r30NJU6aNtld5Bh/4PUEsHCEpq6ooxBAAAaQ8AAFBLAQIUABQACAgIAKQ4MEpKauqKMQQAAGkPAAAHAAAAAAAAAAAAAAAAAAAAAAB1c2VyLmpzUEsFBgAAAAABAAEANQAAAGYEAAAAAA==}, browserstack.user=jasontownesfrenc1, version=50.0, proxy={}, command_id=1, firefox_binary=c:\Program Files (x86)\firefox 50.0\firefox.exe, browserstack.video=true, orig_os=win8, takesElementScreenshot=true, firefox_profile=UEsDBBQACAAIAJgwMEoAAAAAAAAAA..., proxy_type=node}] Session ID: 67809eeb-fa66-489d-84de-ab8426e6c796

The path to the driver executable must be set by the webdriver.chrome.driver system property (php)

I'm having a problems with running my php selenium test. I just switched to Ubuntu os and now i'm getting this exception stack trance on selenium server.
Selenium server
08:58:49.965 INFO - Launching a standalone Selenium Server
08:58:49.986 INFO - Java: Oracle Corporation 25.101-b13
08:58:49.986 INFO - OS: Linux 4.4.0-36-generic amd64
08:58:49.996 INFO - v2.53.0, with Core v2.53.0. Built from revision 35ae25b
08:58:50.040 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform LINUX
08:58:50.041 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:
registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform LINUX
08:58:50.041 INFO - Driver class not found: com.opera.core.systems.OperaDriver
08:58:50.041 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
08:58:50.041 INFO - Driver provider org.openqa.selenium.safari.SafariDriver registration is skipped:
registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform LINUX
08:58:50.042 INFO - Driver class not found: org.openqa.selenium.htmlunit.HtmlUnitDriver
08:58:50.042 INFO - Driver provider org.openqa.selenium.htmlunit.HtmlUnitDriver is not registered
08:58:50.075 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
08:58:50.075 INFO - Selenium Server is up and running
08:59:41.556 INFO - Executing: [new session: Capabilities [{browserName=chrome, platform=LINUX}]])
08:59:41.566 INFO - Creating a new session for Capabilities [{browserName=chrome, platform=LINUX}]
08:59:41.573 WARN - Exception thrown
java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:00:58'
System info: host: 'Keson', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-36-generic', java.version: '1.8.0_101'
Driver info: driver.version: unknown
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.openqa.selenium.remote.server.DefaultSession.execute(DefaultSession.java:183)
at org.openqa.selenium.remote.server.DefaultSession.<init>(DefaultSession.java:119)
at org.openqa.selenium.remote.server.DefaultSession.createSession(DefaultSession.java:95)
at org.openqa.selenium.remote.server.DefaultDriverSessions.newSession(DefaultDriverSessions.java:124)
at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:59)
at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:1)
at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:111)
at org.openqa.selenium.remote.server.JsonHttpCommandHandler.handleRequest(JsonHttpCommandHandler.java:79)
at org.openqa.selenium.remote.server.DriverServlet.handleRequest(DriverServlet.java:204)
at org.openqa.selenium.remote.server.DriverServlet.doPost(DriverServlet.java:166)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at org.openqa.selenium.remote.server.DriverServlet.service(DriverServlet.java:132)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.openqa.jetty.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at org.openqa.jetty.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:680)
at org.openqa.jetty.jetty.servlet.ServletHandler.handle(ServletHandler.java:571)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1526)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1479)
at org.openqa.jetty.http.HttpServer.service(HttpServer.java:920)
at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820)
at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986)
at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837)
at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243)
at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:358)
at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:537)
Caused by: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:00:58'
System info: host: 'Keson', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-36-generic', java.version: '1.8.0_101'
Driver info: driver.version: unknown
at org.openqa.selenium.remote.server.DefaultDriverProvider.callConstructor(DefaultDriverProvider.java:113)
at org.openqa.selenium.remote.server.DefaultDriverProvider.newInstance(DefaultDriverProvider.java:97)
at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:60)
at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:222)
at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:1)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.server.DefaultDriverProvider.callConstructor(DefaultDriverProvider.java:103)
... 9 more
Caused by: java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html
at com.google.common.base.Preconditions.checkState(Preconditions.java:199)
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:109)
at org.openqa.selenium.chrome.ChromeDriverService.access$0(ChromeDriverService.java:1)
at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:137)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:296)
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:88)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:138)
... 14 more
08:59:41.576 WARN - Exception: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html
Chromdriver is running
Starting ChromeDriver (v2.9.248304) on port 9515
And this is an error when i run the test
There was 1 error:
UnknownServerException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html
Why this problem sudenlly appeared? How to fix it? If you need any additional information's please let me know and i will provide.
Thank you in advance
You should set the chrome driver option like this:
java -jar selenium-server-standalone-2.53.0.jar -Dwebdriver.chrome.driver=chromedriver.exe
After the -Dwebdriver.chrome.driver= you should put the path to the cromedriver.

Categories