Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nice Locators #6664

shs96c opened this issue Nov 20, 2018 · 2 comments


3 participants
Copy link

commented Nov 20, 2018

The current locators are very low level, and so we need to add some nice ones that people can use to the support library. These should probably subclass By

@shs96c shs96c created this issue from a note in Selenium 4 (To do) Nov 20, 2018

@shs96c shs96c added the C-java label Nov 20, 2018


This comment has been minimized.

Copy link

commented Nov 30, 2018

hello @shs96c
Locators like By.XPath or By.CssSelector are mostly used for flexibilty
By.Id get used when there is only one element is present
can we apply Generic methods so user will get more help
Surely i like to contribute and learn from this too.
Just tell me more when require small contribution


This comment has been minimized.

Copy link

commented Nov 30, 2018

@shs96c Let’s make sure we fully document these so they don’t become a support nightmare. I’m thinking of something like a near or above or below locator, where our vision of those terms may not precisely align with what every user, everywhere believes.

I’d much rather “teach people to fish,” by saying something like, “Here’s how you implement something like a ‘friendly’ locator, and here are some implementations. If they work for you as-is, great. If not, you can use these implementations as templates to get you the exact behavior you want.” I’m explicitly wanting to avoid the horror of ExpectedConditions, and hopefully setting the expectation up front will help with the support and maintenance burden down the road.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.