question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] browserType.connect(): Playwright version 1.27.0 not supported

See original GitHub issue

Context:

  • 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:closed
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
mxschmittcommented, Oct 12, 2022

LambdaTest is not affiliated with Playwright, I recommend reaching out to their support instead!

1reaction
zac11commented, Oct 13, 2022

This seems like an error from LambdaTest

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found