[Question] Is locator.click() always click in the center of the button?
See original GitHub issueI use playwright 1.19.2 at the moment
Is locator.click() always click in the center of the button? what if I have element overlayed element on top of the button (partially but still clickable manually). For example, chat bubble is covering a portion of the button.
As you can see the button is visible (and clickable manually) but playwright saying that subtree intercept pointer event (due to overlayed chat bubble)
locator.click: Timeout 60000ms exceeded.
=========================== logs ===========================
waiting for selector "#continue-contract"
selector resolved to visible <button type="button" ng-click="continue()" id="continue…>…</button>
attempting click action
waiting for element to be visible, enabled and stable
element is visible, enabled and stable
scrolling into view if needed
done scrolling
performing click action
<div class="intercom-lightweight-app-launcher-icon in…>…</div> from <div class="intercom-lightweight-app">…</div> subtree intercepts pointer events
Btw, below is the intercom bubble as I mentioned:
<div class="intercom-lightweight-app-launcher-icon in…>…</div> from <div class="intercom-lightweight-app">…</div> subtree intercepts pointer events
As a note, I think we could reposition chat bubble. The problem is the actual button we want to click is having a dynamic position (but still clickable manually). So reposition chat bubble is not the preferred solution
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Cypress does not always executes click on element
And from time to time Cypress is not able to execute click on button. The tests click on buttons (0 to 9 )...
Read more >988 Frequently Asked Questions - SAMHSA
A trained crisis counselor answers the phone, listens to the caller, understands how their problem is affecting them, provides support, and shares resources...
Read more >Triggering click event on Leaflet map? - GIS Stack Exchange
I'd like to open a popup at the clicked location and I don't want to add a marker or add a new popup...
Read more >Use a command button to start an action or a series of actions
Click the location on the form where you want to place the command button. ... In a stacked layout, the label and the...
Read more >Google Sheets cheat sheet
Drag the cells to a new location. Group rows or columns: Select the rows or columns. Click Data and then Group rows or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If you force, it’ll click the center and hit your overlay. Your scenario looks like an edge case that we would not want to address. you can do
await locator.dispatchEvent('click')
to just dispatch it in JS and move on.Closing as per above, please feel free to open a new issue if this does not cover your use case.