Top 10 Pro Level Selenium Automation Interview Questions 2

Selenium Automation Interview Questions for 4+ years of experience.

Q1 - How to navigate to 3rd window to 7th window in selenium?

Answer - Code example:

Case 1:
 // Create a Set and store all window handle ids in it
 Set AllWindowHandles = driver.getWindowHandles();
 String window1 = (String) AllWindowHandles.toArray()[0];
 String window2 = (String) AllWindowHandles.toArray()[1];

 // Switch to window with id 2

Case 2 :
 /* Moving Between all Windows
 for (String handle : driver.getWindowHandles()) {

Q2 - How to read the text of a cell in a dynamic web table?
Answer - We can read text from a dynamic web table by preparing dynamic xpath of table at runtime.
Read details - Handle Dynamic Table

Q3 - How to check the text is selected or not on page?

Q4 - How to handle ajax call in Selenium?
Answer - When we do Google search and a list of options matching to our keyword displayed on it's own without refreshing the page, is an example of ajax search. We can handle ajax elements using Explicit Wait in Selenium.

Q5 - How to handle synchronization in selenium?

Q6 - What types of waits we have and which is best in Selenium?
Answer - There are three types of wait in Selenium:

  1. Implicit Wait
  2. Explicit Wait
  3. Fluent Wait

Q7 - Syntax for both implicit and explicit wait?
Answer - Code example:
// Implicit wait - Set wait of 10 seconds
 driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

 // Explicit Wait
 WebDriverWait wait = new WebDriverWait(driver, 10); 

Q8 - Why we aren't recommended  to use Thread.sleep() in selenium?

Q9 - How to implement oops concepts  in selenium?

Q10 - What are the different types of automation frameworks?
Answer - 
  • Linear Framework
  • Keyword Driven Framework
  • Modular Framework
  • Data Driven Framework
  • Page Object Model
  • Hybrid Framework

You can answer the questions in comments to help others. We will showcase the best answers on our website with user's name.

For list of  Selenium tutorials click here: Selenium Webdriver Tutorials Series

Guest Author
Barri Siva
Quality Engineer II

Subscribe FB Group
Join Telegram channel at
Feel free to ask queries or share your thoughts in comments or email me.

Follow Us

Quora Space | Facebook Page | Telegram Channel
Feel free to ask queries or share your thoughts in comments or email us.


  1. do you have answer, ? pls share

  2. Do you have Answers of all these question. Please share

  3. Kindly answers for these questions. Could you send them to my mail? It's


Post a Comment

Popular posts from this blog

10 Best Demo Websites for Automation Testing Practice

Automate E-Commerce Website using Selenium Webdriver

Automate Browser Actions on using Selenium

Automate Amazon Website 'Menu links' using Selenium