Skip to content

selector resolved to hidden error #521

Closed as not planned
Closed as not planned
@InduKrish

Description

@InduKrish

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

  1. [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...
============================================================

Screen Shot 2022-09-20 at 11 23 05 AM

Screen Shot 2022-09-20 at 11 25 30 AM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions