Selenium Interview Questions Asked in Companies

In this tutorial, we have listed a sample of Selenium interview questions asked in companies.

These Selenium interview questions 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 understand how to prepare interviews 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.

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 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.

If you are interested in Selenium Automation Jobs, build your career immediately”, see relevant jobs here”.

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 the 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 Selenium Automation 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.

4. JAX-RS client is sending “Usertoken” in HTTP header of request message. Which of the following JAX-RS methods will be able to read this “Usertoken” header value?

Choose the best option.

a. @GET
public String processUsertoken(String Usertoken) {
. . . . . . . . . . . .
b. @PATH(“/usertoken/{Usertoken}”)
public String processUsertoken(String Usertoken) {
. . . . . . . . . . . .
c. @GET
public String processUsertoken(@HeaderParam(“Usertoken”) String usertoken) {
. . . . . . . . . . .
d. @PATH(“/usertoken”)
public String processUsertoken(@PathParam(“Usertoken”) String usertoken) {
. . . . . . . . . . .
e. It is not possible to read the HTTP header data in JAX-RS method as JAX-RS method can only read data from HTTP body.

5. If class C is derived from class B which is derived from class A, all through public inheritance, what can a class C member function access?

a. Protected and public data only in C and B.
b. Protected and public data only in C
c. Private data in A and B
d. Protected data in A and B

6. Which of the following parameters can be helpful in understanding the test execution quality?

A. Defect reject ratio
B. Error reject ratio
C. Defect leakage ratio
D. Error leakage ratio

Choose the best option

a. Only A
b. Only C
b. A and B
d. B and C
e. A and C

7. What do we do in the regression testing?

Choose the best option

a. Rerunning the previously conducted test
b. Comparing current results with previously executed test results
c. Run all the sanity checks
d. 1 and 2
e. 1 and 3

8. Which of the following commands in Linux is used to display the name list of a remote directory?

Choose the best option

a. CWD

9. Which of the following mount points in Linux is used when mounting disk partitions?

Choose the best option

a. /usr
b. /home
c. /var and /var/tmp
d. All the given options

10. Which of the following is not part of performance testing?

a. Measuring response times
b. Recovery testing
c. Simulating many users
d. Generating many transactions

11. In V Model check team’s primary responsibility is to

a. Minimize or eliminate risks
b. System testing and UAT
c. Execute all test planes
d. Only UAT

12. A physical host has several AWS EC2 instances that are all burstable type. If all the EC2 instances are simultaneously busy, what will happen?

a. All instances would run at least their baseline performance level
b. All instances would run at their baseline performance level
c. Some instances would be able to burst and use all the CPU cores available in the physical host

13. Which of the following uses Impact Analysis most?

a. Component testing
b. Non-functional system testing
c. User acceptance testing
d. Maintenance testing

14. The difference between re-testing and regression testing is:

a. re-testing ensures the original fault has been removed; regression testing looks for unexpected side-effects
b. re-testing looks for unexpected side-effects; regression testing ensures the original fault has been removed
c. re-testing is done after faults are fixed; regression testing is done earlier faults are fixed
d. re-testing is done by developers; regression testing is done by an independent tester

15. Which of the following is NOT a reasonable test objective:

a. to find faults in the software
b. to prove that the software has no faults
c. to give confidence in the software
d. to find performance problems

16. Which of the following is NOT part of system testing?

a. business process-based testing
b. performance, load, and stress testing
c. usability testing
d. top-down integration testing

17. The cost of fixing a fault:

a. is not important
b. increase the later a fault is found
c. decrease the later a fault is found
d. can never be determined

18. The main focus of acceptance testing is:

a. finding faults in the system
b. ensuring that system is acceptable to all users
c. testing the system with other systems
d. testing from a business perspective

19. Test cases are designed during

a. Test recording
b. Test planning
c. Test configuration
d. Test specification

20. Regression testing should be performed:

v. every week
w. after the software has changed
x. as often as possible
y. when the environment has changed
z. when the project manager says

Choose the correct option.

a. v and w are true, x,y, and z are false
b. w, x, and y are true, v, and z are false
c. w and y are true, v, x, and z are false
d. w is true, v, x, and z are false

21. When should testing be stopped?

a. when all the planned tests have been run
b. when time has run out
c. when all faults have been fixed correctly
d. it depends on the risks for the system being tested

22. The most important thing about early test design is that it:

a. Makes test preparation easier
b. Means inspections are not required
c. Can prevent fault multiplication
d. Will find all faults

Recommended Posts for Selenium Interview Questions

Characteristics of computer

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

Contact: [email protected]

Leave a Comment