πŸ” Selenium Interview Prep Questions

What is Selenium?

Role: SDET | Tech: General | Company: Infosys | Type: Technical

What are the components of Selenium?

Role: SDET | Tech: General | Company: TCS | Type: Technical

Which browsers does Selenium WebDriver support?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

What is Selenium WebDriver?

Role: SDET | Tech: General | Company: Infosys | Type: Technical

What are the differences between Selenium 1 and Selenium 2?

Role: SDET | Tech: General | Company: TCS | Type: Technical

What is the difference between Selenium RC and WebDriver?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

Name the different types of WebDriver.

Role: SDET | Tech: General | Company: Infosys | Type: Technical

What are the major advantages of using Selenium WebDriver?

Role: SDET | Tech: General | Company: TCS | Type: Technical

Can Selenium handle window-based pop-ups?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

How do you launch a browser using WebDriver?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

What is the get() method used for in WebDriver?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

How do you navigate between pages using Selenium WebDriver?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

What are some limitations of Selenium WebDriver?

Role: SDET | Tech: General | Company: Infosys | Type: Technical

How do you close the current window in Selenium?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

How do you quit all browser windows in Selenium?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

What is the use of findElement() in Selenium?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

What is the difference between driver.close() and driver.quit()?

Role: SDET | Tech: General | Company: TCS | Type: Technical

What is the difference between getTitle() and getPageSource() in WebDriver?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

What is the purpose of getWindowHandle() in Selenium?

Role: SDET | Tech: General | Company: Infosys | Type: Technical

What are some exceptions in Selenium?

Role: SDET | Tech: General | Company: TCS | Type: Technical

How do you handle NoSuchElementException in Selenium?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

What is the StaleElementReferenceException and how do you handle it?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

Can you use Selenium for performance testing?

Role: SDET | Tech: General | Company: TCS | Type: Technical

What are the locators available in Selenium?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

What is XPath?

Role: SDET | Tech: General | Company: Infosys | Type: Technical

What is a CSS Selector in Selenium?

Role: SDET | Tech: General | Company: TCS | Type: Technical

What is the difference between absolute XPath and relative XPath?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

What is the difference between findElement() and findElements()?

Role: SDET | Tech: General | Company: Infosys | Type: Technical

What are the advantages of using CSS selectors?

Role: SDET | Tech: General | Company: TCS | Type: Technical

What is an ID locator in Selenium?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

How do you use the name locator in Selenium?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

How do you locate an element using its class name in Selenium?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

What is the difference between XPath and CSS selectors in Selenium?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

How do you write XPath for an element containing specific text?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

How do you find elements by link text in Selenium?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

How do you locate an element using partial link text?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

What is the By class in Selenium?

Role: SDET | Tech: General | Company: Infosys | Type: Technical

How do you locate elements by tag name in Selenium?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

What is the purpose of starts-with in XPath?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

What is the use of contains() in XPath?

Role: SDET | Tech: General | Company: Infosys | Type: Technical

How do you handle dynamic elements using XPath?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

How do you use the following-sibling axis in XPath?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

How do you use preceding-sibling in XPath?

Role: SDET | Tech: General | Company: Infosys | Type: Technical

How do you use the ancestor axis in XPath?

Role: SDET | Tech: General | Company: TCS | Type: Technical

How do you locate child elements using XPath?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

How do you locate parent elements using XPath?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

What is the last() function in XPath?

Role: SDET | Tech: General | Company: TCS | Type: Technical

What is the use of position() in XPath?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

How do you locate elements by attributes in CSS selectors?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

How do you find elements that contain a specific substring in CSS selectors?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

What is the difference between == and = in XPath?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

How do you combine multiple conditions in XPath?

Role: SDET | Tech: General | Company: Infosys | Type: Technical

How do you use or and and operators in XPath?

Role: SDET | Tech: General | Company: TCS | Type: Technical

How do you handle spaces in XPath?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

How do you find the nth element in XPath?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

What is the not() function in XPath?

Role: SDET | Tech: General | Company: TCS | Type: Technical

How do you select elements with a specific attribute value in CSS selectors?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

How do you locate elements by index in XPath?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

How do you use pseudo-classes in CSS selectors?

Role: SDET | Tech: General | Company: TCS | Type: Technical

What is the use of child:: in XPath?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

What is the self:: axis in XPath?

Role: SDET | Tech: General | Company: Infosys | Type: Technical

What is the following:: axis in XPath?

Role: SDET | Tech: General | Company: TCS | Type: Technical

How do you locate elements with dynamic class names?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

How do you locate hidden elements in Selenium?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

What is the use of CSS selector nth-child?

Role: SDET | Tech: General | Company: TCS | Type: Technical

How do you combine class names in CSS selectors?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

How do you find sibling elements using CSS selectors?

Role: SDET | Tech: General | Company: Infosys | Type: Technical

How do you locate elements with specific text in CSS selectors?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

How do you select the first element of a specific type using CSS?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

What is the use of the :nth-of-type pseudo-class?

Role: SDET | Tech: General | Company: Infosys | Type: Technical

How do you select an element that is the last child using CSS?

Role: SDET | Tech: General | Company: TCS | Type: Technical

What is the difference between :first-child and :nth-child(1) in CSS?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

How do you select elements with an exact attribute value in CSS selectors?

Role: SDET | Tech: General | Company: Infosys | Type: Technical

What is the purpose of waits in Selenium?

Role: SDET | Tech: General | Company: TCS | Type: Technical

What are the different types of waits available in Selenium WebDriver?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

What is an implicit wait in Selenium?

Role: SDET | Tech: General | Company: Infosys | Type: Technical

How do you implement an implicit wait in Selenium?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

What is the default timeout for an implicit wait?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

What is an explicit wait in Selenium?

Role: SDET | Tech: General | Company: Infosys | Type: Technical

How do you implement an explicit wait in Selenium?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

What is the WebDriverWait class in Selenium?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

What is a Fluent Wait in Selenium?

Role: SDET | Tech: General | Company: Infosys | Type: Technical

How do you implement a Fluent Wait in Selenium?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

What is the purpose of until() in Fluent Wait?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

What is the ExpectedConditions class in Selenium?

Role: SDET | Tech: General | Company: Infosys | Type: Technical

What is the difference between implicit and explicit waits?

Role: SDET | Tech: General | Company: TCS | Type: Technical

How do you wait for an element to be clickable in Selenium?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

How do you wait for an element to be visible in Selenium?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

How do you wait for an element to be invisible in Selenium?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

How do you wait for an alert to be present in Selenium?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

How do you wait for a page to load in Selenium?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

How do you handle synchronization issues in Selenium?

Role: SDET | Tech: General | Company: TCS | Type: Technical

How do you wait for an element to be enabled in Selenium?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

How do you wait for a text to be present in an element in Selenium?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

What is polling in Fluent Wait?

Role: SDET | Tech: General | Company: TCS | Type: Technical

How do you change the polling interval in Fluent Wait?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

How do you wait for an element’s attribute to change in Selenium?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

How do you use Fluent Wait for dynamic page loading in Selenium?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

What is the default polling interval in Selenium's Fluent Wait?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

How do you wait for a condition in Selenium without blocking?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

What is the use of ignoring() method in Fluent Wait?

Role: SDET | Tech: General | Company: TCS | Type: Technical

How do you implement multiple expected conditions in a wait?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

How do you wait for an element to become stale in Selenium?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

How do you handle elements that take a long time to appear in Selenium?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

What is the impact of using too many explicit waits in Selenium tests?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

What is the purpose of a sleep method in Selenium tests?

Role: SDET | Tech: General | Company: Infosys | Type: Technical

Why should you avoid using the Thread.sleep() method in Selenium tests?

Role: SDET | Tech: General | Company: TCS | Type: Technical

What are the common challenges with waits in Selenium?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

How do you troubleshoot wait-related issues in Selenium?

Role: SDET | Tech: General | Company: Infosys | Type: Technical

What is the best practice for implementing waits in Selenium?

Role: SDET | Tech: General | Company: TCS | Type: Technical

How do you prevent flaky tests due to timing issues in Selenium?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

How do you handle intermittent failures caused by page load timeouts?

Role: SDET | Tech: General | Company: Infosys | Type: Technical

What is the timeout period for an explicit wait?

Role: SDET | Tech: General | Company: TCS | Type: Technical

Can you use multiple waits at the same time in Selenium?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

What is the difference between WebDriverWait and FluentWait?

Role: SDET | Tech: General | Company: Infosys | Type: Technical

What happens if the element is found before the wait timeout?

Role: SDET | Tech: General | Company: TCS | Type: Technical

How does WebDriver handle waits internally?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

What is the consequence of setting a long implicit wait timeout?

Role: SDET | Tech: General | Company: Infosys | Type: Technical

How does an implicit wait affect the entire test?

Role: SDET | Tech: General | Company: TCS | Type: Technical

Can explicit waits be applied to specific elements in Selenium?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

How do you wait for multiple elements to be present on a page?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

How do you debug wait-related issues in Selenium tests?

Role: SDET | Tech: General | Company: TCS | Type: Technical

How do you interact with input fields in Selenium WebDriver?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

How do you clear the contents of a text field in Selenium?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

How do you select a value from a dropdown in Selenium?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

How do you check whether an element is enabled in Selenium?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

How do you check whether an element is displayed in Selenium?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

How do you check whether a checkbox is selected in Selenium?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

How do you check the attribute of a web element in Selenium?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

How do you submit a form in Selenium?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

How do you handle radio buttons in Selenium?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

How do you interact with links in Selenium?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

How do you interact with images in Selenium?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

How do you interact with tables in Selenium?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

How do you get the text of a web element in Selenium?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

How do you get the tag name of an element in Selenium?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

How do you get the value of a hidden element in Selenium?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

How do you handle disabled elements in Selenium?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

How do you select multiple options from a multi-select dropdown in Selenium?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

How do you deselect options in a multi-select dropdown in Selenium?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

How do you get the size of an element in Selenium?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

How do you get the location of an element in Selenium?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

How do you check if an element is clickable in Selenium?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

How do you simulate a double-click in Selenium WebDriver?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

How do you right-click on an element in Selenium?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

How do you simulate keyboard actions in Selenium?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

How do you use the Actions class to perform a series of actions?

Role: SDET | Tech: General | Company: Amazon | Type: Technical

How do you perform keyboard shortcuts using Selenium WebDriver?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

How do you handle file uploads using Selenium WebDriver?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

How do you handle file downloads in Selenium WebDriver?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

How do you handle hidden elements using Selenium WebDriver?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

How do you interact with dynamically loaded elements in Selenium?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

How do you refresh a web page in Selenium?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

How do you get the current URL of a web page in Selenium?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

How do you get the title of a web page in Selenium?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

How do you check the color of an element in Selenium?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

How do you check the font of an element in Selenium?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

How do you handle images with dynamic URLs in Selenium?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

How do you click on a link that opens in a new tab using Selenium?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

How do you check if an element is present in Selenium?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

How do you simulate a long press in Selenium?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

How do you interact with scrollable elements in Selenium?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

How do you get the text from a tooltip in Selenium?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

How do you get the list of all options in a dropdown using Selenium?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

How do you handle elements that appear only after scrolling in Selenium?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

How do you switch between tabs in Selenium?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding

How do you check if an element is read-only in Selenium?

Role: SDET | Tech: Python | Company: TCS | Type: Coding

How do you check if a checkbox is unchecked in Selenium?

Role: SDET | Tech: Python | Company: Amazon | Type: Coding

How do you simulate mouse movements in Selenium?

Role: SDET | Tech: Python | Company: Infosys | Type: Coding