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

Cant find text inside a div #6

Open
antomanzur opened this issue Nov 26, 2019 · 1 comment
Open

Cant find text inside a div #6

antomanzur opened this issue Nov 26, 2019 · 1 comment

Comments

@antomanzur
Copy link

Hey! First of all thank you for this, i'm trying to use it in one of my projects and so far is working great.
But today i tried to find a div by the text inside of it (i can't use the id, the class or the name of the div), but it doesn't work.
What i tried is
await select(page).assertElementPresent('div:contains(Text) > "hello"');
const element = await select(page).getElement('div:contains(Text) > "hello"');
await element.click()

if you can help me with this it will be awesome.
Thank you

@impactcolor
Copy link

I think your reading the query incorrectly.
await select(page).assertElementPresent('div:contains(Text) > "hello"');
Text should be the text. ('div:contains(Hello)...');

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