Selenium is a robust test automation suite that is used for automating web-based applications. It supports multiple browsers, programming languages, and platforms.
Selenium comes in four forms-
Following are the advantages of Selenium-
Following are the limitations of Selenium-
Some commonly used browsers supported by Selenium are-
No Selenium WebDriver uses the browser’s native method to automate the web applications. So, there is no support for testing web services using Selenium WebDriver.
The different locators in Selenium are-
Xpath or XML path is a query language that is used for selecting nodes from XML documents. Also, it is one of the locators supported by Selenium Webdriver.
In XPath, a single slash is used for creating absolute XPaths, beginning from the root node. Whereas double slash is used for creating relative XPaths.
Using contains() method we can locate an element by partially matching its attribute’s value. This is particularly helpful in scenarios where the attributes have dynamic values with a certain constant part.
xPath expression = //*[contains(@name,’user’)]
Basically, the above statement will match all the values of the name attribute containing the word ‘user’ in them.