Selenium Webdriver Interview Questions for Software Testers

Automation technology is evolving quite rapidly and so is the Selenium Webdriver. Earlier, we’d Selenium RC, then came Selenium 2.0 aka Webdriver. And not so long ago, we heard rumors of Selenium 3.0. For some people, change is hard to accept but in reality it’s inevitable. You’ve to honor the change even if you are resistant to it. Hence, we too have to sync with the trends. We allow changes either by updating the existing posts or by adding a new set of Selenium Webdriver interview questions and answers through a new post. That’s how we make sure that none of our readers miss on a new concept or testing area which could be vital for their preparation.

So, to continue with the changes we’ve added a new list of Selenium Webdriver interview questions in this post. Some of these belong to the areas that we haven’t covered in previous posts. And most of them our team recently picked up in real time from the candidates who shared their views after their interview. So, we urge you to read the whole post and a little practice to get the best results. Also, don’t at all hesitate to share your experience or queries with us.

Just to share a quick update, we do have a lot of exciting Selenium quizzes on this blog. So, please see if you want to give them a try. You can run through these quizzes even after finishing the current post.

Discover the Most Recent Selenium Webdriver Interview Questions.

1- First of all, start with a generic set of Selenium Webdriver interview questions.

Q#1: Selenium WebDriver and Selenium IDE – Why do you use web driver backed selenium?

If we have existing Selenium RC test scripts, and we wish to avoid using Selenium RC. Then, instead of using web driver, we should use web driver backed selenium which is more realistic in this case.

Q#2: Point out what are the essential features of Selenium Webdriver/ Selenium v2.0?

We should use WebDriver when there is a need to improve the following operations.

1- Handling of recurring frames/pop-ups, many browser windows, and alerts.

2- Page navigation /drag-drop operations.

3- Ajax dependent UI elements.

4- Cross browser testing including improved functionality for the browser (was not fully supported by the Selenium RC).

Q#3: List out the benefits of Webdriver over Selenium RC (1.0) Server?

1- If you’ve started using Selenium-WebDriver, then you won’t need the Selenium Server as it uses an entirely different technology.

2- Selenium Server (part of 1.0) provides Selenium RC functionality. It intends to support Selenium 1.0 backward compatibility with this feature.

3- Selenium Webdriver hits native browsers calls for accessing HTML objects whereas the Selenium RC does it via selenium server to inject Javascript into the browser.

Q#4: What are the major Browsers that Selenium Webdriver supports?

The Selenium Webdriver framework offers generic APIs that can test your web application with different browsers. We’ve listed some of them next in line.

1- Firefox Driver: For Mozilla Firefox browser.
2- Internet Explorer Driver: For Internet Explorer browser.
3- Chrome Driver: For Google Chrome browser.
4- HtmlUnit Driver: GUI-Less(Headless) browser for Java applications.
5- Opera Driver: For Opera browser.

2- Secondly, let’s find out what’s inside the basic set of Selenium Webdriver interview questions?

Q#5: Selenium WebDriver – What is the difference between “/” and “//” in Xpath?

1- Single Slash “/” – With a single slash, we can create XPath with absolute path.
2- Double Slash “//” – With a double slash, we can build XPath with a relative path, i.e., the XPath would be set up to start selection from anywhere in the document.

Q#6: What is the limitation of Webdriver that you may face while adding capabilities for performing tests on a browser which is not supported by the Webdriver?

A major limitation of appending capabilities is that the “findElement” command may not work as expected.

Q#7: Selenium WebDriver – How to check if an element is visible on the web page?

You may need to use the isDisplayed() method. It returns a boolean type. If the return value is true, it means the element is visible otherwise it’s not.

Q#8: What are the five different exceptions that the Selenium Webdriver supports?

The five principal exceptions occur in Selenium Webdriver are.

1- WebDriverException
2- NoAlertPresentException
3- NoSuchWindowException
4- NoSuchElementException
5- TimeoutException

3- It’s time to face the intermediate level of Selenium Webdriver interview questions.

Q#9: Selenium WebDriver – How do you handle alert pop-up?

To work with alert dialogs, the first action you should take is to switch the control to alert dialogs then press the “OK” or “Cancel” button. And finally, you can move control back to the web page.

Sample source code.

Q#10: What is the best approach to switch between frames?

To changeover between the frames, we can use the following Webdriver method.

It can accept any of the below three arguments.

1- A number:  It picks the number based on its (zero-based) index.
2- A number or ID: We can choose a frame either by its ID or name.
3- Previously found WebElement: We can use the previously located WebElement to select a frame.


4- Now is the turn to deal with some advanced level of Selenium Webdriver interview questions.

Q#11: How would you use Selenium Webdriver to upload a file?

You can use the “type” command to write in the file input box of the file upload dialog. Then, you can use the “Robot” class available in JAVA to start the file upload task.

Q#12: In Selenium WebDriver, how do you select an item from a drop-down menu?

We can choose an item from the pull-down menu by Value, by Index or by Visible Text.


Q#13: Explain how you can find broken images in a page using Selenium Webdriver?

To locate the broken images on a page, you may use Selenium web driver to retrieve the XPath and fetch all the links in the page using the tag name.

After this, click all the links on the page and check for the 404/500 errors in the target page title.

Q#14: Selenium WebDriver – How do I remove the content of a text box in Selenium 2.0?

Q#15: Describe how you can use the recovery scenario with the Selenium Webdriver?

Recovery scenarios normally depend on the programming language you use. If you are working with Java, then you can try exception handling to overcome the same.

Add the “Try Catch Block” within your Selenium Webdriver Java tests.

5- Finally, we are approaching the expert level of Selenium Webdriver interview questions.

Q#16: Is there a way to do drag and drop in Selenium Webdriver?

Yes, you may use the following code to perform the drag and drop operation.

Q#17: How would you count the Elements on a Webpage with Java & Selenium Webdriver?

Selenium RC (1.0) uses ‘getXpathCount’ method to identify the no. of XPath attributes on the webpage.
But, in Selenium (2.0) webdriver, we can achieve it in the following way.

Q#18: Explain how can the Webdriver imitate the double click?

You can perform the “double-click” simulation by using the below command.


Q#19: Selenium WebDriver – What is the recommended method to capture a screen shot using Webdriver?

Q#20: Selenium WebDriver – How to login into any site if it is showing any authentication pop-up for username and password?

Pass the username and password with URL.


Summary – Selenium Webdriver Interview Questions for Testers.

Hopefully, the above list of top Selenium Webdriver interview questions will help you in preparing for your interview in the new year 2016. There is a lot of other Selenium learning stuff available on our blog; it will certainly help you in improving your Selenium test automation skills.





  1. Abhishek Reply
  2. anonymous Reply

Leave a Reply