Attempting to use -firefox with -chromium installed results in TypeError
See original GitHub issueI have just starting playing with jest + playwright and was trying to run multiple browser configurations when I ran into this issue.
The error I am getting is
FAIL browser: firefox tests/basic.test.ts
● Test suite failed to run
TypeError: Cannot read property 'launch' of undefined
at getBrowserPerProcess (node_modules/jest-playwright-preset/lib/PlaywrightEnvironment.js:24:41)
at PlaywrightEnvironment.setup (node_modules/jest-playwright-preset/lib/PlaywrightEnvironment.js:62:41)
FAIL browser: firefox tests/basic.test.js
● Test suite failed to run
TypeError: Cannot read property 'launch' of undefined
at getBrowserPerProcess (node_modules/jest-playwright-preset/lib/PlaywrightEnvironment.js:24:41)
at PlaywrightEnvironment.setup (node_modules/jest-playwright-preset/lib/PlaywrightEnvironment.js:62:41)
Test Suites: 2 failed, 2 total
Tests: 0 total
Snapshots: 0 total
Time: 0.339 s
Ran all test suites.
jest.config.js
module.exports = {
preset: 'jest-playwright-preset'
};
jest-playwright.config.js
module.exports = {
browsers: [
// "chromium",
"firefox"
]
};
basic.test.js
describe('basic test', () => {
it('should load google.com', async () => {
await page.goto('https://google.com/');
expect(await page.title()).toBe("Google");
});
it('should also load google.com', async () => {
await page.goto('https://google.com/');
expect(await page.title()).toBe("Google");
})
});
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Javascript Application error: TypeError: text is undefined
This issue can be caused by an extension that isn't working properly. Start Firefox in Diagnose Firefox issues using Troubleshoot Mode to check ......
Read more >Could not find expected browser chrome locally - Stack Overflow
Error: Could not find expected browser (chrome) locally. Run npm install to download the correct Chromium revision (884014). Tried "npm install" ...
Read more >[bug] "firefox" browser was not found. · Issue #477 - GitHub
playwright playwright==1.8.0a1 playwright install Run my script with firefox erro.. webkit and chrome still work "firefox" browser was not ...
Read more >Failed to assume control of Edge or Chrome or Firefox error
The Microsoft Edge, Google Chrome, or Firefox web extension isn't installed properly or enabled. Verifying issue for cause 1. Execution of a ...
Read more >Zoom Web SDK Firefox Crash on clicking "Join" button
Description Hello, I would like to integrate Zoom Web SDK into my website, and I was trying to figure out how it works...
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
Thats working! Thanks very much.
@narthollis sorry for late response. I just published 0.2.4, that should fix your issue. Thanks!