I have robot framework tests that when run locally, run fine. But when run on jenkins, after a fixed number of tests(nearly 14), start giving exceptions.
WebDriverException: Message: Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'xxxx', ip: 'xxxx', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-327.10.1.el7.x86_64', java.version: '1.8.0_131'
Driver info: driver.version: unknown
Stacktrace:
What might be causing this? Do i need to breakdown big suites to smaller ones?
The error says it all :
WebDriverException: Message: Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'xxxx', ip: 'xxxx', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-327.10.1.el7.x86_64', java.version: '1.8.0_131'
Driver info: driver.version: unknown
The error clearly says the following :
Your Selenium Java Client details is not getting detected back as in revision: 'unknown', time: 'unknown'
Your WebDriver variant details is not getting detected back as in Driver info: driver.version: unknown
Your main issue is the version compatibility between the binaries you are using as follows :
Your Selenium Java Client version is 3.4.0 of Apr 21, 2017 which is almost a year older.
Your JDK version is 1.8.0_131 which is pretty ancient.
Your WebDriver variant version is unknown to us.
Your Web Client variant version is unknown to us.
So there is a clear mismatch between the JDK v8u131 , Selenium Client v2.4.0.
Solution
Upgrade JDK to recent levels JDK 8u162.
Upgrade Selenium to current levels Version 3.11.0.
Upgrade WebDriverDriver variant version to recent levels.
Upgrade Web Client version to recent levels.
Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
Use CCleaner tool to wipe off all the OS chores before and after the execution of your test Suite.
If your base Web Client base version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client.
Execute your #Test.
Related
Code is working fine for chrome but for Edge I'm facing issue
I have set below properties in application.properties file
driver.name=edgeDriver
webdriver.edge.driver = drivers/msedgedriver.exe
I have also downloaded edgedriver.exe as per current version of my edge browser
Edge Version : Version 89.0.774.63
When I am trying to execute the test I am seeing below messages in console log
Unable to get class
com.qmetry.qaf.automation.step.client.TestStepExporter from jar
/C:/Users/piyush/.m2/repository/com/qmetry/qaf/3.0.0/qaf-3.0.0.jar
[QAFTestBase] - Initializing
Driver...browser_str:edgeDriver,base_url:https://qmetry.github.io/qaf/,sel_server:localhost,port:4444
[UiDriverFactory] - Driver: edgeDriver Mar 26, 2021 3:25:36 PM
org.openqa.selenium.remote.DesiredCapabilities edge INFO: Using new EdgeOptions() is preferred to DesiredCapabilities.edge()
Unable to create driver instance in 1st attempt with retry timeout of
30 seconds. You can check/set value of 'driver.init.retry.timeout'
appropriately to set retry timeout on driver initialization
failure.Unable to Create Driver Instance for edge:
java.lang.NoSuchMethodException:
org.openqa.selenium.edge.EdgeDriver.(java.net.URL,
org.openqa.selenium.Capabilities)
Build info: version: '3.141.59', revision: 'e82be7d358', time:
'2018-11-14T08:17:03'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version:
'10.0', java.version: '11.0.10'
Driver info: driver.version: unknown
Referred to how to use edgeDriver with qaf
it seems the property webdriver.edge.driver should be appended with "system" prefix. That means:
system.webdriver.edge.driver = drivers/msedgedriver.exe
After this, Page launched successfully
I have trouble running MS Edge test on MAC using Selenium Remote web driver.
I tried to set System property for edge binary as below:
dc = DesiredCapabilities.edge();
System.setProperty("webdriver.edge.driver", "/Users/username/Softwares/Work/jars/msedgedriver");
dc.setCapability("edge_binary","/Applications/Microsoft Edge Beta.app");
I checked that msedge driver version and version of MS Edge browser that I have installed.
Both are - 80.0.361.48
This is the log on Selenium node:
020-02-11 18:06:37.533:INFO:osjshC.ROOT:qtp1800659519-12: org.openqa.selenium.remote.server.WebDriverServlet-59309333: Initialising WebDriverServlet
18:06:37.551 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.BeginSession#47c6497e
18:06:37.555 INFO - /session: Executing POST on /session (handler: BeginSession)
18:06:37.632 INFO - Capabilities are: Capabilities {MicrosoftEdge_binary: /Applications/Microsoft Edg..., browserName: MicrosoftEdge, platform: MAC, version: }
18:06:37.633 INFO - Capabilities {MicrosoftEdge_binary: /Applications/Microsoft Edg..., browserName: MicrosoftEdge, platform: MAC, version: } matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.edge.EdgeDriverService)
Starting MSEdgeDriver 80.0.361.48 (e1a3ff36578e440880567e6adcbeab38ec2956fa) on port 31883
Only local connections are allowed.
Please protect ports used by MSEdgeDriver and related test frameworks to prevent access by malicious code.
Exception that I get when running code is as
org.openqa.selenium.WebDriverException: unknown error: cannot find MSEdge binary
Build info: version: '3.7.1', revision: '8a0099a', time: '2017-11-06T21:07:36.161Z'
System info: host: '****-MacBook-Pro.local', ip: 'fe80:0:0:0:14d9:68c6:7d2c:87a%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.2', java.version: '1.8.0_152'
Driver info: driver.version: unknown
This error message...
org.openqa.selenium.WebDriverException: unknown error: cannot find MSEdge binary
Build info: version: '3.7.1', revision: '8a0099a', time: '2017-11-06T21:07:36.161Z'
System info: host: '****-MacBook-Pro.local', ip: 'fe80:0:0:0:14d9:68c6:7d2c:87a%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.2', java.version: '1.8.0_152'
Driver info: driver.version: unknown
...implies that the program was unable to locate MSEdge binary within your system.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
Though you are using compatable versions of MS Edge Driver v80.0 and MS Edge Browser v80.0
Your Selenium Client version is 3.7.1 of 2017-11-06T21:07:36.161Z which is almost 2.5 years older.
But your JDK version is 1.8.0_152 which is pretty ancient.
So there is a clear mismatch between JDK v8u152 , Selenium Client v'3.7.1 , MS Edge Driver v80.0 and the MS Edge Browser v80.0
Solution
Ensure that:
JDK is upgraded to current levels JDK 8u241.
Selenium is upgraded to current levels Version 3.141.59.
Take a System Reboot.
Execute your #Test as non-root user.
could anyone please tell me , why i get timeout out issue intermittently while sign in on web page after browsing the URL . i get it intermittently , it works fine after i close all the web browser and run the program . the below error message , i want to know the root cause , can anyone help me please !
FAILED CONFIGURATION: #BeforeTest setup
org.openqa.selenium.TimeoutException: timeout
(Session info: chrome=71.0.3578.98)
(Driver info: chromedriver=2.42.591088 (7b2b2dca23cca0862f674758c9a3933e685c27d5),platform=Windows NT 6.1.7601 SP1 x86) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:13:22.693Z'
System info: host: '01HW596115', ip: '10.29.124.26', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_201'
Driver info: org.openqa.selenium.chrome.ChromeDriver
This error message...
FAILED CONFIGURATION: #BeforeTest setup
org.openqa.selenium.TimeoutException: timeout
(Session info: chrome=71.0.3578.98)
(Driver info: chromedriver=2.42.591088 (7b2b2dca23cca0862f674758c9a3933e685c27d5),platform=Windows NT 6.1.7601 SP1 x86) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:13:22.693Z'
System info: host: '01HW596115', ip: '10.29.124.26', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_201'
Driver info: org.openqa.selenium.chrome.ChromeDriver
...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
You are using chromedriver=2.42
Release Notes of chromedriver=2.42 clearly mentions the following :
Supports Chrome v68-70
You are using chrome=71.0
Release Notes of ChromeDriver v2.45 clearly mentions the following :
Supports Chrome v70-72
So there is a clear mismatch between the ChromeDriver v2.42 and the Chrome Browser v71.0
Solution
Upgrade ChromeDriver to current ChromeDriver v2.45 level.
Keep Chrome version between Chrome v70-72 levels. (as per ChromeDriver v2.45 release notes)
Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
If your base Web Client version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client.
Take a System Reboot.
Execute your #Test.
i am setting up a selenium based testing application. I am using chrome driver for testing.
I have set up a docker image as in the below URL.
https://github.com/Leafney/alpine-selenium-chrome/blob/master/Dockerfile
I have configured the chrome driver property as follows.
System.setProperty("webdriver.chrome.driver", "/usr/lib/chromium/chromedriver");
However, I get the below error informing that chrome failed to start.
Command duration or timeout: 60.07 seconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'c34db8dbfca2', ip: '172.17.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.27-moby', java.version: '1.8.0_151'
Driver info: driver.version: ChromeDriver
unknown error: Chrome failed to start: crashed
Any pointers on this will be helpful.
I had the same issue with Chromedriver and Alpine, Chromedriver is not executable at all, even I had tried to install and run almost every version of the Chromedriver, no luck.
And then I had to use Debian Linux in order to execute Chromedriver properly for e2e testing in docker and CI.
Not sure why we are getting this error on mac 10.12.4 while running the selenium, My chrome is running on latest version i.e. Version 58.0.3029.110 (64-bit) and Chrome driver is 2.9 and Selenium_java version is 2.53.
Anyone facing the same issue, is something i'm missing here or selenium is currently not supporting these configurations on mac Sierra. Any help much appreciated.
After this warning I'm getting this message, I'm running scripts using docker
[testng] Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
[testng] Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:58'
[testng] System info: host: 'vbabu-in-la01', ip: '10.40.17.78', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.4', java.version: '1.8.0_121'
[testng] Driver info: driver.version: RemoteWebDriver