diff --git a/docs/api/commands/shadow.mdx b/docs/api/commands/shadow.mdx index 8f668a3197..0939952aa0 100644 --- a/docs/api/commands/shadow.mdx +++ b/docs/api/commands/shadow.mdx @@ -96,13 +96,10 @@ When working with `cy.click()`, it sometimes won't click the right element in Chrome. It's happening because of [the ambiguity in spec](https://bugs.chromium.org/p/chromium/issues/detail?id=1188919&q=shadowRoot%20elementFromPoint&can=2). -In this case, pass `{ position: 'top' }` to `cy.click()` like below: +In this case, pass `'top'` to `cy.click()` like below: ```js -cy.get('#element') - .shadow() - .find('[data-test-id="my-button"]') - .click({ position: 'top' }) +cy.get('#element').shadow().find('[data-test-id="my-button"]').click('top') ``` ## Command Log