Selenium Tricky Interview Questions

Selenium Tricky Interview Questions: This article presents key Selenium interview questions for QA automation engineers and testers with varying experience levels. For junior to senior testers with 2-10 years of expertise, we cover core Selenium Webdriver questions and advanced, tricky, scenario-based, coding, XPath, object-oriented, and real-world examples.

Selenium Java and Selenium C# questions focused on practical implementation are included, from basic concepts to complex frameworks. Experienced automation engineers will find Selenium quiz questions, PDFs, and programming exercises to solidify their knowledge.

The goal is to provide testing professionals with comprehensive Selenium resources ranging from fundamentals to nuanced technical and coding challenges to prepare for interviews. With robust understanding, Selenium automation testers can showcase expertise to match their level, whether 3, 5, 7 years or beyond.

Advanced Selenium Webdriver Automation Testing Interview Questions For 2, 3, 5, 6, 7, 8, 10-Year Experienced

  • Advantages of selenium
  • Disadvantages of selenium
  • Difference between get() and navigate().To()
  • How to identify dynamic images
  • Get the value of a cell in the dynamic table.
  • How to handle dynamic elements, since the webpage is designed in angular js
  • Select this value in the dropdown, hover over this element, and click
  • What is the use of build() and perform() in actions
  • Automate the menu and sub-menu, click on a link in the sub-menu, navigate to the page, and click on an element.
  • Syntax for alerts
  • What is the execution time of your test cases?
  • Go to frame, click the upload button, and select the file in this directory.
  • Select multiple options from the dropdown
  • What packages have you used in your project?
  • How will you check broken links?
  • Read from a text file and change that content
  • How to read the properties file
  • What is a selenium grid?
  • How to switch frames in selenium
  • How to run a test suite in different browsers
  • Without using the select statement, how do you select the dropdown?
  • What are cross-browser testing and parallel testing?
  • Challenges faced during selenium testing?
  • What is the actions class?
  • How to handle drop-down in selenium?
  • How to handle multiple browsers pop up?
  • How do you handle multiple browser tabs in Selenium?
  • How to perform upload files using selenium?
  • How to perform download files using Selenium?
  • How do I get all values of dropdown in selenium?
  • How do you perform (control + a) through selenium?
  • How do you shift between tabs of the same browser using selenium?
  • What is a robot class?
  • What is autoit?
  • What is the difference between get() and navigate()?
  • What is the difference between findelement() and findelements()?
  • What is the difference between quit() and close()?
  • Different approaches to clicking the submit button?
  • What is javascriptexecutor, and when is it used?
  • Handling web tables (static and dynamic) in Selenium
  • How do you create and delete cookies?
  • What do getwindowhandles() and getwindowhandle() return? Or its differences?
  • What is perform() and build()? Is it possible to use only perform() without build()?
  • How do you scroll the browser window?
  • How will you handle the SSL certification?
  • What are the desired capabilities?
  • How do you verify whether ‘Bangalore’ is in the dropdown box?
  • How do we verify that ‘Bangalore’ is in the 4×4 web table? Print the column and row number of it if it is present.
  • How to fetch the data from a particular row and column of Excel?
  • What is tdd?
  • What is Apache POI API? Or how to read data from Excel?
  • What are explicit and implicit waits?
  • What are the challenges faced in automation testing?
  • What is webdriver? And why is webdriver used?
  • List some selenium exceptions.
  • What is staleelementreferenceexception? When does this occur? And how do we overcome such exceptions?
  • How do we include or exclude test cases?
  • What is a null pointer exception? When does it occur?
  • What is a selenium grid?
  • How do you control the execution of your test cases/test classes?
  • How do we pass values to the textbox besides sendkeys()?
  • How do you click the login button besides using click(), submit(), and javascriptexecutor?
  • What is subversion?
  • Current roles and responsibilities.
  • What is the difference between http and https?
  • Excel utility to read Excel using hashmap of hashmap.
  • Write cucumber feature file using datatable.
  • What are the latest enhancements in selenium 4
  • Different error codes.
  • What are Java generics, and where have you used them in our automation framework?
  • How to pass cookies in rest assured.
  • What are the expected conditions in explicit wait? Is it a class or interface?
  • What is alert in selenium?
  • Have you used JavaScript executor in your framework? If yes, where?
  • Different design patterns can be used with selenium.
  • Can we integrate Spring Boot with Selenium?
  • What is Jira? How does your project maintain test cases and defects?

Selenium Coding Interview Questions

This Selenium coding interview questions and practical programming exercises to assess the automation engineer’s programming expertise and problem-solving skills. We provide Java and C# Selenium code samples on scenario-based tasks, core framework concepts, and real-world testing challenges.

Experienced coders will find complex Selenium coding questions with detailed explanations and answers to solidify their hands-on skills in test automation. Whether you have advanced JavaScript, Python, or OOP expertise, these coding challenges will evaluate your competency in architecting robust Selenium frameworks.

Candidates can expect Selenium Java code snippets focused on integration with web UI elements, CI/CD pipelines, defect reporting, data-driven approaches, and customized logs. With the increase in test automation, these coding interview questions will prepare you to demonstrate proficiency in architecting reliable, scalable test suites.

  • Write code for the Action class.
  • Write code to print all the frame names.
  • Write code for handling multiple windows.
  • Write code to click on the Check box inside the Dynamic Table.
  • Write code for taking Screenshots.
  • Write code for Cross Browser Testing.
  • Write code for fetching data from Excel.
  • Write code for handling Frames.
  • Write code for the nested drop-down. You must check all the values in the dropdown, all permutations, and combinations.
  • Where will you maintain the code?
  • Write code for handling multiple browsers and switch to new windows.
  • How do you identify broken links? How have you done in your project? Write code or tell approach.
  • Write a code to fetch the value ‘Test’ from the Excel sheet, which might be present in any cell in Excel. Or check whether the value ‘Test’ is present in Excel.
  • Read data from Excel, give that data as input for login and password, and click on submit and validate the popup that says Login is successful.

Selenium Tricky Interview Questions

  • Have you automated any of your tests? How so?
  • What’s your favourite testing tool? Why? What would you do if some technical constraint meant you could not use it instead?
  • How do you know when you (or your automation) have found a bug? What makes it a bug? Are some bugs more important than others? How do you report them?
  • How will you estimate the time to automate a scenario?
  • Have you developed any Tools? If yes, explain
  • What difficulties have you faced in Selenium?
  • How do you see automation growth in the next five years?

XPath Interview Questions

We provide a targeted set of XPath interview questions for QA engineers and test automation developers. Experienced users will find practical Selenium XPath scenarios and coding exercises to evaluate their expertise. The questions cover fundamentals like XPath syntax, working with web elements, conditional logic, and integrating XPath with Selenium selectors.

Candidates can showcase their skills in using XPath to extract data, populate test data files, identify elements with dynamic IDs, and handle iframes or AJAX calls. With the flexibility of XPath for parsing complex DOM structures and content, these interview questions assess real-world proficiency. Prepare for your next test automation role by demonstrating advanced XPath knowledge alongside Selenium coding capabilities.

  • Which is the correct Xpath for this code (Lot of questions on Xpath)
  • Xpath methods Ex: Starts-with & Contains
  • The syntax for the CSS selector
  • Xpath Axes, Ex: Following
  • What are XPath and its types?
  • What are different locators used?
  • Preceding sibling and following sibling of custom XPath?
  • What is the difference between XPath and CSS selectors?
  • How to perform Right Click.
  • In a Dynamic Table, if I give one cell value, it should give me the values of other cells in that row.
  • How to check if a checkbox is displayed
  • If the element is not present, how will you print the element not present in the message?

Selenium Webdriver Interview Questions

What Selenium Tools and Testing framework are you using in your Current Project?
Ans: We are using:

  • Selenium WebDriver for Creating Test Cases.
  • Java Programming for Enhancing Test Cases.
  • TestNG Testing Framework for Grouping Test cases, executing Test batches, and generating Test reports. Also used,
  • Firebug and Firepath for inspecting elements.
  • IE Browser driver and Chrome browser driver for cross-browser testing.

What is your Project Operating environment?
Ans: Microsoft Windows 8.1

What is your project domain and Application Environment?
Ans: Our project is a Banking Application. Our AUT (Application Under Test) was developed using Java Technology, and the Database is Oracle.

What are the major challenges in Functional Test Automation?
Ans:

  • Object Identification.
  • Debugging Issues. Etc.

What are the difficulties that you faced in Object identification?
Ans: Some Elements (Objects) are not recognized properly using Selenium WebDriver Element locators.

How do you conduct Data-driven Testing in your project?
Ans: We conducted Data-driven Testing using an external Excel file as a Resource; we added some third-party Excel jar files to Java Project in Eclipse.

How do you conduct Batch Testing in your project?
Ans: We conducted Batch Testing using the TestNG Testing Framework.

How do you conduct Cross-browser testing in your project?
Ans: Using Mozilla Firefox, IE, and Google Chrome browsers(Downloaded IE and Google Chrome Browser drivers). We executed Test cases.

How do you handle duplicate Elements in your project?
Ans: Using the index property of Elements, we handled duplicate objects.

How many Test cases did you write for your Project/Module?
Ans: I prepared around 120 Test cases in my Module.

How many defects do you detect, and give one example?
Ans: I detected nearly 20 Defects, of which five are severe.

How do you select Test cases for Regression Testing?
Ans: We selected Test cases for Regression Testing based on Defect-affected and defect-dependent Test cases.

How do you organize your Test Automation resources?

Did you use any build management tools in your project?
Ans: We used the Maven build management tool in our project.

How did you handle errors in your Test scripts?
Ans: We handled errors in our Test Scripts using Java Error handling features.

Did you create any reusable components?
Ans: Yes, We created some reusable components in our project for Login Functionality, Registration Functionality, etc.
Did you find any test scenarios not automated in your project using Selenium?
Ans: Yes, We found some Test Scenarios in our Current project, Functions that require more user interaction, and Functions that require Dynamic test data submission.

How to execute multiple Java programs at a time?
Ans: We execute multiple Java programs using an XML file in the TestNG framework.

How to conduct parallel Test execution?
Ans: Usually, we conduct parallel test execution using the Selenium Grid, but there is no parallel test execution in my current project.

What Defect management / Test management tool do you use in your project?
Ans: We use the Jira Test Management tool in our project with Selenium.

How do you communicate with the development team to resolve the issues?
Ans: We communicate with the Development team via Our Test Manager.

Were you involved in the Selenium Test environment Setup?
Ans: I was involved in Selenium Environment Setup in my Current Project. Per my project, we selected Java, Selenium WebDriver TestNG Framework, and Maven.

  • We Downloaded Eclipse IDE and Extracted it.
  • Downloaded Java Software and Installed.
  • Environment Variable path setup.
  • Downloaded Selenium WebDriver Java language bindings(jar files) and added them to Java Project in Eclipse.
  • Download and Install TestNG Framework from Eclipse IDE.
  • Installed Maven build management tool.

I love open-source technologies and am very passionate about software development. I like to share my knowledge with others, especially on technology that's why I have given all the examples as simple as possible to understand for beginners. All the code posted on my blog is developed, compiled, and tested in my development environment. If you find any mistakes or bugs, Please drop an email to softwaretestingo.com@gmail.com, or You can join me on Linkedin.

6 thoughts on “Selenium Tricky Interview Questions”

  1. hi this is kiran ,
    interview questions of very helpful for interview
    but answers are in short, please can you elaborate to 4 to 5 lines
    then we could get clarity on answers

    Reply
  2. how you integrate grid in your project?
    how to do parallel test cases?
    asked about framework?
    about sorting 0’s oneside and 1’s one side write a programme for this?
    webdriver driver = new firefoxdriver() explain it?
    why the above one not firefoxdriver driver = newfirefoxdriver() this ?
    tell me about oops concept?
    about over loading and how to overload?
    overriding?
    about encapsulation?
    write a code for dropdown without using select keyword?
    login page code using JS?
    Difference b/n String And StringBuffer?
    About abstraction?
    given an array and told to write a palindrome?
    reverse a string?
    What are the exceptions you faced?
    how you know whether element is present or not , excluding isdisplayed(), is enabled()?
    without index and value how to select dropdown value?
    About waits?
    Wht is meant by fluent wait and where you used?
    what is meant by collections?

    these questions asked in Paytm , amadeous, Cgi for 3+ candidates, hope these will help you

    Reply
  3. Can you please prpovide the Page object model concept.
    And also could you please provide one of the selenium project for undrstanding.

    Reply

Leave a Comment