0

I have automation tests written in Playwright, I'm using CucumberJS with it and my tests are running on LambdaTest. Inside my code I want to print LambdaTest session ID that is generated for each scenario. How to do it? Tried already

let response = JSON.parse(await page.evaluate(() => {}, 'lambdatest_action: ${JSON.stringify({action: "getSessionDetails"})}'));

console.info('Test ID is ${response.data.session_id}');

and it was working fine for some time but now it doesn't (have no idea why). Do you have any other ideas?

Inchess
  • 1
  • 1
  • Turned out that instead of `getSessionDetails` I should use `getTestDetails`. This way it works, according to the doc on LambdaTest site: https://www.lambdatest.com/support/docs/playwright-test-execution-setup/#getting-session-details – Inchess Aug 03 '23 at 06:46

0 Answers0