cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
46.8k stars 3.17k forks source link

Element is being covered by another element ({force: true} is not working) #29449

Closed pillsi closed 1 month ago

pillsi commented 5 months ago

Description

When I click a link, I expected a pop up box to happen, but I saw the error "Element is being covered by another element" happened instead, I cannot use {force: true} to override this check since I need to check the element inside the pop up box.

URL of Issue(s)

An Intranet site

Steps to replicate

  1. Go to home page
  2. Click on product item details
  3. Click on "link__text"
  4. See error: Timed out retrying after 4050ms: cy.click() failed because this element:

Show re...

is being covered by another element:

...

Browser

Google Chrome V120

Device

Additional Information

No response

jennifer-shehane commented 5 months ago

@pillsi Could you provide some code to run that recreates this issue? We'll need that to investigate. Otherwise we'll have to close the issue with no path forward.

pillsi commented 5 months ago

Hi Jennifer,

Thanks for your kind reply! Please find my code and error message in the following:

When('I click show redemption details', ()=>{ cy.get("body > mds-slide-in-panel-modal").find("mds-link").eq(0).click(); });

Then('Redemption array list should display', ()=>{ cy.get("#detail-redemption-link > mds-flyout-overlay > div:nth-child(1)").contains('21.10')})


CypressError Timed out retrying after 4050ms: cy.click() failed because this element:

is being covered by another element:

...

Any suggestions will be appreciated!

Thanks! Pillsi


From: Jennifer Shehane @.> Sent: Wednesday, May 8, 2024 12:44 To: cypress-io/cypress @.> Cc: pillsi @.>; Mention @.> Subject: Re: [cypress-io/cypress] Element is being covered by another element ({force: true} is not working) (Issue #29449)

@pillsihttps://github.com/pillsi Could you provide some code to run that recreates this issue? We'll need that to investigate. Otherwise we'll have to close the issue with no path forward.

— Reply to this email directly, view it on GitHubhttps://github.com/cypress-io/cypress/issues/29449#issuecomment-2100990255, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AX7AR6YJL2TXYK3PIRB32TDZBJI7LAVCNFSM6AAAAABHA5ZHWCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBQHE4TAMRVGU. You are receiving this because you were mentioned.

jennifer-shehane commented 4 months ago

@pillsi We'll need a way to run the code to see the error and inspect the DOM in order to investigate. Or an example in an example app.