Which Selenium standalone version is compatible with Firefox version 58.0 - selenium

Which Selenium standalone jars are compatible with Firefox version 58.0?I tried 2.46.0 selenium jars and I am getting this exception:
org.openqa.selenium.WebDriverException:
Unable to bind to locking port 7054 within 45000 ms
Build info: version: '2.46.0', revision: '87c69e2', time: '2015-06-04 16:17:10'
System info: host: 'CHDSEZ400598D', ip: '10.152.107.68', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_77'

Mozilla Firefox Browsers are released as GA (General Availability) versions irrespective of Manual or Automation testing. It's the GeckoDriver which controls the Mozilla Firefox Browser through Marionette. Again its the Selenium Client which initializes the GeckoDriver. So the compatibility rests partially with Selenium Client and partialy with GeckoDriver.
Though Selenium releases are made with outmost effort to keep the Selenium Clients backward compatible with the previous releases of GeckoDriver and Firefox Browser releases but the last dependency announced as per the Selenium Release Notes is as follows :
v3.4.0
======
* Geckodriver 0.16 is strongly recommended
The last announced dependency of GeckoDriver 0.19.0 (2017-09-16) is as follows :
0.19.0 (2017-09-16)
Note that with geckodriver 0.19.0 the following versions are recommended: - Firefox 55.0 (and greater) - Selenium 3.5 (and greater)
Solution
An effective solution would be as follows :
Update your JDK version to the latest version, currently vJDK 8u162
Update your Selenium Client version to the latest version, currently v3.10.0
Update your GeckoDriver version to v0.19.1 (2017-10-30)
Update your Firefox Quantum Browser version to [v58.0.2]
Clean your Project Workspace 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 Firefox version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Firefox.
Execute your #Test.

Related

Could not start a new session. Response code 500. Message: session not created: This version of ChromeDriver only supports Chrome version 105

I'm developing an application that uses selenium.
OS: macOS with Apple Silicon
Language: Kotlin
JDK: Java 18
But it fails.
Output
Starting ChromeDriver 105.0.5195.19 (b9c217c128c16f53d12f9a02933fcfdec1bf49af-refs/branch-heads/5195#{#176}) on port 50362
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created: This version of ChromeDriver only supports Chrome version 105
Current browser version is 104.0.5112.79 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
Build info: version: '4.4.0', revision: 'e5c75ed026a'
System info: host: 'mymac.local', ip: '2400:2200:6f0:7919:347b:3223:3841:9545%en0', os.name: 'Mac OS X', os.arch: 'aarch64', os.version: '12.3', java.version: '18.0.2'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [null, newSession {capabilities=[Capabilities {browserName: chrome, goog:chromeOptions: {args: [], extensions: []}}], desiredCapabilities=Capabilities {browserName: chrome, goog:chromeOptions: {args: [], extensions: []}}}]
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:144)
......
build.gradle.kts
dependencies {
testImplementation(kotlin("test"))
implementation(compose.desktop.currentOs)
// Selenium
// https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java
implementation("org.seleniumhq.selenium:selenium-java:4.4.0")
// https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-chrome-driver
implementation("org.seleniumhq.selenium:selenium-chrome-driver:4.4.0")
}
Code
fun launch() {
System.setProperty(
"webdriver.chrome.driver",
"/driver/path/chromedriver"
);
ChromeDriver();
}
Chrome driver version 105.0.5195.19 is one of the driver I saved at /driver/path/chromedriver.
104.0.5112.79 is the version of Chrome I installed on my macOS.
Do I have to use the chromedriver version 104? or is there any way to use one of version 105?
I'm not sure why chrome version on the macOS is needed when I set webdriver.chrome.driver.
You can check you current google chrome version and if is not 105 you can updated.
In my case was :
Version 104.0.5112.102
Or another solutions would be downgrade the chrome driver
This error message...
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created: This version of ChromeDriver only supports Chrome version 105
...implies that the ChromeDriver was unable to initiate/spawn a new Browsing Context i.e. google-chrome session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
You are using chromedriver=105.0
Release Notes of chromedriver=105.0 clearly mentions the following :
Supports Chrome version 105
Presumably you are using the latest chrome=104.0
So there is a clear mismatch between chromedriver=105.0 and the chrome=104.0
Solution
Ensure that:
ChromeDriver is adjusted to ChromeDriver v104.0 level.
Also ensure,
Chrome Browser is updated to current chrome=104.0 (as per chromedriver=104.0 release notes).
Selenium is upgraded to current released Version 4.4.0.

Driver info: driver.version: unknown (Behat\Mink\Exception\DriverException) error with Selenium and Geckodriver

Here's the situation: I'm using Behat to run acceptance tests on Symfony. To do so, I start a Selenium instance with the Geckodriver, then I run Behat. Everything works fine on local (great!).
But when it runs on Github action, it fails. I've check the versions, I've even versioned the geckodriver and selenium.jar files to use exactly the same (despite they already exist on github action), but nothing works.
So I'm looking for any help to debug this error. Here's the commands and their results:
$ java -jar -Dwebdriver.gecko.driver=/usr/local/share/gecko_driver /usr/share/java/selenium-server-standalone.jar &
14:19:46.106 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358
14:19:46.369 INFO [GridLauncherV3.lambda$buildLaunchers$3] - Launching a standalone Selenium Server on port 4444
2020-05-29 14:19:46.780:INFO::main: Logging initialized #1350ms to org.seleniumhq.jetty9.util.log.StdErrLog
14:19:47.657 INFO [WebDriverServlet.<init>] - Initialising WebDriverServlet
14:19:47.758 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 4444
./vendor/bin/behat -s acceptance
Could not open connection: Unable to create new service: GeckoDriverService
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'fv-az33', ip: '10.1.0.4', os.name: 'Linux', os.arch: 'amd64', os.version: '5.3.0-1022-azure', java.version: '1.8.0_252'
Driver info: driver.version: unknown (Behat\Mink\Exception\DriverException)
This error message...
Driver info: driver.version: unknown (Behat\Mink\Exception\DriverException)
...implies that the GeckoDriver wasn't recognized back by the Browsing Context i.e. Firefox browser.
Solution
Ensure that:
JDK is upgraded to current levels JDK 8u251.
Selenium is upgraded to current levels Version 3.141.59.
GeckoDriver is upgraded to GeckoDriver v0.26.0 level.
Firefox is upgraded to current Firefox v76.0 levels.
GeckoDriver is present in the desired location.
GeckoDriver is having executable permission for non-root users.
If your base Web Client version is too old, then uninstall it and install a recent GA and released version of Web Client.
Take a System Reboot.
Execute your Test as a non-root user.
Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.
Reference
You can find a couple of relevant discussions in:
Driver info: driver.version: unknown with ChromeDriver Chrome using Selenium and Python
Ok, I've just solved my problem. I think this is due to two things:
First, I was not using the headless mode. I don't know to set it using Geckodriver because I'm finally using Chromedriver
Second, the github action's doc is misleading. It says 'Chrome Driver is available via CHROMEWEBDRIVER environment variable', but in fact it's only the directory which is in the env var. So the path of the driver is $CHROMEWEBDRIVER/chromedriver (same for $GECKOWEBDRIVER)
For info, here's my config of behat:
javascript_session:
selenium2:
browser: chrome
capabilities:
chrome:
switches:
- "--headless"
- "--disable-gpu"
And to run Selenium:
java -Dwebdriver.chrome.driver=$CHROMEWEBDRIVER/chromedriver -jar $SELENIUM_JAR_PATH &

HOOK-ERROR in after_step: TimeoutException: Message: timeout

Sometimes, when my script is run by jenkins i get an error:
HOOK-ERROR in after_step: TimeoutException: Message: timeout
(Session info: chrome=69.0.3497.92)
(Driver info: chromedriver=2.35.528139
(47ead77cb35ad2a9a83248b292151462a66cd881),platform=Linux 4.4.0-128-generic x86_64)
i cannot reproduce this situation on my local machine. Do you have any idea how can i check and fix it?
This error message...
HOOK-ERROR in after_step: TimeoutException: Message: timeout
(Session info: chrome=69.0.3497.92)
(Driver info: chromedriver=2.35.528139
...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.35
Release Notes of chromedriver=2.35 clearly mentions the following :
Supports Chrome v62-64
You are using chrome=69.0
Release Notes of ChromeDriver v2.43 clearly mentions the following :
Supports Chrome v69-71
So there is a clear mismatch between the ChromeDriver v2.35 and the Chrome Browser v69.0
Solution
Upgrade JDK to recent levels JDK 8u191.
Upgrade Selenium to current levels Version 3.14.0.
Upgrade ChromeDriver to current ChromeDriver v2.42 level.
Keep Chrome version between Chrome v69-71 levels. (as per ChromeDriver v2.43 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.
Execute your #Test.

Selenium Not able to run Firefox browser from Jenkins

I tried running Automated test using selenium on firefox through jenkins on Ubuntu Machine but not able to run it. But the same code is running without failure using Eclipse. I am running it as maven project.
Getting following error-
"[INFO] Running TestSuite
1524549883598 geckodriver INFO geckodriver 0.20.0
1524549883615 geckodriver INFO Listening on 127.0.0.1:14395
1524549883939 mozrunner::runner INFO Running command: "/usr/lib/firefox/firefox" "-marionette" "-profile" "/tmp/rust_mozprofile.78vmBc1aqdpF"
1524549883941 geckodriver::marionette TRACE connection attempt 0/600
ExceptionHandler::GenerateDump cloned child 6290
ExceptionHandler::SendContinueSignalToChild sent continue signal to child
ExceptionHandler::WaitForContinueSignal waiting for continue signal...
1524549884041 geckodriver::marionette TRACE connection attempt 1/600
1524549884141 webdriver::server DEBUG <- 500 Internal Server Error {"value":{"error":"unknown error","message":"Process unexpectedly closed with status signal","stacktrace":""}}
Msg Process unexpectedly closed with status signal
Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:26:55.152Z'
System info: host: 'Unknown', ip: 'Unknown', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-96-generic', java.version: '1.8.0_131'
Driver info: driver.version: FirefoxDriver
remote stacktrace:
Firefox version -60.0b10
Selenium -3.11.0
Using Gecko driver"
This error message...
1524549884141 webdriver::server DEBUG <- 500 Internal Server Error {"value":{"error":"unknown error","message":"Process unexpectedly closed with status signal","stacktrace":""}}
...implies that the marionette wasn't able to initiate an active connection with the WebClient i.e Firefox browser.
Your main issue is the version compatibility between the binaries you are using as follows :
Your Selenium Client version is 3.11.0.
Your JDK version is 1.8.0_131 which is pretty ancient.
Your GeckoDriver version is v0.20.0.
Your Firefox version is unknown to us.
So there is a clear mismatch between the JDK v8u131 , Selenium Client v3.11.0 and GeckoDriver v0.20.0.
Solution
Upgrade JDK to recent levels JDK 8u162.
Upgrade GeckoDriver to GeckoDriver v0.20.1 level.
Ensure that GeckoDriver is present in the specified location as per your code block.
Ensure that GeckoDriver is having executable permission for non-root users.
Upgrade Firefox version to Firefox v59.0.2 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 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 as a non-root user.
Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.

Failed to connect to SafariDriver (Safari 10)

I'm getting the following error when running my protractor test on mac for safari
Failed to connect to SafariDriver after 10082 ms
Build info: version: '2.53.1', revision: 'a36b8b1',
os.arch: 'x86_64', os.version: '10.12.2', java.version: '1.8.0_101'
Driver info: driver.version: SafariDriver
capability:
name: 'Safari',
browserName: 'safari',
logName: 'Safari',
shardTestFiles: true,
maxInstances: 2
Do we need a specific safari driver for this? If yes, where can I get it from and where should it be declared in the .conf file.
Thank you!
Yes, you need to install a specific safari driver in order to launch it inside of protractor. And of course, you need to be on a mac. Protractor is essentially a layer built on top of Selenium, so you need to install the selenium driver for Safari, which is implemented as a Safari plugin.
Here is what you need to do:
Download the safari plugin from here.
Run the plugin
Select "Trust" the plugin when prompted by safari
The driver is now installed and should be available to your protractor process.
This is the driver for Selenium 2.48. I couldn't find a more recent build, so if this driver version doesn't run with the current version of Protractor, you will need to either use an older version of protractor that is based on Selenium 2.48 or build the safari driver from source.
First of all, starting with Safari 10, Safari comes bundled with a new driver implementation. The old driver (the extension) is deprecated. You're using macOS 10.12.2, so it's your case. To enable the new driver in Safari, toggle the Allow Remote Automation checkbox in the Develop menu. If you don't have this menu, enable it: Preferences > Advanced > Show Develop menu in menu bar. Start /usr/bin/safaridriver once manually to grant it the permissions needed.
Secondly, you need a 3.x version of the Selenium Standalone Server, not 2.53.1. The command to install it:
sudo webdriver-manager update --versions.standalone 3.0.1
To start:
webdriver-manager start --versions.standalone 3.0.1
Thirdly, the visibility checks are broken in the new driver. So things like browser.wait(ExpectedConditions.visibilityOf(myElement), 5000); don't work and lead to UnsupportedCommandException. In order to fix this, you can try installing Safari Technology Preview and running tests there (add 'safari.options': { technologyPreview: true } to the capabilities). But for me, the preview works even worse than the release. Protractor says it can't find Angular on the page because they changed window.name to be cleared after a cross-origin navigation in the Release 19. If you happen to find a way to make it work, please let me know.
Below are some links you should check because I might have missed something.
The blog post that announces the new driver in Safari 10
Issues in the Protractor project:
Safari 10 failing with the latest protractor
Safari Technology Preview can't find Angular 1