Watir webdriver: Doesn't do anything after opening browser (firefox) - selenium

It was working fine before, now whenever I run the script it just opens Firefox then does nothing. It works when running with chromedriver though.
Tried updating gems etc, but no success.

The latest Firefox version will no longer work with the legacy Firefox Driver. To use Watir with Firefox 48+ you need to download geckodriver and follow the instructions for Ruby.
Since Geckodriver is not yet feature complete, you most likely will want to continue using the legacy Firefox Driver, which means either using Firefox ESR or downgrading to Firefox 47.0.1.

Related

How to update Chromedriver version in PyCharm for selenium-robotframework

I am using PyCharm to run my robot framework-selenium scripts.
I am facing an issue
SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 91 Current browser version is 93.0.4577.63 with binary path
Attached are my settings.
How to upgrade chromedriver for Chrome version 93 or any other suggestion. I have 75 automation scripts and it is not feasible to add driver = chrome path in all the scripts.
Browser drivers
The general approach to install a browser driver is downloading a right driver, such as chromedriver for Chrome, and placing it into a directory that is in PATH
Drivers for different browsers can be found via Selenium documentation or by using your favorite search engine with a search term like selenium chrome browser driver. New browser driver versions are released to support features in new browsers, fix bug, or otherwise, and you need to keep an eye on them to know when to update drivers you use.
Alternatively, you can use a tool called WebdriverManagerwhich can find the latest version or when required, any version of appropriate webdrivers for you and then download and link/copy it into right location. Tool can run on all major operating systems and supports downloading of Chrome, Firefox, Opera & Edge webdrivers.
Here's an example:
pip install webdrivermanager
webdrivermanager firefox chrome --linkpath /usr/local/bin
Please go through, here, everything is documented here.

How to allow pop-ups in firefox? (used from selenium)

When using Selenium, Firefox is disabling pop-ups even on websites where it is explicitly told to allow them. Disabling the pop-up blocker entirely does not fix it.
Version: Firefox 80.0.1 (64-bit)
Tt seems that it was caused by an old version of geckodriver not working with the latest version of firefox (which had auto-upgraded).
Solution is to upgrade geckodriver or to downgrade firefox.
Details here.

How to update chromedriver version to 35?

I am using chromedriver version 2.10. I have update the version to 35.
Could anyone provide how can i achieve that?
Read on if your webdriver-manager update doesn't update chromedriver
to the latest.
I lost a few weeks pulling my hair around an issue I had with "Unable to discover open pages" and every time I would update the chromedriver, it would update to version 2.22 for chromedriver and I believe the selenium server to v2.53.
My problem wasn't really with the selenium server so v2.53 was fine.
Issue was with chromedriver v2.22.
Eventhough this chromdriver link showed that there was a latest version of 2.24, 'webdriver-manager update' would NOT pick up that latest version, it would only grab version 2.22 of the chrome driver.
How did I go around this?
Simply run the command below after you check this link for which version of chromedriver you want to update to; for instance, I wanted v2.24 so I ran the command below:
webdriver-manager update --versions.chrome 2.24
If you check your location: C:\Users\<USER>\AppData\Roaming\npm\node_modules\webdriver-manager\selenium\
You should see that the desired chromedriver was downloaded there; if it's not there, read the command prompt logs and it'll tell you where it downloaded your chromdriver files.
Hope that helps someone!
Chromedriver latest version is 2.10. You can check versions http://chromedriver.storage.googleapis.com/index.html.
We can update chrome version to 35 http://filehippo.com/download_google_chrome/57050/
You should distinguish between chromedriver and chrome as a browser.
The version of chromedriver is not connected with version of chrome browser but you'd better use the latest version of chromedriver.
ChromeDriver and Chrome browser are two separate applications.
ChromeDriver is an implementation of WebDriver, an API which allow us to control browser behaviour.
In ChromeDriver case it's used to control Chrome browser of some version.
As you noted, ChromeDriver last version is 2.10
The version of the Chrome browser which is controlled by the ChromeDriver, got separate development flow and get updated independently to ChromeDriver, Chrome browser version in your case is 35.
In conclusion, don't mix the two applications, they different.
P.S. it's important to note, that in some occasion when new browser version released, the according driver got updated to in order to update it's behaviour according to the new developments of the browser.

Selenium not working in firefox 23.0.1 (Mac and Windows)

I have a client who had a script working and now stopped working. I run it in my computer and it works (i runned it on Linux and Windows). My client runned it on Mac and Windows.
I am new to Selenium, but the part of the code that crashes is where Selenium takes place, it gets the Firefox to open but not load the page. I think it migth be a problem with the webDriver of Selenium that must be updated.
I told him to install pip in his Mac and uninstall Selenium and reinstall it, is this how it is done in OS machines? Is there any issue related to my problem?
Thanks
It would be helpful if you had specify Selenium version and also which browser are you using and it's version too. But the behavior you described seems to be caused by having newer version of browser which the Selenium version you using doesn't support. So upgrading to newest version of Selenium (2.35) will likely make this problem disappear.

Firefox version supported by selenium webdriver 2.25.0

I restarted working on an older rails project today. One problem driving me crazy is that I can't get my javascript test cases to run, although I remember them all passing when I left the project. I am using
selenium-webdriver 2.25.0
capybara 1.1.2
cucumber 1.2.1
but firefox doesn't start when I run the tests. All I get is
unable to start Firefox cleanly, args: ["-silent"]
(Selenium::WebDriver::Error::WebDriverError)
I guess this is because of updating firefox and I tried to install several older versions but none of them works. Which version is supported by selenium-webdriver 2.25.0?
Yes, this is annoying. I just upgrade the driver and it usually does the trick:
bundle update selenium-webdriver
Selenium Webdriver 2.25 supports Firefox up to version 17