From dc0725bb3be92d7824470dcdfa8d286902dea464 Mon Sep 17 00:00:00 2001 From: sourav-kundu <66624530+sourav-kundu@users.noreply.github.com> Date: Thu, 26 Aug 2021 19:32:04 +0530 Subject: [PATCH 1/5] update code snippet for accessing getSessionDetails executor --- sample_session_details_API.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sample_session_details_API.js b/sample_session_details_API.js index f5d8479..a5ae2f0 100644 --- a/sample_session_details_API.js +++ b/sample_session_details_API.js @@ -40,9 +40,8 @@ const clientPlaywrightVersion = cp.execSync('npx playwright --version').toString * You can use all these details after your test has completed, to fetch logs or use any other Automate REST APIs */ const resp = await JSON.parse(await page.evaluate(_ => {}, `browserstack_executor: ${JSON.stringify({action: 'getSessionDetails'})}`)); - const jsonObj = await JSON.parse(resp); - console.log(jsonObj.hashed_id); // This gives the session ID of the running session - console.log(jsonObj); // This prints the entire JSON response. You can use any/all of the response attributes the way you like. + console.log(resp.hashed_id); // This gives the session ID of the running session + console.log(resp); // This prints the entire JSON response. You can use any/all of the response attributes the way you like. await browser.close(); })(); From b1385605e8dda3301db57388577715baae01ef97 Mon Sep 17 00:00:00 2001 From: sourav-kundu <66624530+sourav-kundu@users.noreply.github.com> Date: Thu, 2 Sep 2021 11:54:06 +0530 Subject: [PATCH 2/5] update readme due to new version release --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 19b63a2..4360c97 100644 --- a/README.md +++ b/README.md @@ -71,10 +71,12 @@ BrowserStack Playwright tests in beta supports the following browsers across the ### Playwright versions supported -Currently, we are supporting 2 Playwright versions viz. `1.11.1` and `1.10.0`. -Playwright version can be specified using a capability as: `'browserstack.playwrightVersion': '1.10.0'`. If you do not specify a value for this capability then your tests would run on the default version `1.11.1`. +Currently, we are supporting 2 Playwright versions. +Playwright version can be specified using a capability for e.g.: `'browserstack.playwrightVersion': '1.12.3'`. If you do not specify a value for this capability then your tests would run on the latest version that is supported on the BrowserStack platform. -You can also pass the capability value as `'browserstack.playwrightVersion': '1.latest'` or `1.latest-1` to signify the 2 latest versions within the major version `1`. If you pass this capability, then you can be rest assured that whichever are the latest versions on BrowserStack, your tests would run on that without you needing to change your test code often. +We recommend you to pass the capability value as `'browserstack.playwrightVersion': '1.latest'` or `1.latest-1` to signify the 2 latest versions within the major version `1`. If you pass this capability, then you can be rest assured that whichever are the latest versions on BrowserStack, your tests would run on that without you needing to change your test code often. + +You can learn more about the significance of selecting a Playwright version on the browser version in our [documentation](https://www.browserstack.com/docs/automate/playwright/browsers-and-os). ## Get Playwright session details From fb647b234c52da42deaa65454150f79f22459fca Mon Sep 17 00:00:00 2001 From: sourav-kundu <66624530+sourav-kundu@users.noreply.github.com> Date: Mon, 20 Sep 2021 14:21:43 +0530 Subject: [PATCH 3/5] playwright version bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c9c524b..01c18b1 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "devDependencies": { "browserstack-local": "^1.4.8", "global-agent": "^3.0.0", - "playwright": "^1.11.1" + "playwright": "^1.12.3" }, "dependencies": { "chai": "^4.3.4" From 6063224631792bde8ea06a8cf54720d160dde0c9 Mon Sep 17 00:00:00 2001 From: sourav-kundu <66624530+sourav-kundu@users.noreply.github.com> Date: Mon, 18 Oct 2021 20:30:37 +0530 Subject: [PATCH 4/5] playwright v1.14.1 --- codeceptjs-example/package.json | 2 +- package.json | 2 +- playwright-jest/package.json | 2 +- playwright-test/package.json | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/codeceptjs-example/package.json b/codeceptjs-example/package.json index e26c79a..99c3d54 100644 --- a/codeceptjs-example/package.json +++ b/codeceptjs-example/package.json @@ -15,6 +15,6 @@ "@codeceptjs/examples": "^1.2.1", "@codeceptjs/ui": "^0.4.3", "codeceptjs": "^3.0.6", - "playwright": "~1.13.1" + "playwright": "~1.14.1" } } diff --git a/package.json b/package.json index 02abba9..3b3c1a9 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "devDependencies": { "browserstack-local": "^1.4.8", "global-agent": "^3.0.0", - "playwright": "~1.13.1" + "playwright": "~1.14.1" }, "engines": { "node": ">=12.7.0" diff --git a/playwright-jest/package.json b/playwright-jest/package.json index 3895cbe..570a2e0 100644 --- a/playwright-jest/package.json +++ b/playwright-jest/package.json @@ -11,6 +11,6 @@ "devDependencies": { "jest": "^27.0.3", "jest-playwright-preset": "^1.6.0", - "playwright": "~1.13.1" + "playwright": "~1.14.1" } } diff --git a/playwright-test/package.json b/playwright-test/package.json index 8115064..3cb0784 100644 --- a/playwright-test/package.json +++ b/playwright-test/package.json @@ -11,8 +11,8 @@ "test:local": "BROWSERSTACK_LOCAL=true npx playwright test --config=./playwright-local.config.js" }, "devDependencies": { - "playwright": "~1.13.1", - "@playwright/test": "~1.13.1", + "playwright": "~1.14.1", + "@playwright/test": "~1.14.1", "browserstack-local": "^1.4.8" } } From e3537b9204983216b254658815758bd8672d7376 Mon Sep 17 00:00:00 2001 From: sourav-kundu <66624530+sourav-kundu@users.noreply.github.com> Date: Mon, 18 Oct 2021 20:32:22 +0530 Subject: [PATCH 5/5] playwright v1.14.1 added in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index db2c2f8..9a659c5 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ BrowserStack Playwright tests in beta supports the following browsers across the ### Playwright versions supported Currently, we are supporting 2 Playwright versions. -Playwright version can be specified using a capability for e.g.: `'browserstack.playwrightVersion': '1.12.3'`. If you do not specify a value for this capability then your tests would run on the latest version that is supported on the BrowserStack platform. +Playwright version can be specified using a capability for e.g.: `'browserstack.playwrightVersion': '1.14.1'`. If you do not specify a value for this capability then your tests would run on the latest version that is supported on the BrowserStack platform. We recommend you to pass the capability value as `'browserstack.playwrightVersion': '1.latest'` or `1.latest-1` to signify the 2 latest versions within the major version `1`. If you pass this capability, then you can be rest assured that whichever are the latest versions on BrowserStack, your tests would run on that without you needing to change your test code often.