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

Firefox: browserClient.closeBrowserChildWindow is not a function #7285

Closed
florachen-okta opened this issue Sep 8, 2022 · 9 comments
Closed
Labels

Comments

@florachen-okta
Copy link

What is your Scenario?

I have multiple windows running and test with Firefox browser.

What is the Current behavior?

Testcafe throws

 Unhandled promise rejection:
      TypeError: browserClient.closeBrowserChildWindow is not a function

What is the Expected behavior?

The error shouldn't be thrown. This used to work on v1.18, and if switch to chrome the test is passed.

What is your public website URL? (or attach your complete example)

https://testcafe.io/

What is your TestCafe test code?

fixture `Microsoft DevBlogs Login page`
    .page('https://devblogs.microsoft.com/');

test('should pass', async (t) => {
await t
    .click('.login-but') 
    .click('.nsl-button-google') 
    .closeWindow();
});

Your complete configuration file

No response

Your complete test report


   1) Unhandled promise rejection:
      
      TypeError: browserClient.closeBrowserChildWindow is not a function

      Browser: Firefox 104.0 / macOS 10.15

Screenshots

No response

Steps to Reproduce

  1. Try the testcode
  2. Run tests with firefox browser.

TestCafe version

2.0.0

Node.js version

v16.15.1

Command-line arguments

testcafe firefox test.js

Browser name(s) and version(s)

No response

Platform(s) and version(s)

No response

Other

No response

@florachen-okta florachen-okta added the TYPE: bug The described behavior is considered as wrong (bug). label Sep 8, 2022
@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Sep 8, 2022
@miherlosev
Copy link
Collaborator

Hi @florachen-okta

Thank you for the shared information. I've reproduced the issue.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Sep 12, 2022
@gamlerhart
Copy link

Note: We have the same issue with the rule, but the error shows up in the first test using the role.

Like:

Role(...,async (t) => {
await operationsOpeningPopup().closeWindow()
})

Then the first test using this role fails with this error:

   1) - Error in Role initializer -
      Unhandled promise rejection:
      
      TypeError: browserClient.closeBrowserChildWindow is not a function
      at BrowserProviderPluginHost.closeBrowserChildWindow
      (/home/roman/dev/include-cloud/node_modules/testcafe/src/browser/provider/built-in/dedicated/base.js:108:30)
      at BrowserProvider.closeBrowserChildWindow
      (/home/roman/dev/include-cloud/node_modules/testcafe/src/browser/provider/index.ts:444:27)
      at _onCloseWindowRequest
      (/home/roman/dev/include-cloud/node_module

Follow up tests do work.

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Sep 30, 2022
@Aleksey28
Copy link
Collaborator

Hi @gamlerhart,

Thank you for sharing the example. The issue is reproduced in any part of a test.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Oct 3, 2022
@thomaswong79
Copy link

I'm running into the same issue as well. Turns out to be only happening on firefox, not chrome.

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Dec 5, 2022
@Aleksey28 Aleksey28 removed the STATE: Need response An issue that requires a response or attention from the team. label Dec 7, 2022
@amiablea2
Copy link

  • Fails for Chrome 102 as well:
  • testcafe: "2.1.0",
Unhandled promise rejection:
    TypeError: browserClient.closeBrowserChildWindow is not a function
   at BrowserProviderPluginHost.closeBrowserChildWindow (.../node_modules/testcafe/src/browser/provider/built-in/dedicated/base.js:108:30)

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Dec 13, 2022
@Aleksey28 Aleksey28 removed the STATE: Need response An issue that requires a response or attention from the team. label Dec 14, 2022
@exommlr
Copy link

exommlr commented Aug 15, 2023

@AlexKamaev is this something that has been introduced for #6037?

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Aug 15, 2023
@AlexKamaev
Copy link
Contributor

@exommlr
Yes, I've checked it. We changed the priority of this issue, so we will discuss it in the near future.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Aug 16, 2023
AlexKamaev added a commit to AlexKamaev/testcafe that referenced this issue Aug 16, 2023
@github-actions
Copy link

Release v3.3.0-rc.1 addresses this.

@exommlr
Copy link

exommlr commented Aug 23, 2023

@AlexKamaev thank you very much for fixing this!

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Aug 23, 2023
@AlexKamaev AlexKamaev removed the STATE: Need response An issue that requires a response or attention from the team. label Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants