Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Checkbox wont check unless force parameter is passed on #2360

Closed
vrknetha opened this issue May 26, 2020 · 9 comments
Closed

[BUG] Checkbox wont check unless force parameter is passed on #2360

vrknetha opened this issue May 26, 2020 · 9 comments

Comments

@vrknetha
Copy link

vrknetha commented May 26, 2020

Context:

  • Playwright Version: 1.0.2
  • Operating System: Windows
  • Node version: v12.16.3
  • Browser: Chrowmium
  • Extra: Jest

Code Snippet
Help us help you! Put down a short code snippet that illustrates your bug and
that we can run and debug locally. For example:

const {chromium} = require('playwright');
await this.page.check('input[type="checkbox"][name="delete_activity"]', {force: true});
  pw:input (page|frame).type("#email") +0ms
  pw:input waiting for the selector "#email" +132ms
  pw:input ...got element for the selector +154ms
  pw:input elementHandle.type("govind_avtkkhk_rao@tfbnw.net") +6ms
  pw:input elementHandle.focus() +83ms
  pw:input (page|frame).type("#pass") +824ms
  pw:input waiting for the selector "#pass" +23ms
  pw:input ...got element for the selector +18ms
  pw:input elementHandle.type("convosight") +26ms
  pw:input elementHandle.focus() +3ms
  pw:input (page|frame).click("button[name='login']") +373ms
  pw:input waiting for the selector "button[name='login']" +45ms
  pw:input ...got element for the selector +26ms
  pw:input elementHandle.click() +69ms
  pw:input waiting for element to be displayed and not moving... +5ms
  pw:input ...element is displayed and does not move +75ms     
  pw:input scrolling into view if needed... +9ms
  pw:input ...done scrolling +8ms
  pw:input checking that element receives pointer events at (631.6,363.4)... +10ms
  pw:input ...element does receive pointer events, continuing input action +156ms
  pw:input performing "click" action... +11ms
  pw:input ... "click" action done +165ms
  pw:input waiting for scheduled navigations to finish... +8ms
  pw:input ...navigations have finished +22ms
  pw:input elementHandle.click() +36s
  pw:input waiting for element to be displayed and not moving... +7ms
  pw:input ...element is displayed and does not move +46ms
  pw:input scrolling into view if needed... +30ms
  pw:input ...done scrolling +21ms
  pw:input checking that element receives pointer events at (241.6,445)... +324ms
  pw:input ...element does receive pointer events, continuing input action +862ms
  pw:input performing "click" action... +19ms
  pw:input ... "click" action done +2s
  pw:input waiting for scheduled navigations to finish... +80ms
  pw:input ...navigations have finished +128ms
  pw:input elementHandle.click() +2s
  pw:input waiting for element to be displayed and not moving... +19ms
  pw:input ...element is displayed and does not move +133ms
  pw:input scrolling into view if needed... +60ms
  pw:input ...done scrolling +81ms
  pw:input checking that element receives pointer events at (1064.09,329.6)... +125ms
  pw:input ...element does receive pointer events, continuing input action +88ms
  pw:input performing "click" action... +40ms
  pw:input ... "click" action done +197ms
  pw:input waiting for scheduled navigations to finish... +54ms
  pw:input ...navigations have finished +257ms
  pw:input (page|frame).click("button._271k[type="submit"]") +14ms
  pw:input waiting for the selector "button._271k[type="submit"]" +9ms
  pw:input ...got element for the selector +91ms
  pw:input elementHandle.click() +7ms
  pw:input waiting for element to be displayed and not moving... +2ms
  pw:input ...element is displayed and does not move +26ms
  pw:input scrolling into view if needed... +43ms
  pw:input ...done scrolling +49ms
  pw:input checking that element receives pointer events at (1064.75,257.6)... +58ms
  pw:input ...element does receive pointer events, continuing input action +23ms
  pw:input performing "click" action... +76ms
  pw:input ... "click" action done +106ms
  pw:input waiting for scheduled navigations to finish... +70ms
  pw:input ...navigations have finished +77ms
  pw:input (page|frame).check("input[type="checkbox"][name="delete_activity"]") +5s
  pw:input waiting for the selector "input[type="checkbox"][name="delete_activity"]" +5ms
  pw:input ...got element for the selector +2s
  pw:input elementHandle.check() +5ms
  pw:input elementHandle.click() +15ms
  pw:input scrolling into view if needed... +40ms
  pw:input ...done scrolling +16ms
  pw:input performing "click" action... +69ms
  pw:input ... "click" action done +99ms
  pw:input waiting for scheduled navigations to finish... +13ms
  pw:input ...navigations have finished +29ms
  pw:input (page|frame).click("button._42ft[name="confirmed"]") +40ms
  pw:input waiting for the selector "button._42ft[name="confirmed"]" +27ms

Describe the bug
It is a checkbox on the page, The check won't work unless I pass on the parameter 'force=true'
Add any other details about the problem here. The snippet has the html

snippet.txt

@vrknetha vrknetha changed the title [BUG] [BUG] Checkbox wont check unless force parameter is passed on May 26, 2020
@pavelfeldman
Copy link
Member

Could you share a log w/o force? this log suggests that everything works and it is unclear what the issue was.

@vrknetha
Copy link
Author

vrknetha commented May 27, 2020

When it try to perform page.check(). This happens

2020-05-27T09:01:08.981Z pw:input scrolling into view if needed...
[1] 2020-05-27T09:01:08.986Z pw:input ...done scrolling
[1] 2020-05-27T09:01:08.989Z pw:input checking that element receives pointer events at (789,437.5)...
[1] 2020-05-27T09:01:09.003Z pw:input ...element does not receive pointer events, retrying input action
[1] 2020-05-27T09:01:09.003Z pw:input waiting for element to be displayed and not moving...
[1] 2020-05-27T09:01:09.014Z pw:input ...element is displayed and does not move
[1] 2020-05-27T09:01:09.014Z pw:input scrolling into view if needed...
[1] 2020-05-27T09:01:09.019Z pw:input ...done scrolling
[1] 2020-05-27T09:01:09.022Z pw:input checking that element receives pointer events at (789,437.5)...
[1] 2020-05-27T09:01:09.036Z pw:input ...element does not receive pointer events, retrying input action
[1] 2020-05-27T09:01:09.037Z pw:input waiting for element to be displayed and not moving...
[1] 2020-05-27T09:01:09.048Z pw:input ...element is displayed and does not move
[1] 2020-05-27T09:01:09.050Z pw:input scrolling into view if needed...
[1] 2020-05-27T09:01:09.053Z pw:input ...done scrolling
[1] 2020-05-27T09:01:09.055Z pw:input checking that element receives pointer events at (789,437.5)...
[1] 2020-05-27T09:01:09.070Z pw:input ...element does not receive pointer events, retrying input action
[1] 2020-05-27T09:01:09.071Z pw:input waiting for element to be displayed and not moving...
[1] 2020-05-27T09:01:09.080Z pw:input ...element is displayed and does not move
[1] 2020-05-27T09:01:09.081Z pw:input scrolling into view if needed...
[1] 2020-05-27T09:01:09.086Z pw:input ...done scrolling
[1] 2020-05-27T09:01:09.088Z pw:input checking that element receives pointer events at (789,437.5)...
[1] 2020-05-27T09:01:09.102Z pw:input ...element does not receive pointer events, retrying input action
[1] 2020-05-27T09:01:09.103Z pw:input waiting for element to be displayed and not moving...
[1] 2020-05-27T09:01:09.114Z pw:input ...element is displayed and does not move
[1] 2020-05-27T09:01:09.115Z pw:input scrolling into view if needed...
[1] 2020-05-27T09:01:09.119Z pw:input ...done scrolling
[1] 2020-05-27T09:01:09.122Z pw:input checking that element receives pointer events at (789,437.5)...
[1] 2020-05-27T09:01:09.137Z pw:input ...element does not receive pointer events, retrying input action
[1] 2020-05-27T09:01:09.137Z pw:input waiting for element to be displayed and not moving...
[1] 2020-05-27T09:01:09.148Z pw:input ...element is displayed and does not move
[1] 2020-05-27T09:01:09.148Z pw:input scrolling into view if needed...
[1] 2020-05-27T09:01:09.153Z pw:input ...done scrolling
[1] 2020-05-27T09:01:09.155Z pw:input checking that element receives pointer events at (789,437.5)...
[1] 2020-05-27T09:01:09.170Z pw:input ...element does not receive pointer events, retrying input action
[1] 2020-05-27T09:01:09.171Z pw:input waiting for element to be displayed and not moving...
[1] 2020-05-27T09:01:09.180Z pw:input ...element is displayed and does not move
[1] 2020-05-27T09:01:09.181Z pw:input scrolling into view if needed...
[1] 2020-05-27T09:01:09.186Z pw:input ...done scrolling
[1] 2020-05-27T09:01:09.189Z pw:input checking that element receives pointer events at (789,437.5)...
[1] 2020-05-27T09:01:09.206Z pw:input ...element does not receive pointer events, retrying input action
[1] 2020-05-27T09:01:09.206Z pw:input waiting for element to be displayed and not moving...
[1] 2020-05-27T09:01:09.233Z pw:input ...element is displayed and does not move
[1] 2020-05-27T09:01:09.235Z pw:input scrolling into view if needed...
[1] 2020-05-27T09:01:09.238Z pw:input ...done scrolling
[1] 2020-05-27T09:01:09.241Z pw:input checking that element receives pointer events at (789,437.5)...
[1] 2020-05-27T09:01:09.258Z pw:input ...element does not receive pointer events, retrying input action
[1] 2020-05-27T09:01:09.258Z pw:input waiting for element to be displayed and not moving...
[1] 2020-05-27T09:01:09.298Z pw:input ...element is displayed and does not move
[1] 2020-05-27T09:01:09.300Z pw:input scrolling into view if needed...
[1] 2020-05-27T09:01:09.305Z pw:input ...done scrolling
[1] 2020-05-27T09:01:09.308Z pw:input checking that element receives pointer events at (789,437.5)...
[1] 2020-05-27T09:01:09.319Z pw:input ...element does not receive pointer events, retrying input action
[1] 2020-05-27T09:01:09.319Z pw:input waiting for element to be displayed and not moving...
[1] 2020-05-27T09:01:09.327Z pw:input ...element is displayed and does not move
[1] 2020-05-27T09:01:09.329Z pw:input scrolling into view if needed...
[1] 2020-05-27T09:01:09.334Z pw:input ...done scrolling
[1] 2020-05-27T09:01:09.336Z pw:input checking that element receives pointer events at (789,437.5)...
[1] 2020-05-27T09:01:09.344Z pw:input ...element does not receive pointer events, retrying input action
[1] 2020-05-27T09:01:09.346Z pw:input waiting for element to be displayed and not moving...
[1] 2020-05-27T09:01:09.363Z pw:input ...element is displayed and does not move
[1] 2020-05-27T09:01:09.364Z pw:input scrolling into view if needed...
[1] 2020-05-27T09:01:09.369Z pw:input ...done scrolling
[1] 2020-05-27T09:01:09.371Z pw:input checking that element receives pointer events at (789,437.5)...
[1] 2020-05-27T09:01:09.385Z pw:input ...element does not receive pointer events, retrying input action
[1] 2020-05-27T09:01:09.386Z pw:input waiting for element to be displayed and not moving...
[1] 2020-05-27T09:01:09.399Z pw:input ...element is displayed and does not move
[1] 2020-05-27T09:01:09.400Z pw:input scrolling into view if needed...
[1] 2020-05-27T09:01:09.403Z pw:input ...done scrolling
[1] 2020-05-27T09:01:09.406Z pw:input checking that element receives pointer events at (789,437.5)...
[1] 2020-05-27T09:01:09.420Z pw:input ...element does not receive pointer events, retrying input action
[1] 2020-05-27T09:01:09.420Z pw:input waiting for element to be displayed and not moving...
[1] 2020-05-27T09:01:09.427Z pw:input ...element is displayed and does not move
[1] 2020-05-27T09:01:09.429Z pw:input scrolling into view if needed...
[1] 2020-05-27T09:01:09.434Z pw:input ...done scrolling
[1] 2020-05-27T09:01:09.437Z pw:input checking that element receives pointer events at (789,437.5)...
[1] 2020-05-27T09:01:09.449Z pw:input ...element does not receive pointer events, retrying input action
[1] 2020-05-27T09:01:09.451Z pw:input waiting for element to be displayed and not moving...
[1] 2020-05-27T09:01:09.463Z pw:input ...element is displayed and does not move
[1] 2020-05-27T09:01:09.464Z pw:input scrolling into view if needed...
[1] 2020-05-27T09:01:09.469Z pw:input ...done scrolling
[1] 2020-05-27T09:01:09.473Z pw:input checking that element receives pointer events at (789,437.5)...
[1] 2020-05-27T09:01:09.488Z pw:input ...element does not receive pointer events, retrying input action
[1] 2020-05-27T09:01:09.488Z pw:input waiting for element to be displayed and not moving...
[1] 2020-05-27T09:01:09.497Z pw:input ...element is displayed and does not move
[1] 2020-05-27T09:01:09.498Z pw:input scrolling into view if needed...
[1] 2020-05-27T09:01:09.503Z pw:input ...done scrolling
[1] 2020-05-27T09:01:09.505Z pw:input checking that element receives pointer events at (789,437.5)...
[1] 2020-05-27T09:01:09.520Z pw:input ...element does not receive pointer events, retrying input action
[1] 2020-05-27T09:01:09.520Z pw:input waiting for element to be displayed and not moving...
[1] 2020-05-27T09:01:09.531Z pw:input ...element is displayed and does not move
[1] 2020-05-27T09:01:09.532Z pw:input scrolling into view if needed...
[1] 2020-05-27T09:01:09.537Z pw:input ...done scrolling
[1] 2020-05-27T09:01:09.539Z pw:input checking that element receives pointer events at (789,437.5)...
[1] 2020-05-27T09:01:09.554Z pw:input ...element does not receive pointer events, retrying input action
[1] 2020-05-27T09:01:09.554Z pw:input waiting for element to be displayed and not moving...
[1] 2020-05-27T09:01:09.564Z pw:input ...element is displayed and does not move
[1] 2020-05-27T09:01:09.565Z pw:input scrolling into view if needed...
[1] 2020-05-27T09:01:09.569Z pw:input ...done scrolling
[1] 2020-05-27T09:01:09.572Z pw:input checking that element receives pointer events at (789,437.5)...
[1] 2020-05-27T09:01:09.587Z pw:input ...element does not receive pointer events, retrying input action
[1] 2020-05-27T09:01:09.587Z pw:input waiting for element to be displayed and not moving...
[1] 2020-05-27T09:01:09.598Z pw:input ...element is displayed and does not move
[1] 2020-05-27T09:01:09.599Z pw:input scrolling into view if needed...
[1] 2020-05-27T09:01:09.603Z pw:input ...done scrolling
[1] 2020-05-27T09:01:09.605Z pw:input checking that element receives pointer events at (789,437.5)...
[1] 2020-05-27T09:01:09.620Z pw:input ...element does not receive pointer events, retrying input action
[1] 2020-05-27T09:01:09.621Z pw:input waiting for element to be displayed and not moving...
[1] 2020-05-27T09:01:09.631Z pw:input ...element is displayed and does not move
[1] 2020-05-27T09:01:09.632Z pw:input scrolling into view if needed...
[1] 2020-05-27T09:01:09.636Z pw:input ...done scrolling
[1] 2020-05-27T09:01:09.639Z pw:input checking that element receives pointer events at (789,437.5)...

@pavelfeldman
Copy link
Member

It appears that the checkbox doesn't want to accept click events for some reason. Could you invoke "inspect element" on it to see if that element is indeed shown? It could be that it is obscured by another floating element or something like that. Basically, it would be great to get a better idea on the DOM surrounding your checkbox.

@vrknetha
Copy link
Author

This is the element screenshot
image

This is the element
<form rel="async" ajaxify="/ajax/settings/apps/delete_app_multi/" class="_s" action="#" method="post" onsubmit="" id="u_46_1"><input type="hidden" name="jazoest" value="22030" autocomplete="off"><input type="hidden" name="fb_dtsg" value="AQHDflTqLKJu:AQHhZGH-o8eE" autocomplete="off"><div class="_4-i2 _pig _yue _50f4"><div class="_yuf" id="multi_delete_dialog_title">Remove Convosight?</div><div class="_yug">This may delete your Convosight account and activity. Convosight may still have access to information that was previously shared with them, but can't receive additional non-public information. To request that Convosight remove your information, review their <a href="https://www.convosight.com/policies/privacy/?fbclid=IwAR18dqau9cFmpU9a-1Rw0h260D3KVtHELIz2_KcMLM7760sSpKjcSZtW7a4" target="_blank" rel="noopener nofollow" data-lynx-mode="asynclazy" data-lynx-uri="https://l.facebook.com/l.php?u=https%3A%2F%2Fwww.convosight.com%2Fpolicies%2Fprivacy%2F%3Ffbclid%3DIwAR18dqau9cFmpU9a-1Rw0h260D3KVtHELIz2_KcMLM7760sSpKjcSZtW7a4&amp;h=AT2OM0fs0RQtFeZXtVdTPfaTc5KqzC4Xu_QuJ7G_4kC0-o9aiXLOD_Ijk6x5bzAZyk2uGrNTxt5pg1WGed8Dsbj509PPZGBmjwU2nmwWx88AaDH5qyeblAAUebkbGyS2xW8JIg">privacy policy</a> for details about how to contact them.</div><label class="_yxp"><label class="_kv1 _55sg _yxq"><input type="checkbox" aria-labelledby="u_46_0" name="delete_activity" tabindex="0"><span class="_66ul"></span></label><div class="_yxr _2iep _5kx5" id="u_46_0">Delete posts, videos or events that Convosight posted on your timeline.</div></label></div><div class="_5lnf uiOverlayFooter _5a8u"><table class="uiGrid _51mz uiOverlayFooterGrid" cellspacing="0" cellpadding="0"><tbody><tr class="_51mx"><td class="_51m- prs uiOverlayFooterMessage"><input type="hidden" autocomplete="off" name="app_ids" value="[&quot;336167437102103&quot;]"><input type="hidden" autocomplete="off" name="surface" value="applications"><input type="hidden" autocomplete="off" name="page_id" value=""><input type="hidden" autocomplete="off" name="refresh_page_on_success" value=""><input type="hidden" autocomplete="off" name="refresh_page_on_done" value=""><div class="_90wd"><label><label class="_kv1 _55sg _yxq"><input type="checkbox" name="inform_developers" checked="1"><span class="_66ul"></span></label><div class="_90wc">Send notification to Convosight that you removed it. They may offer you another way to log in.</div></label></div></td><td class="_51m- uiOverlayFooterButtons _51mw"><a role="button" class="_42ft _4jy0 layerCancel _88-c uiOverlayButton _4jy3 _517h _51sy" href="#">Cancel</a><button value="1" class="_42ft _4jy0 layerConfirm _88-b uiOverlayButton _4jy3 _4jy1 selected _51sy" name="confirmed" type="submit">Remove</button></td></tr></tbody></table></div></form>

@dcaillibaud
Copy link

Hi,

I have a similar case (and adding { force: true } doesn't change anything), here is pw:api log

  pw:api <= page.waitForSelector succeeded +15ms
  pw:api => page.check started +1ms
  pw:api   waiting for selector "#rgpd" +0ms
  pw:api     selector resolved to visible <input id="rgpd" type="checkbox" ng-model="isRgpdChecke…/> +9ms
  pw:api   attempting page.check action +1ms
  pw:api     waiting for element to be displayed, enabled and not moving +1ms
  pw:api     element is displayed and does not move +27ms
  pw:api     scrolling into view if needed +0ms
  pw:api     done scrolling +1ms
  pw:api     checking that element receives pointer events at (441.4,232.19) +0ms
  pw:api     element does receive pointer events, continuing input action +2ms
  pw:api     performing page.check action +0ms
  pw:api     page.check action done +1ms
  pw:api     waiting for scheduled navigations to finish +0ms
  pw:api     navigations have finished +0ms
  pw:api <= page.check failed +1ms

The page is https://labomep.sesamath.net/front/inscription/ and I don't understand why this simple code works

process.env.CHROME_BIN = '/usr/bin/chromium'
const { chromium } = require('playwright')

describe('playwright check', async () => {
  it('works', async function () {
    this.timeout(60000)
    const browser = await chromium.launch({ headless: false })
    const context = await browser.newContext()
    const page = await context.newPage()
    await page.goto('https://labomep.sesamath.net/front/inscription/', { timeout: 10000 })
    // await page.goto('http://labomep.local:3010/front/inscription/')
    await page.waitForSelector('#rgpd', { state: 'visible', timeout: 2000 })
    await page.check('#rgpd')
    return Promise.resolve()
  })
})

but not the full one :-S

How can I dig my real case to understand what's happening ?

@dcaillibaud
Copy link

FYI my code is passing with firefox, this pb occurs only with chromium (I'm on linux debian 10 and webkit doesn't work, because of missing libjpeg.so.8)

@nchudleigh
Copy link

@dcaillibaud we are running into the same issue, trying to base off of buster. Did you find a solution to this?

Looking into symlinking compatible versions or building from source.

@yogeshVU
Copy link

yogeshVU commented Oct 7, 2020

Perhaps installing libjpeg.so.8 dependency for debian buster ...

wget -q http://mirrors.kernel.org/ubuntu/pool/main/libj/libjpeg-turbo/libjpeg-turbo8_2.0.3-0ubuntu1_amd64.deb \
&& apt-get -qy --allow-downgrades install ./libjpeg-turbo8_2.0.3-0ubuntu1_amd64.deb \
&& rm libjpeg-turbo8_2.0.3-0ubuntu1_amd64.deb 

@pavelfeldman
Copy link
Member

Closing as a part of triage. Please feel free to re-file with additional details in case it is still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants