Description
while trying to click the checkbox using the following test, it fails with the following error: selector resolved to hidden <title>check</title>
async checkActiveStatusdom(text) {
const header = await this.screen.findByTestId('erow-GroupCode-0');
console.log(" header" + header)
const base = this.within(header).getByText("LINEHOLDER")
console.log("base value" + base);
const check = this.within(header).getByText("check")
console.log(" value " + check)
await expect(base).toContainText(text);
console.log("text assertion successful")
await check.click(); ---> fails
}
output:
headerLocator@query-by-test-id=["erow-GroupCode-0"]
base valueLocator@query-by-test-id=["erow-GroupCode-0"] >> get-by-text=["LINEHOLDER"]
value Locator@query-by-test-id=["erow-GroupCode-0"] >> get-by-text=["check"]
text assertion successful
- [chromium] › tests/web/vacation.bidaward.defaults.spec.po.new.js:14:9 › Bid and award Default page verification › Default page verification
Test timeout of 30000ms exceeded.
locator.click: Target closed
=========================== logs ===========================
waiting for selector "query-by-test-id=["erow-GroupCode-0"] >> get-by-text=["check"]"
selector resolved to hidden <title>check</title>
attempting click action
waiting for element to be visible, enabled and stable
element is not visible - waiting...
============================================================