Framework

Selenium locator extension

In Selenium, there are multiple locator functions, such as By.CssSelector By.XPath By.Id By.Name …… In my case, I would like to use different format, which I can call one method instead of so many, it would be easier to store the locator information somewhere else. The locator format would be ByMethod = selector to Find, for example: css=input[value=’clear’][type=button] So an extension method was created for this, here is the code snippet.