Top 5 Selenium WebDriver Interview Questions And Answers Part-1

Now a days, Many companies are using selenium webdriver to automate web application testing process. Requirements of selenium webdriver automation testing tool professionals Is Increasing day by day. Here I am presenting list of selenium webdriver Interview questions with answers to help you attending Interview In IT companies.

You can VIEW ALL SELENIUM TUTORIALS to understand each and every point on selenium webdriver In deep.

Selenium Interview Questions With Answers

Part 1

1 : What Is Selenium WebDriver/Selenium 2?
Answer :
What Is Selenium WebDriver?
  • Selenium WebDriver software testing tool Is well designed object oriented API which Is developed to automate web and mobile applications testing process. WebDriver API Is bigger than Selenium RC but It's Architecture Is simple and easy to understand compared Selenium RC API. 
  • We can automate our web application's software testing process using selenium webdriver.
  • We can say it is advanced version of selenium RC software testing tool because some limitations of selenium RC has been overcome In selenium WebDriver software testing tool. 
  • WebDriver Is designed to provide better support for dynamic changing pages. Example : Web page elements of software web application is changing without reloading the page. In this case WebDriver works better.
  • Selenium Webdriver software testing tool Is more faster that Selenium RC software testing tool as It Is directly Interacting with web browsers and mimic the behavior of a real user. Example : User clicks on button of web page or moving mouse on main menu to get the sub menu list. WebDriver works Same.
  • All popular browser vendors are active participants In selenium WebDriver's development and all of them have their own engineers team to Improve this framework. 
You can Include answers of Question 2, Question 3, Question 4 and Question 5 In answer of this question If Interviewer need more detail on selenium webdriver.

2 : Tell Me WebDriver Supported Browsers?
Answer : Selenium WebDriver API has a many different drivers to test your web application In different browsers. List of Webdriver browser drivers are as bellow.


Selenium WebDriver Supported Browsers
  • Firefox Driver - For Mozilla Firefox browser
  • Internet Explorer Driver - For Internet Explorer browser
  • Chrome Driver - For Google Chrome browser
  • HtmlUnit Driver - GUI-Less(Headless) browser for Java programs
  • Opera Driver - For Opera browser
3 : Tell Me WebDriver Supported Mobile Application Testing Drivers?
Answer : We can get support of mobile software application testing using Selenium webdriver. Selenium WebDriver supports bellow given drivers to test mobile application.

selenium supported mobile app testing drivers
  • AndroidDriver
  • OperaMobileDriver
  • IPhoneDriver
4 : Which Programming Languages Supported By Selenium WebDriver To Write Test Cases?
Answer : Selenium WebDriver Is very wast API and It support many different languages to write test cases for your software web application. List of WebDriver supported languages are as bellow.

Selenium supported languages
5 : Which Different Element Locators Supported By Selenium WebDriver?
Answer : Selenium WebDriver supports bellow given element locators.

Selenium supported element locators

Points to remember for selenium interview


Few points to remember about selenium when you are going for selenium interview. As interviewer may wants to check your knowledge on these things too.

1. Selenium Projects : selenium interviewer may wants to know your knowledge on different selenium projects. Selenium is not a single project. There are multiple selenium projects like Selenium IDE, Selenium RC(Remote Control), Selenium WebDriver and Selenium Grid. All these projects are developed for web application's testing purpose.

2. Selenium IDE is Limited version : Selenium IDE(Firefox Add-on) is record and playback tool. You can automate simple web application scenarios(Example : Form submission, Navigation, etc..) using selenium IDE. But if you wants to automate complex scenarios then it will be hard to automate it using selenium IDE. In this case, You can use selenium RC or selenium webdriver.

3. Selenium Open-source : All the selenium projects are open-source so you can use any of them in free as per your requirement.

4. No built-in IDE : Commercial automation tools like QTP and TestComplete have it's own IDE(Integrated development Environment) to write automation test scripts. But selenium do not have it's own IDE. So it relies on other IDEs like Eclipse(Java), Visual Studio(C#), etc.

5. Be master in programming : To be good tester in selenium and work with giant companies, You must have strong knowledge of any one programming language. You can choose language as  per your interest. So i am suggesting you to be master in your selected language before learning selenium. Interviewer will ask you 60% programming language questions and 40% selenium interview questions.

6. What is test automation in software testing? : Selenium interviewer may ask you this question. In software testing, Test automation is process of testing software application automatically using special software. It will control test cases execution it self, compare expected and actual test results and provide test result reports.

7. What are the benefits of test automation? :
  • Save time and money : Automation testing will save time and money as we need to create test automation scripts just once and then we can run it whenever required. Automation test scripts will run itself so required very less human efforts compared to manual testing. Also you can test your application in different browsers using same test script so it will decrease your rework.
  • Improve testing accuracy : Sometimes human can make mistake but machine can't. Once you record script in correct way, tool will run it every time as expected so it will improve your testing accuracy.
  • Test Coverage : As your all test cases are scripted so all the test cases will be executed in each test cycle on all browsers. So it will improve your test coverage.
8. Why selenium as automation tool?
  • It is Open-source testing tool.
  • Able to operate it on almost all OS.
  • Selenium support multiple languages to create test scripts so you can choose your preferred language.
  • Selenium support multiple browsers.
  • Good online support.
  • Selenium allow us to integrate other open-source unit testing frameworks like TestNG, JUnit, NUnit.
  • Using selenium Grid, We can run automation tests simultaneously on different machines, OS and browsers.
  • Able to create frameworks as per your requirement like Keyword Driven, Data driven and Hybrid etc.
  • We can integrate selenium with maven. Maven is helpful to compile source code, set dependencies so that it will download required files automatically.
  • Also we can integrate Jenkins or Hudson with selenium for continuous integration.
  • We can use selenium to test web applications in mobile too.
  • It is not only testing tool but if you have repetitive web-based tasks then you can use selenium to perform those tasks automatically.


16 comments:

  1. Please update more question with difficulty standard. Sir during interview lot of questions are asked related to different scenarios and project related work..please guide us for the same too.
    Regards,
    Roshan

    ReplyDelete
    Replies
    1. I am In process to publish more and more questions with answers.. All of you can also share your Interview questions by commenting here. I will try to answers them.

      Delete
    2. Hi Aravind,
      In one of my interview,the interviewer asked me to write scripts on Flipcart..
      Scenarios are:-
      -Login
      -Shop 3 things
      -Get the CART value(Display)
      -Logout...

      I wrote the scripts and executed well...later he said me to write scripts in Modular wise...got confused and said i don't know....

      What i have to do next time when i get into such question again..

      Thanks,
      Max

      Delete
    3. Hi Max,
      Modular here implies, that your script should have a flow via methods, where one method calls other or Depends upon other methods, basically we can use TestNG annotations, for this purpose.

      Hope it solve your query.
      Thanks
      Shanky Kalra

      Delete
    4. Hi Max,

      For Modularity, better to use Page Object Model where you have to create separate class for each page of website and write method is respective class for operation on that page.

      This is standard practice for selenium automation.

      Delete
  2. How we can Automate or finding UI elements when the web page designed in .net language? interviewer asked me this question.

    ReplyDelete
    Replies
    1. language does not matter In finding UI elements.

      Delete
  3. Your article is too good but it will be really helpful if you can share video sessions.

    ReplyDelete
  4. Hi Max,

    Can you please tell me can we automate CAPTCHA Using Selenium webdriver.If yes then how? If no then why?

    ReplyDelete
    Replies
    1. We cannot use webdriver for captcha.because it doesnt provide the facility.

      Delete
  5. Hi Max,

    Can you please tell me whether can we automate CAPTCHA using Selenium webdriver? Is yes then how? If no then why?

    ReplyDelete
    Replies
    1. Hi Pathi,
      We can't automate captcha using selenium. Selenium is not able to read captcha and barcodes. This can be seen as a drawback. But i think it is necessary for security of a live application. Otherwise we can flood the database of a live application which does not have captcha for registration or login.

      Delete
  6. Really very good article on AT, I am new in automation testing could you provide some sample script example in java

    ReplyDelete
  7. Can you please provide script for scan feature in Appium using selenium web driver?

    ReplyDelete
  8. Nice articles. It will be more helpful if u can share more interview questions

    ReplyDelete
  9. one interviewer asked me how how can i retrieve data from web table ? from table, there are 3 row and 4 column , in first row sl no , employee name , employee phone no in active state , then 2nd row contains same thing but phone no in deactive state , write a selenium code for active state, which is in first row.?

    ReplyDelete