Selenium Interview Questions Asked in Companies

In this tutorial, we have listed sample of Selenium interview questions asked in companies that have been recently asked in different companies from freshers and 2 to 3 years experienced candidates.


These questions asked in companies will help you to know how to prepare for interview for selenium automation testing?. All these interview questions are important for fresher and 2 to 3 years of experience and always asked in Selenium interviews.

If you have attended any interviews in the company for Selenium automation or manual testing, please, send sample of interview questions asked on the below email id to help your friends.

Email id: [email protected]

Selenium interview questions asked in different companies

List of Selenium Interview Questions asked in different Companies

Zensoft, Pune

1. What is the difference between String and StringBuilder in Java?
2. Write a program for swapping of two numbers without using third variable?
3. Write a program to reverse string without using any function?
4. Write a program to find the common element from two arrays?
5. What is the difference between = = and equals methods?

6. What is the difference between method overloading and method overriding?
7. Give an example of method overloading in selenium?
8. Write a program from switch to window and also in frames?
9. SQL query to fetch max salary from the table?

10. SQL query to fetch 2nd max salary from the table?
11. What is the difference between Array and ArrayList?
12. What are the TestNG Annotations?
13. What is Selenium Grid?
14. What is Parallel execution and how will you perform?
15. Enter text without using SendKeys.

16. How to handle scroll bar using selenium?
17. What is the return type of findElement?
18. WebElement is an interface or class.
19. The interviewer gave a scenario and said that find the XPath. So, Dynamic XPath is very important for an interview and it is always asked in any company, especially for 2 to 3 years of experience.

L&T Infotech, Pune

1. Introduce yourself.
2. How to read property files in selenium?
3. How to read excel file using POI API?
4. How to get row count and column count in excel file?
5. Xpath function in selenium.

6. How to use preceding and sibling in Xpath?
7. How to perform double click on any component?
8. Did you perform any DB validation using java selenium code?
9. What is the difference between Interface and Abstract?
10. Can Interface be extended to another interface?

11. What is the difference between private and protected?
12. How many web pages are opened in system? Can we count in selenium?
13. What is the difference between findElement and findElements?
14. What is getWindowHandles()?
15. What is web-based popups and window based popup?

16. What is generic function in selenium?
17. How many generic functions you have written in your current project? Please specify generic functions that you have written?
18. Did you know how to connect excel sheet through Java?
19. Do you know what is Jenkins?
20. What are the Drivers?

21. How to sort data in ascending and descending manner? Explain the bubble sort.
22. What is the difference between Collection and Collections?
23. What is the difference between List and Set?
24. Did you perform continuous integration in your current project? 25. Which framework you have used in your current project? Can you explain it?

26. Have you used TestNG in your current project? Explain it.
27. Explain TestNG Annotations.
28. How to perform right-click on the web page in selenium?
29. How to scroll webpage up or down using selenium web driver?
30. Explain project framework.

Accenture, Pune

1. Tell me about your work experience.
2. How to find whether WebElement is present on the page?
3. How to compare two strings in Java?
4. Which Framework have you used in your project?
5. How to get source code in Selenium?
6. How to disable a particular test script using TestNG feature?
7. How to set the priority in TestNG?
8. What are the types of annotations in TestNG?
9. How to handle multiple windows in Selenium WebDriver?
10. How to crop images using Selenium Webdriver?
11. How to get background UI of color code in Selenium WebDriver?

12. How to run the same script in multiple browsers parallel in Selenium WebDriver?

MNC Online Technical Test Questions for Testing Recruitment

1. What will be the correct output of the given program?

< script language ="vbscript" type = "text/vbscript" >
  Dim Counter: Counter = 20
  While Counter < 15
  Counter  = Counter + 1
  document.write(& Counter)
  Wend ' While loop exits if Counter Value becomes 15.

Choose the best option.
a. Print 15 to 20
b. Compile time error
c. Run time error
d. Loop going to infinity

2. You use findElements in a software test case. It is returning NoSuchElementException when the element is not found. Is the assumption correct?

Choose the best option.
a. It is incorrect. findElements will never return NoSuchElementException. It will return just an empty list.
b. The assumption is correct.
c. It cannot be said whether the assumption is correct or not.
d. It is correct. findElements will return NoSuchElementException. It will this due to empty list.

3. What will be the output of the following code snippet?

for(int i = 0; i <= 10; i++)
  if(i > 6) break;

Choose the best option.
a. 7
b. 6
c. 10
d. Compilation will fail.

3. What will be the output of the following code snippet?

interface A {
  void test(); // line 2
class B implements A {
  void test() { // line 6


Choose the best option.
a. The given code would compile successfully.
b. Compile time error at line 2, as the function definition is missing.
c. Compile time error at line 2, as the function test does not have a public access modifier.
d. Compile time error at line 6, the function test() should have a public access modifier.

Leave a Comment