HomeSelenium

Selenium Locators – Write XPath Expressions and CSS Selectors by yourself instead of auto-generating them

Selenium Locators – Write XPath Expressions and CSS Selectors by yourself instead of auto-generating them

<<Previous Post                            << Complete Tutorial>>                              Next Post>>

As explained in the previous articles, we can use different add-ons for auto-generating the XPath Expressions and CSS Selectors for locating the UI elements on the web pages.

But, it is not advised to blindly use the XPath Expressions and CSS Selectors that got auto-generated by tools/add-ons.

Sometimes, tools/add-ons may not auto-generate proper XPath Expressions and CSS Selectors. Instead, we have to be in a position to judge the XPath Expressions and CSS Selectors which are auto-generated by the tools/add-ons before using them blindly.

Though tools/add-ons auto-generate better XPath Expressions and CSS Selectors, we should continuously strive to edit them and make them a more improvised version by having the knowledge of creating these Expressions and Selectors by yourself.

As I have already explained in details on how to create XPath Expressions and CSS Selectors by yourself from scratch, I would recommend you to start learning them from the below links if you are not aware of creating them by yourself:

  • > For learning the creation of XPath Expression from scratch: Start learning from this article -> What is an XPath?
  • > For learning the creation of CSS Selectors from scratch: Start learning from this article -> What is a CSS Selector?

Here concludes this article.

In the next article, I will start explaining the latest version of Selenium IDE in detail.

Next Steps:

  • > To learn more about Selenium, continue to the next post (Click on Next Post link below)
  • > Check complete Selenium Tutorial Contents here (Click here)

Please leave your questions/comments/feedback below.

Happy Learning 🙂

About Me > Arun Motoori

On a mission to contribute to the Software Testing Community in all possible ways.

<<Previous Post                            << Complete Tutorial>>                              Next Post>>

If you like this article, share it on LinkedIn using the below button:

Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *