Chrome driver exception on Jenkins - selenium

I have selenium 2.53.1.jar, platform-Windows, Java- 1.8, chrome = 52.0, chrome-driver.exe-2.23.
I am seeing the following message when trying to run Night watch test on Jenkins.
org.openqa.selenium.WebDriverException: unknown error: unable to
discover open pages (Driver info: chromedriver=2.23.409699
(49b0fa931cda1caad0ae15b7d1b68004acd05129),platform=Windows NT
6.3.9600 x86_64)
Please note that the test is running correctly from the command line- all paths given are same as in the Jenkins job.
I also tried a previous version 2.22 of Chrome driver. Still see the same error.
Test is running correctly on FF.

Even I'm getting the same error. Maybe you can try putting sand-box for chrome. Maybe that might help you out temporarily.

Related

Pythonanywhere | Selenium Chrome

I do it with the same code. Also add no --no-sandbox.
But not working.
I get this one:
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed
(chrome not reachable)
(The process started from chrome location /usr/bin/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 5.4.0-1038-aws x86_64)
In general, when you are getting a crash starting Chrome on PythonAnywhere, it's because you have been leaving processes running by not properly closing the browser in your code. Search for "selenium" on the PythonAnywhere help pages for example code that properly closes Chrome and also shows parameters that you should use.

chromedrive.exe has stopped working

Am running the automation suite on the below configuration
Selenium: 3.11.0
Chrome: 65.0.3325.181
Chromedriver: 2.37
JDK: 1.8
OS: Windows 7 Enterprise(64 -bit)
On mid of the execution am getting an error as Chromedriver.exe has stopped working and the execution got stopped.
To resolve this, have tried with different version of selenium and chromedriver. Couldn't able to resolve the issue.
Issue Image
ChromeDriver Log: Log
Update:
Am getting this error whenever my code triggers the driver.get(URL) or driver.navigate().to(URL) command. FYI, am not sure this gonna help or not. Just to give more insight, my code will access two sites, in that one is https and another one is http. Am getting the exception whenever it access the http site.

Unable to scroll chrome browser using Appium

I am trying to scrolldown chrome browser for my appium project but I am unable to scroll down. Below is the error message.
Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: call function result missing 'value'
(Session info: chrome=65.0.3325.109)
(Driver info: chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f),platform=Windows NT 10.0.16299 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
There is a mismatch between ChromDriver and ChromeBroser version may be. How to check my ChromeDriver verison (2.33 as present in the error log) in my android device. How can I update the current version?
Update both chrome browser and chrome driver to latest version.Recent version of chrome browser doesn't work until driver is updated to latest version.
I found a solution how to fix the issue with updating the chrome driver to 2.36 It was to download the chromedriver version and replace it with the "chromedriver" that is taken by Appium the path was
C:\Users\Hamza_Soltani\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win\chromedriver.exe

Jenkins can't launch real browser on Ubuntu 16.04

I've selenium script which launches chrome browser, goes to a website and does basic checks.
When I tried running same script locally through jenkins I got error
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4),platform=Linux 4.13.0-17-generic x86_64)
This is resolved by Unknown error: Chrome failed to start: exited abnormally
I'm confused why Jenkins can't launch real chrome browser on Ubuntu ?
Because Jenkins server normally does not have a graphical subsystem installed in the operating system. When a real browser (or any app) tries to create a window that fails.
You will need to run your tests on Jenkins using a headless browser - one that does not need a graphical subsystem. Chrome-headless is currently the preferred option, replacing the now abandoned PhantomJS.

geb.driver.DriverCreationException: failed to create driver from callback

I am getting below Exception while running test scripts.
geb.driver.DriverCreationException: failed to create driver from callback 'script1501516684770944233575$_run_closure1#6601cc93'
java.lang.NoClassDefFoundError: Lorg/openqa/selenium/remote/html5/RemoteWebStorage;
failed to create driver from callback 'script1501516684770944233575$_run_closure1#6601cc93'
OS: Windows 10 64 bit
Chrome browser: v60 (latest one)
Selenium :-2.43.1
Chrome web driver:-2.24.417431
geb-version:0.10.0
geb-testng-version:0.13.1
geb-spoc-version:0.13.1
Thanks in Advance...!
This will be a version issue (your old web driver is not compatible with newer chrome versions). If you are using the latest version of chrome, I suggest moving to the latest version of selenium and chrome driver.
Infact one quick google suggests that I might be right: https://sites.google.com/a/chromium.org/chromedriver/downloads
Latest Release: ChromeDriver 2.31
Supports Chrome v58-60
This error can be thrown if you do not correctly define your chrome driver location when executing your tests.
Either in your GebConfig:
driver = {
System.setProperty('webdriver.chrome.driver', '/Users/foo/drivers/chromedriver')
new ChromeDriver()
}
Or in something like VM parameters if running from an intelliJ Run/Debug Configuration:
-Dbrowser=chrome -Dwebdriver.chrome.driver="/Users/foo/drivers/chromedriver/chromedriver.exe"
I was having this problem for a couple of days and finally understand the cause. This problem occurred for me on Jenkins when I am setting my browser to chrome or firefox and then trying to run my tests. It occurred due to browsers not installed on Jenkins machine. The drivers are present in the code but the browser should be installed on machine otherwise Geb will throw this error. Hope this helps.