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

Issue with self-closing popups on Firefox browser. #3173

Open
terckert opened this issue Oct 19, 2023 · 4 comments
Open

Issue with self-closing popups on Firefox browser. #3173

terckert opened this issue Oct 19, 2023 · 4 comments
Assignees
Labels
bug Something isn't working priority: medium upstream

Comments

@terckert
Copy link

Describe the bug
I believe this bug may be related to the following playwright tickets but am bringing it here to raise awareness or see if the issue rests with BrowserLibrary:
Issue I opened with Playwright: microsoft/playwright#27543
Issue my ticket was linked to: microsoft/playwright#26900

I have been running into issues writing tests that have to interact with elements that use the window.close() method in firefox. Initially I thought it was an issue with iframes, however, writing the test directly in playwright I noticed that it was failing on the click portion. I have reproduced a simplified version of the live site I'm testing. It can be found with the below links:
Website: https://terckert.github.io/pw-firefox-test/
Code: https://github.com/terckert/pw-firefox-test

It is only an issue with firefox browsers. The test was initially written in BrowserLibrary. After it kept failing, I rewrote it in straight playwright. Playwright fails on the click function, Browser Library fails to find the next object after clicking the button. As stated, I believe they're related, but since they fail at different points and produce different traces I figured it was best to log it here as well.

To Reproduce
Run the following test:

*** Settings ***Library    Browser*** Test Cases ***
Attempt To Access Iframes In Chrome
    Open Browser
    ...  https://terckert.github.io/pw-firefox-test/
    ...  chromium
    
    FOR  ${counter}  IN RANGE  0  4 
        Log  ${counter}
        ${og_prefix} =  Set Selector Prefix  \#iframe-id >>>  # Iframe accessor
        Click  \#iframe-button
        Set Selector Prefix  ${og_prefix}  # Remove iframe accessor
        ${og_browser} =  Switch Page  NEW
        Click  \#popup-button
        Switch Page  ${og_browser}
    ENDAttempt To Access Iframes In Firefox
    Open Browser
    ...  https://terckert.github.io/pw-firefox-test/
    ...  firefox
    
    FOR  ${counter}  IN RANGE  0  4 
        Log  ${counter}
        ${og_prefix} =  Set Selector Prefix  \#iframe-id >>>  # Iframe accessor
        Click  \#iframe-button
        Set Selector Prefix  ${og_prefix}  # Remove iframe accessor
        ${og_browser} =  Switch Page  NEW
        Click  \#popup-button
        Switch Page  ${og_browser}
    END

Expected behavior
I expect the chromium test to pass. The firefox test will fail trying to find the object #iframe-id >>> #iframe-button on the second loop.

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Firefox
@aaltat aaltat added bug Something isn't working priority: medium labels Oct 21, 2023
@aaltat
Copy link
Member

aaltat commented Oct 21, 2023

@allcontributors please add @terckert fir bugs

@allcontributors
Copy link
Contributor

@aaltat

I've put up a pull request to add @terckert! 🎉

@Snooz82
Copy link
Member

Snooz82 commented Nov 7, 2023

@aaltat Can you please check that?
I can not test Firefox on my Devices.

@aaltat
Copy link
Member

aaltat commented Nov 12, 2023

I can reproduce the issue. No idea what causes it, at least yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: medium upstream
Projects
None yet
Development

No branches or pull requests

3 participants