question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Unable to interact with visible element

See original GitHub issue

Context:

  • Playwright Version: 1.16.2
  • Operating System: MaC
  • Node.js version: 14
  • Browser: CHROME
  • Extra: [any specific details about your environment]

Code Snippet

get editIcon() { return this.page.locator('(//li[text()="Edit"])[1]') }

async clickOnEditIcon(feature: string) {
    await this.editIcon.click()
    return this;
}
Screenshot 2021-12-01 at 10 19 24
    locator.click: Target closed
    =========================== logs ===========================
    waiting for selector "//li[text()="Edit"] >> nth=0"
      selector resolved to hidden <li tabindex="-1" role="menuitem" class="MuiMenuItem…>…</li>
    attempting click action
      waiting for element to be visible, enabled and stable
        element is not visible - waiting...

Describe the bug

Unable to interact with an element from multiple elements, however I have defined it to be the first of the list, but still not able to interact with.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
amrsa1commented, Dec 3, 2021

okay seems it working, only after i reload the page.

0reactions
AlexKomanovcommented, Dec 2, 2021

@Amrkamel1 Can you please share the trace of this scenario?

Read more comments on GitHub >

github_iconTop Results From Across the Web

[ Bug]: Selenium cannot interact with some visible elements ...
Selenium cannot interact with some visible elements which contain "fragment" keyword. Run the code from snippet. Element "//main[contains(@Class ...
Read more >
Elements visible on appium desktop but can't interact with them
Hi all,. I'm experiencing the following issue with appium and a react native app. 1º I locate some elements using appium Desktop (1.19.1)....
Read more >
Debug the Element Visibility Problems in Cypress
Cypress fails the test when the clearly visible "Cypress is amazing! ... The test is failing because an element is deemed to be...
Read more >
Selenium Unable to locate element: Bug - Stack Overflow
Make sure the page is loaded successfully and user name field is displayed using WebDriverWait. Need the below Imports
Read more >
Cannot click WebElement that is outside visible area of ...
I can interact with the element while it's off screen and get the value of isSelected() for example but cannot click it. To...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found