[BUG] browserType.connect(): Playwright version 1.27.0 not supported
See original GitHub issueContext:
- Playwright Version: 1.27.0
- Operating System: Mac
- Node.js version: 16.6
- Browser: remote browser with LambdaTest
- Extra: n/a
Code Snippet
const { chromium } = require('playwright');
const { expect } = require('@playwright/test');
(async () => {
const capabilities = {
'browserName': 'Chrome', // Browsers allowed: `Chrome`, `MicrosoftEdge`, `pw-chromium`, `pw-firefox` and `pw-webkit`
'browserVersion': 'latest',
'LT:Options': {
'platform': 'Windows 10',
'build': 'Playwright Sample Build',
'name': 'Playwright Sample Test',
'user': process.env.LT_USERNAME,
'accessKey': process.env.LT_ACCESS_KEY,
'network': true,
'video': true,
'console': true,
'tunnel': false, // Add tunnel configuration if testing locally hosted webpage
'tunnelName': '', // Optional
'geoLocation': '', // country code can be fetched from https://www.lambdatest.com/capabilities-generator/
}
}
const browser = await chromium.connect(`wss://cdp.lambdatest.com/playwright?capabilities=${encodeURIComponent(JSON.stringify(capabilities))}`);
const page = await browser.newPage();
await page.goto('https://www.bing.com');
const element = await page.$('[aria-label="Enter your search term"]');
await element.click();
await element.type('LambdaTest');
await element.press('Enter');
const title = await page.title();
try {
expect(title).toEqual('LambdaTest - Search');
// Mark the test as completed or failed
await page.evaluate(_ => {}, `lambdatest_action: ${JSON.stringify({ action: 'setTestStatus', arguments: { status: 'passed', remark: 'Title matched' } })}`);
} catch {
await page.evaluate(_ => {}, `lambdatest_action: ${JSON.stringify({ action: 'setTestStatus', arguments: { status: 'failed', remark: 'Title not matched' } })}`);
}
await browser.close();
})()
Describe the bug
I use the Playwright method browserType.connect(wsEndpoint[, options]) with wsEndpoing provided by LambdaTest. When running a test, Playwright throws the error: browserType.connect: Playwright version 1.27.0 not supported. Supported versions are 1.19.0 to 1.24.2.
Official documentation and VS Code extension don’t say anything that that function doesn’t support or what is the new method to connect to a remote browser
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
[BUG] v1.27.0 does not save results of json report #17953
Playwright Version : 1.27.0; Operating System: Windows 10, Ubuntu 22.04 Docker Image; Node.js version: LTS; Browser: All; Extra: this error ...
Read more >playwright Changelog - pyup.io
This patch release includes the following bug fixes: ... As announced in v1.25, Ubuntu 18 will not be supported as of Dec 2022....
Read more >Why does Playwright's generated Java code have invalid ...
The method getByRole requires an AriaRole as its first parameter, not a String. So it's easy to fix, but I think it's not...
Read more >playwright._impl._api_types.error: execution context was ...
I came into this issue today, and found that this problem occurs in this case: I was use page object loading a url...
Read more >playwright
The CDN for playwright. ... { _android: android } = require('playwright');\n\n(async () => {\n // Connect to the device. ... Not supported in...
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

LambdaTest is not affiliated with Playwright, I recommend reaching out to their support instead!
This seems like an error from LambdaTest