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

contains documentation specifies text, but is actually selector #212

Open
benshine opened this issue Jul 6, 2016 · 1 comment
Open

contains documentation specifies text, but is actually selector #212

benshine opened this issue Jul 6, 2016 · 1 comment

Comments

@benshine
Copy link

benshine commented Jul 6, 2016

The documentation for contains says "Returns a boolean representing whether an element or a set of elements contains the specified text."
but I think it's actually looking for the specified selector,
Just below that, the doc says the parameters are
"Parameters
selector string CSS selector of the element to check"

@san650
Copy link
Owner

san650 commented Jul 6, 2016

@benshine we need to improve the documentation.

The idea is that when you define a property on a page object using the contains helper, you need to indicate on which element you want to perform the operation, so you use a selector when defining the property. This helper generates a function which receives the text to look for.

So it receives a selector string when you declare the property but the generated function receives a text to look for.

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

No branches or pull requests

2 participants