0
votes

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: [email protected]@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)

1
which version of gecko and seleniumiamsankalp89
I tried with java -Dwebdriver.gecko.driver="/home/nest/selenium/geckodriver" -jar selenium-server-standalone-3.5.3.jar. Still same problem occurs. I modify original question wiith selenium logNest

1 Answers

1
votes

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