Category Archives: Selenium

FindElements By JQuery locator

Posted on by 0 comment

Lots of websites use JQuery, and JQuery selector has more features than Css locator, such as contains etc. So try to use Javascript Executor to execute JQuery selector and return the WebElements.

Category: C#, Selenium

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