Selenium webdriver 3.3.0 geckodriver error for firefox - ruby

I'm trying to execute a ruby script on my Windows 10.
Setup Details:
Browser :- latest version of Firefox, <br>
ruby -v 2.2.6<br>
gem -v 2.4.5.2 <br>
selenium webdriver -v 3.3.0
Now i got an error that it cant find geckodriver. I also downloaded geckodriver and added it to the Path.
This is the error message that I get:
Selenium::WebDriver::Error::WebDriverError: Unable to find Mozilla
geckodriver. Please download the server from
https://github.com/mozilla/geckodriver/releases and place it somewhere
on your PATH. More info at
https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver.
How can i solve this problem?

It is clear from the error message which is Unable to find Mozilla geckodriver and place it somewhere on your PATH
Here is what you need to do:
Download the latest stable gecko driver & place it in a folder in "C:\abc".
Rename the gecko driver to geckodriver.exe
Download and install the latest released Mozila Firefox.
Ensure you are using either 32 bit or 64 bit for both.
Keep your code like:
System.setProperty("webdriver.gecko.driver", "C:\\abc\\geckodriver.exe");
WebDriver driver = new FirefoxDriver();
driver.manage().window().maximize();
driver.get("http://gmail.com");
Let me know if it works for you.

Related

Selenium ChromeDriver Version Conflict

My Selenium program written with Ruby randomly stopped working (it ran perfectly yesterday) and gave me this error:
Backtrace:: session not created: This version of ChromeDriver only supports Chrome version 89 (Selenium::WebDriver::Error::SessionNotCreatedError)Current browser version is 91.0.4472.77 with binary path C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe
I've since tried:
Un & re-installing ChromeDriver (newest version, as I was using before)
Replacing my current version with version 89 along with changing the path (this resulted in the same error)
Following these similar issues 1 & 2
I'm not sure where to go from here
I had a similar problem recently with the C# version.
I would double check where Selenium is being ran from.
In my case it was debug/netcoreapp3.1\chromedriver.exe, so it was running an outdated version compared to the version of Chrome installed.
Make sure you have the correct ChromeDriver version from here
If this fails, check the Ruby bindings wiki here
I had the same problem, but in C#. I had to update Nugget for ChromeDriver to match versions. So I basically updated my ChromeDriver to 91.0.4472 and it's resolved the issue.

How to add Selenium 2.48.2 in Mozila Firefox 41.0.2?

I got an error while adding selenium 2.48.2 in latest Mozila Firefox 41.0.2. an error is: " this add-on could not be installed because is appears to be corrupt."
Please solve my problem.

Downgrade Safari webdriver extension version to 2.38

There is a known issue with the Safari WebDrier extension version 2.45 working with Protractor (found here), i need to downgrade to 2.38 to work with my protractor tests, any idea how i can do this?
i managed to locate the 2.38 extension .jar file (found here), i extracted the jar file and located the .safariextz file but when i installed using that it just installed 2.45 anyway instead of 2.38
I am completely new to Mac so that's why i don't know, i cant seem to find anything about downgrading safari extensions

Selenium does not work when we get a upgrade from firefox

I am working on Automation tool Behat/Mink . After upgrading Firefox version to 25 , i am seeing this error .
Curl error thrown for http POST to http://localhost:4444/wd/hub/session/execute with params: {"script":"return document.getElementById('user') !== null;","args":[]}
Failed to connect to 127.0.0.1: Can't assign requested address
I am using selenium webdriver version 2.37.0.jar as the server.
Support for Firefox 25 has been added in version 2.38. Current version is 2.39 which supports Firefox 26.
It is a good practice to check for the new selenium version every time Firefox upgrades. Updating the server should work.
Official download page.
run this command before running your tests
java -jar selenium-server-standalone-*
this will help you to resolve your problem
make sure your selenium latest version should be on same folder

How to install Selenium WebDriver on Mac OS

How to install Selenium WebDriver on Mac OS X 10.7.5 supporting Chrome, Firefox and safari ? What I have to set, where to install.
Install
If you use homebrew (which I recommend), you can install selenium using:
brew install selenium-server
Running
updated -port port_number
To run selenium, do: selenium-server -port 4444
For more options: selenium-server -help
Mac already has Python and a package manager called easy_install, so open Terminal and type
sudo easy_install selenium
To use the java -jar selenium-server-standalone-2.45.0.jar command-line tool you need to install a JDK.
You need to download and install the JDK and the standalone selenium server.
First up you need to download Selenium jar files from http://www.seleniumhq.org/download/. Then you'd need an IDE, something like IntelliJ or Eclipse. Then you'll have to map your jar files to those IDEs. Then depending on which language/framework you choose, you'll have to download the relevant library files, for example, if you're using JUnit you'll have to download Junit 4.11 jar file. Finally don't forget to download the drivers for Chrome and Safari (firefox driver comes standard with selenium). Once done, you can start coding and testing your code with the browser of your choice.
I installed Selenium web driver (for Chrome) by first:
downloading the appropriate web driver from here.
then navigated to mac's folder /usr/local/bin and pasted the downloaded web driver there.
Afterwards just ran the file there by double clicking it.
The file was installed there so that we do not have to specify the WebDriver path when instantiating the browser.
For more detailed walkthrough, you can reference from here.

Resources