0% found this document useful (0 votes)
32 views1 page

Selenium Automation Preparation Questions

Selenium question bank
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views1 page

Selenium Automation Preparation Questions

Selenium question bank
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Automation Testing Preparation

Questions
WebDriver Methods
 Explain the difference between get() and navigate().to() in Selenium WebDriver.
 What is the purpose of manage().timeouts() method? Provide an example.
 How do you handle browser windows and tabs in Selenium?
 What method would you use to close the browser window, and how is it different from
quit()?

WebElement Methods
 How do you retrieve the text of a WebElement in Selenium? Provide code as an example.
 Explain the use of sendKeys() and clear() methods in Selenium WebDriver.
 What is the difference between isDisplayed(), isEnabled(), and isSelected() methods?
 How would you retrieve the value of an attribute from a WebElement?

Different Locator Strategies


 Explain the difference between findElement() and findElements() methods.
 How do you locate elements by XPath and CSS selectors? Provide examples.
 What is the use of the By class in Selenium? Provide an example with ID or name
locator.
 What are the pros and cons of using XPath over other locator strategies like CSS or ID?

Different Ways of Traversing While Locating an Element


 How would you locate a child element using XPath in Selenium? Provide an example.
 Explain how you can traverse between siblings in a DOM structure using XPath.
 What is the difference between absolute and relative XPath? Provide examples.
 How would you locate an element based on its position relative to another element
using XPath?

You might also like