ohos-playwright 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/fixture.mjs +4 -3
  2. package/package.json +1 -1
package/dist/fixture.mjs CHANGED
@@ -142,11 +142,12 @@ export const test = base.extend({
142
142
  finally {
143
143
  clearInterval(popupPoller);
144
144
  page.evaluate = savedEvaluate;
145
- // Close the tab we opened so the user's browser is left clean.
146
- // page.close() sends Target.closeTarget via CDP; non-fatal if it fails.
145
+ // Reset the test tab to about:blank so it's clean for the next test.
146
+ // page.close() sends Target.closeTarget which terminates the ArkWeb
147
+ // DevTools socket — use goto instead to keep the connection alive.
147
148
  if (info.openedNewTab) {
148
149
  try {
149
- await page.close();
150
+ await page.goto('about:blank');
150
151
  }
151
152
  catch { }
152
153
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ohos-playwright",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Playwright adapter for OpenHarmony / ArkWeb via hdc + CDP",
5
5
  "license": "MIT",
6
6
  "author": "social4hyq",