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

Need help with deepquery selector #25

Closed
alpriya87 opened this issue Mar 17, 2020 · 1 comment
Closed

Need help with deepquery selector #25

alpriya87 opened this issue Mar 17, 2020 · 1 comment

Comments

@alpriya87
Copy link

Here is the jspath :(Not able to click on the link )

document.querySelector("body > portal-web").shadowRoot.querySelector("#sink > details-web").shadowRoot.querySelector("div > history-page > div > ink-container > ink-card > div:nth-child(2) > div.historypage-items > mat-table > mat-row:nth-child(2) > mat-cell.ods-text__body--normal.component-width-insight.mat-cell.cdk-column-InSight.mat-column-InSight.ng-star-inserted > a")

I tried doing the below :
const viewRelease = (await this.page.waitForFunction(() => {
const viewRelease = querySelectorShadowDom.querySelectorDeep("div > history-page > div > ink-container > ink-card > div:nth-child(2) > div.historypage-items > mat-table > mat-row:nth-child(2) > mat-cell.ods-text__body--normal.component-width-insight.mat-cell.cdk-column-InSight.mat-column-InSight.ng-star-inserted > a")
return viewRelease;
})).asElement();
await viewRelease.click();

OR
const viewRelease = (await this.page.waitForFunction(() => {
const viewRelease = querySelectorShadowDom.querySelectorDeep("div:nth-child(2) .ng-star-inserted > a")
return viewRelease;
})).asElement();
await viewRelease.click();

Both did not work

@Georgegriff
Copy link
Contributor

Hi i'm sorry to hear you're having issues, i will struggle to debug these scenarios to see if there are bugs in the library without reproduction code. I've not seen these issues raised before so it's possible that the css selector your using are not correct. I'm sorry i can't be of more help, all i can advise is to keep your selectors as simple as possible.

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