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

Providing a means to catch duplicate page objects #241

Closed
jasonmci opened this issue Oct 5, 2017 · 1 comment
Closed

Providing a means to catch duplicate page objects #241

jasonmci opened this issue Oct 5, 2017 · 1 comment

Comments

@jasonmci
Copy link

jasonmci commented Oct 5, 2017

Meta

It is easy for testers to add redundant page elements, that is, adding another element for an element that already exists. These elements may have different names.

It would be good to provide a linting tool, or at least provide a means to write tests to verify unique page elements. This can be done by checking the paths Capybara returns.

It may also be a logical next step to sort all the page elements of where they appear in the DOM

Suggest a method to at least get the path back with a

show_username_element_path

method which could then be used to compare paths of elements on the page.

Capybara returns a path that looks like this:

"/html/body/div/div/form/fieldset[1]/div/div/input" which will be unique within the DOM

@romikoops
Copy link
Contributor

connected issue #264

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants