I am getting following error for my ChromeDriver, and I cannot figure out why. Chrome is 68 version and chromedriver is 2.41. This throws following error and does not even open the Chrome browser.
Aug 08, 2018 5:08:23 PM org.openqa.selenium.remote.DesiredCapabilities chrome
INFO: Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()`
Starting ChromeDriver 2.41.578737 (49da6702b16031c40d63e5618de03a32ff6c197e) on port 9090
Only local connections are allowed.
geb.driver.DriverCreationException: failed to create driver from callback 'script1533762503012124154837$_run_closure1#2fb69ff6'
at geb.driver.CallbackDriverFactory.getDriver(CallbackDriverFactory.groovy:35)
at geb.driver.CachingDriverFactory.getDriver_closure3(CachingDriverFactory.groovy:85)
at geb.driver.CachingDriverFactory.getDriver_closure3(CachingDriverFactory.groovy)
at geb.driver.CachingDriverFactory$SimpleCache.get(CachingDriverFactory.groovy:32)
at geb.driver.CachingDriverFactory.getDriver(CachingDriverFactory.groovy:84)
at geb.Configuration.createDriver(Configuration.groovy:382)
at geb.Configuration.getDriver(Configuration.groovy:371)
at geb.Browser.getDriver(Browser.groovy:111)
at geb.report.PageSourceReporter.getPageSource(PageSourceReporter.groovy:42)
at geb.report.PageSourceReporter.writePageSource(PageSourceReporter.groovy:38)
at geb.report.PageSourceReporter.writeReport(PageSourceReporter.groovy:29)
at geb.report.CompositeReporter.writeReport(CompositeReporter.groovy:31)
at geb.Browser.report(Browser.groovy:927)
at geb.spock.GebReportingSpec.report(GebReportingSpec.groovy:59)
at geb.spock.GebReportingSpec.cleanup(GebReportingSpec.groovy:46)
> Caused by: org.openqa.selenium.WebDriverException: unknown error:
> cannot parse capability: chromeOptions from unknown error:
> unrecognized chrome option: class (Driver info:
> chromedriver=2.41.578737
> (49da6702b16031c40d63e5618de03a32ff6c197e),platform=Windows NT
> 10.0.163 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 12 milliseconds Build info:
> version: '3.13.0', revision: '2f0d292', time:
> '2018-06-25T15:24:21.231Z' System info: host: 'CL-', ip:
> '10', os.name: 'Windows 10', os.arch: 'amd64', os.version:
> '10.0', java.version: '1.8.0_121' Driver info: driver.version:
> ChromeDriver
Here I am not even using any desired Capabilities and I have no idea from where it is getting it.
driver = {
System.setProperty('webdriver.chrome.driver', System.getProperty("user.dir")+'\\src\\test\\resources\\chromedriver.exe')
new ChromeDriver()
}
<seleniumVersion>3.4</seleniumVersion>
What am I doing wrong?
I added Guava jar files and it fixed that issue.
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>22.0</version>
</dependency>
Related
When I run Selenium jobs through Jenkins, I see 2 different ChromeDriver versions reported:
Expected
17:00:29.375 [TestNG-test=wsc tests-3] WARN c.r.a.p.c.c.CreditApplicationPage - Unable to locate field: {}
org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//form[#name='creditAppDynaValidatorActionForm']//span[#class='message']"}
(Session info: chrome=71.0.3578.98)
(Driver info: chromedriver=2.45.615279 (12b89733300bd268cff3b78fc76cb8f3a7cc44e5),platform=Linux 3.10.0-693.11.1.el7.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'jenkins-slave-4368551bbabf', ip: '172.17.45.11', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-693.11.1.el7.x86_64', java.version: '1.8.0_152'
The Driver info: chromedriver=2.45.615279 makes sense to me. This is the driver version we've installed.
Alternate
org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//form[#name='creditAppDynaValidatorActionForm']//span[#class='message']"}
(Session info: chrome=71.0.3578.98)
(Driver info: chromedriver=70.0.3538.67 (9ab0cfab84ded083718d3a4ff830726efd38869f),platform=Windows NT 10.0.17134 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'jenkins-slave-4368551bbabf', ip: '172.17.45.11', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-693.11.1.el7.x86_64', java.version: '1.8.0_152'
What does the Driver info: chromedriver=70.0.3538.67 mean; why is it displayed here? Version 70.0 is so very far off from 2.45.
A colleague pointed me to the answer:
The driver version reported is the WebDriver version as run through the Selenium Grid.
I am using following configuration:
Windows 7
Java: 1.8.0_91
Selenium: 3.10.0
Chrome browser: 62.0
Chrome Driver : 2.34
While running found below error:
org.openqa.selenium.SessionNotCreatedException: session not created exception
from disconnected: unable to connect to renderer
(Session info: chrome=62.0.3202.62)
(Driver info: chromedriver=2.34.522940 (1a76f96f66e3ca7b8e57d503b4dd3bccfba87af1),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 938 milliseconds
Build info: version: '3.10.0', revision: '176b4a9', time: '2018-03-02T19:03:16.397Z'
System info: host: 'OFFICE-PC', ip: '192.168.1.230', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_91'
Driver info: driver.version: ChromeDriver
Hmmmmm... Looks familiar.
Have you checked that you are not using a 32bit ChromeDriver for a 64bit Chrome browser?
Protractor version: 5.1.2
Safari version: 10.1.2
I have enabled 'Allow Remote Automation' from Safari -> Develop and started the safari driver from cmd using the following command:
/usr/bin/safaridriver -p 8844
Now, trying to run the protractor tests using protractor conf.js. The tests fail to start with the following logs:
Build info: version: '3.5.1', revision: '9c21bb67ef', time: '2017-08-16T21:10:06.092Z'
System info: host: 'dyn-49-127-9-116.its.monash.edu.au', ip: 'fe80:0:0:0:479:1a15:751b:51d6%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_144'
Driver info: driver.version: unknown
[15:28:40] E/launcher - SessionNotCreatedError: Could not create a session: You must enable the 'Allow Remote Automation' option in Safari's Develop menu to control Safari via WebDriver. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 32 milliseconds
Build info: version: '3.5.1', revision: '9c21bb67ef', time: '2017-08-16T21:10:06.092Z'
System info: host: 'dyn-49-127-9-116.its.monash.edu.au', ip: 'fe80:0:0:0:479:1a15:751b:51d6%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_144'
Driver info: driver.version: unknown
at WebDriverError (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:27:5)
at SessionNotCreatedError (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:214:5)
at Object.checkLegacyResponse (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:505:15)
at parseHttpResponse (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:509:13)
at doSend.then.response (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:440:13)
at process._tickCallback (internal/process/next_tick.js:109:7)
From: Task: WebDriver.createSession()
at Function.createSession (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:777:24)
at createDriver (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:167:33)
at Builder.build (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:632:14)
at Hosted.getNewDriver (/usr/local/lib/node_modules/protractor/lib/driverProviders/driverProvider.ts:60:29)
at Runner.createBrowser (/usr/local/lib/node_modules/protractor/lib/runner.ts:225:39)
at q.then.then (/usr/local/lib/node_modules/protractor/lib/runner.ts:391:27)
at _fulfilled (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:834:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:796:13)
at /usr/local/lib/node_modules/protractor/node_modules/q/q.js:556:49
[15:28:40] E/launcher - Process exited with error code 19
I figured out the issue. Since built in safari driver has a limitation of only one browser window at a time, I quit all the running safari windows and ran the tests again. Worked perfectly fine :)
Reference:
https://webkit.org/blog/6900/webdriver-support-in-safari-10/
Kinda tricky, because currently it's not quite working due webdriver/selenium incompatibilities. We are hoping that, with the new webdriver release, it will work. See here.
I am unable to launch the firefox browser (49 version) and with Selenium Jar is 2.5.3 .
Getting Below error:-
*2016-11-10 18:45:36 ERROR BrowserConfig:293 - Error in EbselenCore.setBrowser:Specified firefox binary location does not exist or is not a real file: C:\Program Files (x86)\Mozilla Firefox\firefox.exe
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: 'karthik', ip: '0.0.0.0xx', os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', java.version: '1.8.0_111'
Driver info: driver.version: unknown*
Even i tried with the system.setproperty to the
System.setProperty("webdriver.firefox.bin", "xxxxx\\xxx\\firefox.exe");
System.setProperty("webdriver.chrome.driver", "xxxxx\\xxx\\chromedriver.exe");
System.setProperty("webdriver.chrome.bin", "xxxxx\\xxx\\chrome.exe");
Even i tried with the chrome driver :-
Nov 11, 2016 2:29:10 PM org.openqa.selenium.os.UnixProcess checkForErrorSEVERE: org.apache.commons.exec.ExecuteException:Process exited with an error: -1073741511 (Exit value: -1073741511) 2016-11-11 14:29:11 ERROR BrowserConfig:293 - Error in EbselenCore.setBrowser:Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46' System info: host: 'karthik', ip: 'x.x.x.x.', os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', java.version: '1.8.0_111' Driver info: driver.version: SeleniumChromeDriver
Thanks in advance for your response.
Selenium 2.5.3 only work with firefox 46 and older. You need to use selenium 3 and newer from firefox 47 onwards. You also need to use geckodriver.
Starting selenium + chrome driver with this is command
java -Dwebdriver.chrome.driver=chromedriver.exe -jar selenium.jar
It start the server
This is my acceptance.suite.yml file
class_name: AcceptanceTester
modules:
enabled:
- WebDriver:
url: ''
browser: chrome
window_size: 1280x768
curl:
CURLOPT_TIMEOUT: 60
This is what i am receiving as error when i try to execute the test case
[Facebook\WebDriver\Exception\UnknownServerException]
unknown error: cannot parse capability: proxy
from unknown error: must be a dictionary
(Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Windows NT 6.2 x86_64) (WARNING: The server d
id not provide any stacktrace information)
Command duration or timeout: 518 milliseconds
Build info: version: '2.52.0', revision: '4c2593c', time: '2016-02-11 19:06:42'
System info: host: 'FR301-216', ip: '172.16.102.106', os.name: 'Windows 8', os.arch: 'amd64', os.version: '6.2', java.version: '1.8.0_65'
Driver info: org.openqa.selenium.chrome.ChromeDriver
This is an existing bug in the new codeception version (2.1.5 and above). The solution is to downgrade your codeception version to 2.1.4.