Selenium Interview questions and answers with Real examples

This post is mainly for people preparing for interviews.Before posting Selenium Interview questions and answers let me clear that it totally depends on a number of factors.

 

1- For which position you are applying.

2- Who is taking your interview?

3- For which company you are applying. 

4- Does Interviewer’s themselves knows about automation or not?

 

You must be wondering why I am covering all these factors right. I have taken a couple of interviews and based on my experience I will tell you what questions an Interviewer might ask.

If you are applying for Sr Automation Engg, Lead or Test Manager then be ready with some high-level topics, which anyways I will be covering in this post.

However, if you are applying as a fresher, then you should be ready with some Java program and some Selenium related code.

Before getting started keep in mind that there is not hard and fast rule that, the interviewer will ask questions from a specific domain. It might cover multiple domain/tools.

 

Download complete answers from here 

Selenium Interview questions and answers

1- What is Selenium Webdriver, Selenium RC, Selenium IDE and Selenium Grid and which version you have used?

Ans- I have posted a detailed article on this please check – Click here

 

2- Can you please explain Selenium Architecture?

Ans- Coming soon.

 

3- Have you worked on different browsers? Have you ever performed Cross browser testing?

Ans- Every month a new browser is coming into the market and it becomes very important to test our web application on different browser. Selenium supports Cross browser testing. Please check the detailed article here.

Cross Browser Testing in Selenium

 

4- What type of test you have automated?

Ans- Automation mainly focuses on regression testing,smoke testing and some time you can for End to End test cases.

 

5- How many test cases you have automated per day?

Ans- It totally depends on your manual test cases. Sometimes we can automate 3-4 test cases per day which contain limited operation and some validation. Some test cases may take 1 day or more than one day as well.

It totally depends on test case complexity.

 

6- How to work with Chrome, IE or any other third party driver? Why we need a separate driver for them?

Ans- Selenium by default supports only Firefox browser so in order to work with Chrome and IE browser  we need to download separate drivers for them and specify the path. I have created the seperate post for IE and Chrome browser. In case you are not aware of it then have a look.

Execute test in chrome browser

Execute test in IE browser

 

7- Have you created any framework? Which framework have you used?

Ans- Coming soon.

 

8- Can you please explain framework architecture?

Ans- Coming soon.

 

9- What is POM (Page Object Model) and what is the need of it?

Ans- Coming soon.

 

10- What are the challenges you have faced while automating your application?

Ans- Coming soon.

 

11- What are the different type of exception available in Selenium? Have you faced any exception while automation?

 

12- What is Alert window/ JavaScript Alert and How to handle alert in Selenium Webdriver?

13- How to handle multiple windows in Selenium?

14- Have you ever worked on frames? In addition, how to handle frames in Selenium?

15- What are different locators available in Selenium?

16- Can you please explain XPATH and CSS technique? How to  handle dynamic changing elements?

17- How to verify checkbox (any element) is enable/disabled/ checked/Unchecked/ displayed/ not displayed?

18- How to work with the dropdown?

19- Have you worked with Web table (Calendar)? If yes then what was your approach.

20- Can you tell me some navigation commands?

21-   Difference between QUIT and Close?

22-   Can you find the number of links available on Webpage? In addition, How to find broken link on Webpage?

23- What is Page Load Timeout?

24- Can you explain implicit wait, explicit wait and fluent wait and what is the difference between all of them? Which one have you used frequently?

25- What is JavaScript Executor and where you have used JavaScript executor?

26- How to capture Screenshot in Selenium? Can we capture screenshot only when a test fails?

27- What is Web Driver Listener and Usage of the same?

28-How to scroll in Selenium Webdriver?

29- Can you write login script for Gmail or any other application?

30- How to upload files in Selenium? Have you ever used AutoIT?

31- How to handle untrusted Certificate in Selenium?

32- How to handle window authentication window in Selenium Webdriver?

33- What is Firefox Profile?

34- What are the issues or Challenges you faced while working with IE Browser?

35- Have you ever faced any proxy issue if yes then how you handled?

36-   What is Actions class in Selenium (How to perform Mouse Hover, Keyboard events, DragAndDrop etc?)

37- Do we have object repository concept in Selenium if yes then please explain how we can achieve it?

38- What is Headless testing? Can we capture Screenshot in Headless mode?

39-Diffrence between findElement and FindElements?

40- Can we highlight Element in Selenium?

41- What is log4j And How to generate log files in Selenium?

42-How to capture Page title, tooltip and error message and how to verify them?

43-How to download files in Selenium?

44- Have you ever performed Database testing in Selenium?

45- Have you integrated Selenium with other tools like Sikuli, Ant, Maven, and Jenkins? If yes then how you have used them?

46- Does Selenium support Mobile Automation if yes the How?

47- What is Limitation of Selenium?

48- Have you ever heard of POC? What is POC?

49- What is ATLC (Automation Test life Cycle)?

50- What is Automation Test Plan?

51- What is ROI (Return of Investment) in Automation?

 

Selenium Webdriver/RC/IDE Interview questions and Answers

 

All these questions that we discussed now that is the combination of all level (Beginner, Advance).

They will definitely ask so many questions from Framework itself and they will try to drag you in this topics because most of the people will stuck and the interviewer will get to know that person has actually worked on Selenium or not.

Please make sure you are giving proper answer

52- Have you designed framework in your team or you are using existing framework, which already implemented by other members.

53- Can you create the design of your framework?

54- Which framework you have used and why?

55- Can you create one sample script using your framework?

There is again no limitation or specific question so be ready with any type of question but make sure whenever you are giving an answer it should have a valid point or you can directly say that I am not sure about it.

 

Selenium Interview questions and answers

If you answer 6-7 out of 10 then it is enough.

We have more question for you, which you must know because we all have worked on TestNG with Selenium and it is one of my favorite Tool, which I have used it with Selenium and I really enjoyed a lot.

Since TestNG is not a very big tool so do not worry about it and it has very good documentation on their official site so if you want to check then check out below link – http://testng.org/doc/documentation-main.html

Here is a list of questions for TestNG

56- What is TestNG?

57- Why you have used TestNG in your framework? Can you compare JUNIT with TestNG framework?

58- What are different annotation present in TestNG?

59- What is priority feature in TestNG? In addition, how we can use this?

60- What is dependsOnMethods and depends on group feature in TestNG?

61- What is testng.xml file in TestNG?

62- How to group test cases in TestNG?

63- How to execute multiple test cases in Selenium?

64- How to execute parallel test cases in Selenium?

65- What is TestNG listener?

66- What is Data provider in TestNG?

67- How to disable particular test case?

68- How to generate reports in TestNG?

69- How to generate log in TestNG?

70- How to execute only failed test cases in Selenium?

 

Now if an interviewer having good knowledge on Selenium and have worked on different tools then be ready with other question too that will be related to Selenium only.

We have so many tools in the market that we can integrate with Selenium like Maven, Sikuli, Jenkins, AutoIT, Ant and so on.

I will try to summarize question-based on the tools, which I have used.

 

Maven

71- Can you please explain what is apache maven and Apache ant?

72- Do you have used Maven project in your organization? If yes then have you created build to execute your test?

73- What is the difference between Simple Java project and Maven Project?

74- What are different goal present in Maven?

75- Can you please explain Maven life cycle?

 

Sikuli

76- Have you heard of Sikuli? If yes, can you please explain what exactly Sikuli does?

78- Advantage of Sikuli, Limitation of Sikuli.

79- How to integrate Sikuli with Selenium script?

80- Can you tell us the scenario where you have used Sikuli with Selenium?

 

Jenkins

This is very vast topic and very interested but as an automation tester, you will use it based on requirement

81- What is CI (Continuous integration) and what are different tools available in the market.

82- How to integrate Jenkins with Selenium?

83- How to schedule test cases for nightly execution?

84- Can you send email through Jenkins?

85-Jenkins master-slave concept and so on?

 

Random Questions

86- What is robot class and where have we used this in Selenium?

87- Be ready with some basic Java programs which every automation Engg should know

Like string reverse , count the number of characters in a given string and so on.

If you will apply for Amazon, Flipkart then makes sure you know Data structure very well because question level will be very high.

88- List down all locator with performance.

89- Find broken links on the Web page.

90- How to read write excel files using Apache POI.

91- Have you ever done connection with Database using JDBC?

92- Read CSV files.

93- How to read properties files in Selenium?

Ans-

 

94- Does Selenium support mobile automation?

Ans- Selenium support mobile automation using Selendroid and Appium.

 

95- What is Selendroid?

Ans- Selendroid is an API to automate android mobile application. It will only work with API level 18 and if you have android version 19 or above then you have to use Appium.

 

96- What is Appium?

Ans- Appium is API to automate mobile applications on Android and IOS Platform. you can check complete tutorial from below link.

Basic appium tutorial for mobile automation.

 

97- What is same origin policy in Selenium?

98- What is Selenium grid, hub, node and commands that used in Selenium Grid?

 

99-What is the difference between / and // in XPATH?

Ans- This is very easy as compared to others 🙂  / refer to next element just after the parent and // refer to all child element after the parent element.

Different ways to write Dynamic xpath in Selenium

 

100- Can we automate Flash application in Selenium?

Ans-    Yes partially we can do. We have some API which allows you to automate flash application. I have posted article long back which will cover the same. Kindly refer below link.

Simple API to automate  Flash Application.

 

I hope above question will help you. Feel free to comment below if any doubt or query.

If you want to add any questions that I have missed out then suggest me in the comment section so that I can add for others too.

Finally Best of Luck 🙂

 

194 Comments

  1. shruthi
  2. nirmala vare
  3. Priti
  4. Ganesh
  5. Ravirajsinh Parmar
  6. kiran reddy
  7. sowmya
  8. mani
  9. Priyanka
  10. Ravi