diff --git a/lambdatest-setup.js b/lambdatest-setup.js index cbdfdef..0499fce 100644 --- a/lambdatest-setup.js +++ b/lambdatest-setup.js @@ -36,28 +36,7 @@ exports.test = base.test.extend({ let fileName = testInfo.file.split(path.sep).pop() if (testInfo.project.name.match(/lambdatest/)) { modifyCapabilities(testInfo.project.name, `${testInfo.title} - ${fileName}`) - - const browser = await chromium.connect({ - wsEndpoint: `wss://cdp.lambdatest.com/playwright?capabilities=${encodeURIComponent(JSON.stringify(capabilities))}` - }) - - const ltPage = await browser.newPage(testInfo.project.use) - await use(ltPage) - - const testStatus = { - action: 'setTestStatus', - arguments: { - status: testInfo.status, - remark: getErrorMessage(testInfo, ['error', 'message']) - } - } - await ltPage.evaluate(() => {}, - `lambdatest_action: ${JSON.stringify(testStatus)}`) - await ltPage.close() - await browser.close() - } else { - // Run tests in local in case of local config provided await use(page) } } -}) +}) \ No newline at end of file diff --git a/playwright.config.js b/playwright.config.js index 71b76cd..dc522c4 100644 --- a/playwright.config.js +++ b/playwright.config.js @@ -13,6 +13,7 @@ const config = { { name: 'chrome:latest@lambdatest', use: { + connectOptions: {"wsEndpoint": "wss://cdp.lambdatest.com/playwright?capabilities=%7B%22browserName%22%3A%22chrome%22%2C%22browserVersion%22%3A%22latest%22%2C%22LT%3AOptions%22%3A%7B%22platform%22%3A%22linux%22%2C%22build%22%3A%22Playwright%20HyperExecute%20Build%22%2C%22name%22%3A%22Navigate%20PlayWright%20Documentation%20-%20test_3.spec.js%22%2C%22user%22%3A%22onpremezztt%22%2C%22accessKey%22%3A%22%22video%22%3Atrue%2C%22console%22%3Atrue%7D%7D"}, viewport: { width: 1280, height: 720 } } } diff --git a/yaml/linux/.hyperexecute_autosplits.yaml b/yaml/linux/.hyperexecute_autosplits.yaml index 0fd4464..28c8ee8 100644 --- a/yaml/linux/.hyperexecute_autosplits.yaml +++ b/yaml/linux/.hyperexecute_autosplits.yaml @@ -10,7 +10,6 @@ maxRetries: 1 concurrency: 2 pre: - npm install - - npx playwright install cacheKey: '{{ checksum "package-lock.json" }}' cacheDirectories: - node_modules @@ -20,4 +19,7 @@ testDiscovery: command: grep -nri 'describe' tests | sed 's/:test.*//' testRunnerCommand: npx playwright test $test +env: + PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 + jobLabel: [playwright-VanillaJS, linux, autosplit] \ No newline at end of file