0
Should I upgrade from Selenium 2.0 to Selenium 3.0? What are things I should remember before I upgrade?

Open 1 Answers 25 Views
We have been using Selenium 2 in our project since its release. Now, we are planning to upgrade to Selenium 3. What are things I should take care of before I upgrade? Will that be an easy process? Do I need to change any code base?

1 Answer

0

In my opinion, you can upgrade your library to Selenium 3.0. Selenium 3.0 is more focused about Mobile Test automation and has bug fixes from Selenium 2.0. There is no change in architecture and also code. So, you can easily upgrade without changing any line in your existing page.

The only thing you will need to change is the usage of geckodriver. If you have not started to use geckodriver for Firefox, you should first upgrade your latest version of Firefox, download the geckodriver and set it in System.property before initiating the Firefox or Marionette Driver.

System.setProperty("webdriver.gecko.driver", "\\drivers\\geckodriver.exe");

To know the difference between Selenium 2.0 and 3.0, you can go here: https://softwaretestingboard.com/qna/1289/what-is-the-difference-between-selenium-2-0-and-selenium-3-0

Another thing that we noticed is WebDriverWait class does not work anymore in Selenium 3.0. So, if you have many places where you are using WebDriverWait, you should first consider changing it to FluentWait.

You can also fix it by using Guava library in maven,

<dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>21.0</version>
</dependency>

Hope that helps!

answered Jul 27 by mayur (15 points)
...