Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
465 views
by Expert (572 points)
retagged by
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 like 0 dislike
by Master (1.2k points)

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!


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

1.4k questions

1.6k answers

866 comments

1.9k users

...