-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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] position of elements inside Chromium cross origin iframe seems wrong #3170
Comments
This changeset adds two tests aimed at repoducing microsoft#3170 where a link in a cross-domain iframe fails to get clicked even though the element is found. In addition to the cross-domain test, we add a `srcdoc` test to baseline the source of failing behavior. In the matrix of {Firefox, Chomium, Webkit } X { srcdoc, cross-domain} X { Headfull, Headless }, only the Chromium Headfull test with cross-domain iframe fails. Notably, it fails while logging the same message as reported in the original issue: ``` pw:api retrying click action [] +0ms pw:api waiting for element to be visible, enabled and not moving [] +0ms pw:api element is visible, enabled and does not move [] +25ms pw:api scrolling into view if needed [] +0ms pw:api done scrolling [] +1ms pw:api checking that element receives pointer events at (35.32,17) [] +1ms pw:api element does not receive pointer events [] … ```
This changeset adds two tests aimed at reproducing microsoft#3170 where a link in a cross-domain iframe fails to get clicked even though the element is found. In addition to the cross-domain test, we add a `srcdoc` test to baseline the source of failing behavior. In the matrix of {Firefox, Chromium, Webkit } X { srcdoc, cross-domain } X { Headfull, Headless }, only the Chromium Headfull test with cross-domain iframe fails. Notably, it fails while logging the same message as reported in the original issue: ``` pw:api retrying click action [] +0ms pw:api waiting for element to be visible, enabled and not moving [] +0ms pw:api element is visible, enabled and does not move [] +25ms pw:api scrolling into view if needed [] +0ms pw:api done scrolling [] +1ms pw:api checking that element receives pointer events at (35.32,17) [] +1ms pw:api element does not receive pointer events [] … ```
This changeset adds two tests aimed at reproducing microsoft#3170 where a link in a cross-domain iframe fails to get clicked even though the element is found. In addition to the cross-domain test, we add a `srcdoc` test to baseline the source of failing behavior. In the matrix of {Firefox, Chromium, Webkit } X { srcdoc, cross-domain } X { Headfull, Headless }, only the Chromium Headfull test with cross-domain iframe fails. Notably, it fails while logging the same message as reported in the original issue: ``` pw:api retrying click action [] +0ms pw:api waiting for element to be visible, enabled and not moving [] +0ms pw:api element is visible, enabled and does not move [] +25ms pw:api scrolling into view if needed [] +0ms pw:api done scrolling [] +1ms pw:api checking that element receives pointer events at (35.32,17) [] +1ms pw:api element does not receive pointer events [] … ```
I added #3172 thinking it would cover the case reported here. However, while I get the same error message, the failure matrix doesn't match the failure matrix for the exact scenario from @joost2076 which I've repro'd (and then further tested across all browsers with the attached script). Firefox (headless and headfull) is the only browser where the click works and navigates to the login page. Chromium headfull fails in the exact way @joost2076 reported (i.e. while awaiting the click). The other combinations report a successful click (i.e. we get past the await) but don't actually navigate to the log in page. If you remove the style from the div, the results remain unchanged except you get a headfull chrome click (but still no navigation). Aside: If you perform this test manually in the production version of Firefox (78.0.2), the navigation to the Wikipedia login page will be blocked due to Raw Test Output:
Script to generate it:
|
This changeset adds tests the more closely match the reported scenario in microsoft#3170. Firefox, both headless and headfull pass completetly in all cases. The other browsers (both headless and headfull) report a successful click (i.e. they get past the await `button.click()`) but fail to pass the navigation check, except for Chromium HeadFULL with a fixed div which fails to even do the click. NB: If you perform this test manually in the production version of Firefox (78.0.2), the navigation to the Wikipedia login page will be blocked due to X-Frame-Options: DENY. The iframe will load on localhost, but clicking login will get you a an error about X-Frame-Options. So, in some ways, even though this test is "passing" for FFOX, in a traditional user environment we'd expect it to fail.
This changeset adds tests the more closely match the reported scenario in microsoft#3170. Firefox, both headless and headfull pass completetly in all cases. The other browsers (both headless and headfull) report a successful click (i.e. they get past the await `button.click()`) but fail to pass the navigation check, except for Chromium HeadFULL with a fixed div which fails to even do the click. NB: If you perform this test manually in the production version of Firefox (78.0.2), the navigation to the Wikipedia login page will be blocked due to X-Frame-Options: DENY. The iframe will load on localhost, but clicking login will get you a an error about X-Frame-Options. So, in some ways, even though this test is "passing" for FFOX, in a traditional user environment we'd expect it to fail.
I've updated #3172 with additional tests that more closely simulate the reported issue. It seems there's two issues:
/cc @aslushnikov since he looked into #3166 which feels similar (at least for the clicking part), but differs in what's fixed and visible. |
This changeset adds two tests aimed at reproducing microsoft#3170 where a link in a cross-domain iframe fails to get clicked even though the element is found. In addition to the cross-domain test, we add a `srcdoc` test to baseline the source of failing behavior. In the matrix of {Firefox, Chromium, Webkit } X { srcdoc, cross-domain } X { Headfull, Headless }, only the Chromium Headfull test with cross-domain iframe fails. Notably, it fails while logging the same message as reported in the original issue: ``` pw:api retrying click action [] +0ms pw:api waiting for element to be visible, enabled and not moving [] +0ms pw:api element is visible, enabled and does not move [] +25ms pw:api scrolling into view if needed [] +0ms pw:api done scrolling [] +1ms pw:api checking that element receives pointer events at (35.32,17) [] +1ms pw:api element does not receive pointer events [] … ```
This changeset adds tests the more closely match the reported scenario in microsoft#3170. Firefox, both headless and headfull pass completetly in all cases. The other browsers (both headless and headfull) report a successful click (i.e. they get past the await `button.click()`) but fail to pass the navigation check, except for Chromium HeadFULL with a fixed div which fails to even do the click. NB: If you perform this test manually in the production version of Firefox (78.0.2), the navigation to the Wikipedia login page will be blocked due to X-Frame-Options: DENY. The iframe will load on localhost, but clicking login will get you a an error about X-Frame-Options. So, in some ways, even though this test is "passing" for FFOX, in a traditional user environment we'd expect it to fail.
This changeset adds two tests aimed at reproducing microsoft#3170 where a link in a cross-domain iframe fails to get clicked even though the element is found. In addition to the cross-domain test, we add a `srcdoc` test to baseline the source of failing behavior. In the matrix of {Firefox, Chromium, Webkit } X { srcdoc, cross-domain } X { Headfull, Headless }, only the Chromium Headfull test with cross-domain iframe fails. Notably, it fails while logging the same message as reported in the original issue: ``` pw:api retrying click action [] +0ms pw:api waiting for element to be visible, enabled and not moving [] +0ms pw:api element is visible, enabled and does not move [] +25ms pw:api scrolling into view if needed [] +0ms pw:api done scrolling [] +1ms pw:api checking that element receives pointer events at (35.32,17) [] +1ms pw:api element does not receive pointer events [] … ```
This changeset adds tests the more closely match the reported scenario in microsoft#3170. Firefox, both headless and headfull pass completetly in all cases. The other browsers (both headless and headfull) report a successful click (i.e. they get past the await `button.click()`) but fail to pass the navigation check, except for Chromium HeadFULL with a fixed div which fails to even do the click. NB: If you perform this test manually in the production version of Firefox (78.0.2), the navigation to the Wikipedia login page will be blocked due to X-Frame-Options: DENY. The iframe will load on localhost, but clicking login will get you a an error about X-Frame-Options. So, in some ways, even though this test is "passing" for FFOX, in a traditional user environment we'd expect it to fail.
Context:
Code Snippet
The bug
Chromium does not succeed in clicking the login button.
The position of elements inside a cross-origin iframe seem to be calculated without taking the offset of the iframe into account.
The offset of the iframe is set to top-left 300,300. Playwright tries to click 275.74, 37.18
Serving some other content from localhost inside the iframe in chromium does take the offset into account and works as expected.
(Firefox works fine. Have not tried webkit)
The text was updated successfully, but these errors were encountered: