Category Archives: Framework

Selenium locator extension

Posted on by 0 comment

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:


So an extension method was created for this, here is the code snippet.

Category: C#, Framework, Selenium