Professional Documents
Culture Documents
9. Using selenium web driver list the different ways that you locate elements?
To locate web elements we use findElement (or) findElements method.
The different ways to locate a web element is as follows:
By.name()
By.id()
By.tagName()
By.className()
By.linkText()
By.partialLinkText()
By.xpath()
By.cssSelector()
Xpath=//tagname[@attribute='value']
Where,
// : Select current node.
Tagname: Tagname of the particular node.
@: Select attribute.
Attribute: Attribute name of the node.
Value: Value of the attribute.
The quit command will kill the driver, driver server and all associated browser
windows whereas the close command only closes the current browser windows
The close command only closes the browser window the driver has focus on.
Explicit wait times are used if we need to delay the wait time of a particular web
element.
21. What is the difference between Selenium Grid, Selenium RC and Selenium
Web Driver
27. What is the difference between implicit and explicit waits in Selenium?
29. What is a page object model and how do you implement it?
41.