which locator is best/Trustable Xpath CSS JQuery ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

which locator is best/Trustable Xpath CSS JQuery ?

javelearner
Hello Selenium user, 

Can anyone please share which of the following three locator is best and why? 

1. xpath 2. CSS 3. JQuery 

Thanks!! 

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/0a7cd9f1-98af-4677-8150-1714929dd378%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: which locator is best/Trustable Xpath CSS JQuery ?

Jonathan Herbaut
Hi ! :)
For my personal use, I prefer Id and Name, then CSS class. I prefer to never use XPath because if you don't aim accuratly your element, you can target another one if your UI is evolving.

2018-05-04 8:53 GMT+02:00 <[hidden email]>:
Hello Selenium user, 

Can anyone please share which of the following three locator is best and why? 

1. xpath 2. CSS 3. JQuery 

Thanks!! 

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/0a7cd9f1-98af-4677-8150-1714929dd378%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAH1BzpX64guFJ-LtzuKefgD-2M-QjyF_hXNhAZxTH8XYWfLEyA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: which locator is best/Trustable Xpath CSS JQuery ?

Ankit Gupta-2
I prefer xpath, because using xpath you can find any element. it has many functionality like (sibling, parent, ancestor, and number of options are there not in anything else)

On Fri, May 4, 2018 at 12:43 PM, Jonathan Herbaut <[hidden email]> wrote:
Hi ! :)
For my personal use, I prefer Id and Name, then CSS class. I prefer to never use XPath because if you don't aim accuratly your element, you can target another one if your UI is evolving.

2018-05-04 8:53 GMT+02:00 <[hidden email]>:
Hello Selenium user, 

Can anyone please share which of the following three locator is best and why? 

1. xpath 2. CSS 3. JQuery 

Thanks!! 

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/0a7cd9f1-98af-4677-8150-1714929dd378%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAH1BzpX64guFJ-LtzuKefgD-2M-QjyF_hXNhAZxTH8XYWfLEyA%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAKrer0DbzeX8erWujHp12%3DV%3DSA7byFNW04W86XW8q-6d07Kokw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.