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

Doesn't limit scope of searching within the parent element scope #78

Closed
Ankit-Laddha opened this issue Nov 1, 2020 · 1 comment
Closed
Labels
duplicate This issue or pull request already exists

Comments

@Ankit-Laddha
Copy link

Ankit-Laddha commented Nov 1, 2020

Not sure if I'm doing something wrong OR it's the accepted behaviour.

Browser: any
cypress@5.4.0
cypress-react-selector@ = 2.2.0

I'm using mix of .react and .get/.find of cypress while finding any element. There are certain situation when I want to limit the scope of .react() to certain div children. But using .react gives me all the elements on the page instead of the matching one from the scope.

Pseudo example:

cy.get('parent-locator') .react('MyReactComponent') .click();

Error:
More than one element found for click

@abhinaba-ghosh abhinaba-ghosh added the duplicate This issue or pull request already exists label Nov 3, 2020
@abhinaba-ghosh
Copy link
Owner

Tracking here #41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants