@serenity-js/playwright 3.31.17 → 3.32.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.
- package/CHANGELOG.md +28 -0
- package/README.md +8 -3
- package/lib/{PlaywrightOptions.d.ts → ExtraBrowserContextOptions.d.ts} +2 -3
- package/lib/ExtraBrowserContextOptions.d.ts.map +1 -0
- package/lib/{PlaywrightOptions.js → ExtraBrowserContextOptions.js} +1 -1
- package/lib/ExtraBrowserContextOptions.js.map +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/screenplay/abilities/BrowseTheWebWithPlaywright.d.ts +9 -9
- package/lib/screenplay/abilities/BrowseTheWebWithPlaywright.d.ts.map +1 -1
- package/lib/screenplay/abilities/BrowseTheWebWithPlaywright.js +10 -10
- package/lib/screenplay/abilities/BrowseTheWebWithPlaywright.js.map +1 -1
- package/lib/screenplay/models/PlaywrightBrowsingSession.d.ts +4 -4
- package/lib/screenplay/models/PlaywrightBrowsingSession.d.ts.map +1 -1
- package/lib/screenplay/models/PlaywrightBrowsingSession.js +9 -9
- package/lib/screenplay/models/PlaywrightBrowsingSession.js.map +1 -1
- package/lib/screenplay/models/PlaywrightBrowsingSessionWithBrowser.d.ts +4 -3
- package/lib/screenplay/models/PlaywrightBrowsingSessionWithBrowser.d.ts.map +1 -1
- package/lib/screenplay/models/PlaywrightBrowsingSessionWithBrowser.js +5 -3
- package/lib/screenplay/models/PlaywrightBrowsingSessionWithBrowser.js.map +1 -1
- package/lib/screenplay/models/PlaywrightBrowsingSessionWithPage.d.ts +3 -3
- package/lib/screenplay/models/PlaywrightBrowsingSessionWithPage.d.ts.map +1 -1
- package/lib/screenplay/models/PlaywrightBrowsingSessionWithPage.js +2 -2
- package/lib/screenplay/models/PlaywrightBrowsingSessionWithPage.js.map +1 -1
- package/lib/screenplay/models/PlaywrightPage.d.ts +2 -2
- package/lib/screenplay/models/PlaywrightPage.d.ts.map +1 -1
- package/lib/screenplay/models/PlaywrightPage.js.map +1 -1
- package/package.json +7 -7
- package/src/{PlaywrightOptions.ts → ExtraBrowserContextOptions.ts} +2 -4
- package/src/index.ts +1 -1
- package/src/screenplay/abilities/BrowseTheWebWithPlaywright.ts +11 -11
- package/src/screenplay/models/PlaywrightBrowsingSession.ts +9 -9
- package/src/screenplay/models/PlaywrightBrowsingSessionWithBrowser.ts +5 -4
- package/src/screenplay/models/PlaywrightBrowsingSessionWithPage.ts +4 -4
- package/src/screenplay/models/PlaywrightPage.ts +2 -2
- package/lib/PlaywrightOptions.d.ts.map +0 -1
- package/lib/PlaywrightOptions.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,34 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.32.1](https://github.com/serenity-js/serenity-js/compare/v3.32.0...v3.32.1) (2025-06-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **playwright-test:** added SerenityFixtures and SerenityWorkerFixtures to API docs ([887a7cf](https://github.com/serenity-js/serenity-js/commit/887a7cfb2d5505cd566cc26defdf6d1aaa145e40))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [3.32.0](https://github.com/serenity-js/serenity-js/compare/v3.31.17...v3.32.0) (2025-06-20)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **deps:** update playwright dependencies to v1.53.1 ([6ea14ce](https://github.com/serenity-js/serenity-js/commit/6ea14ce83f307ff8e3e2cd48d5a3f532efb123c3))
|
|
23
|
+
* **playwright:** marked all properties of ExtraBrowserContextOptions as optional ([3ee0145](https://github.com/serenity-js/serenity-js/commit/3ee0145890d0619cc0f4786b9addad429a41f278))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
* **playwright:** refactored SerenityFixtures, corrected BrowseTheWebWithPlaywright parameters ([9c62723](https://github.com/serenity-js/serenity-js/commit/9c627233bc93e38a8ae6e9ba531c31ba05ab707f))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
6
34
|
## [3.31.17](https://github.com/serenity-js/serenity-js/compare/v3.31.16...v3.31.17) (2025-06-16)
|
|
7
35
|
|
|
8
36
|
|
package/README.md
CHANGED
|
@@ -48,7 +48,7 @@ and review the [Serenity/JS Cucumber and Playwright Project Template](https://gi
|
|
|
48
48
|
```typescript
|
|
49
49
|
import { Ensure, equals } from '@serenity-js/assertions'
|
|
50
50
|
import { actorCalled, Actor, Cast, configure, Duration } from '@serenity-js/core'
|
|
51
|
-
import { BrowseTheWebWithPlaywright,
|
|
51
|
+
import { BrowseTheWebWithPlaywright, ExtraBrowserContextOptions } from '@serenity-js/playwright'
|
|
52
52
|
import { By, Navigate, PageElement, TakePhotosOfFailures, Text } from '@serenity-js/web'
|
|
53
53
|
|
|
54
54
|
import { describe, it, beforeAll, afterAll } from 'mocha'
|
|
@@ -65,13 +65,18 @@ class SerenityJSWebsite {
|
|
|
65
65
|
class Actors implements Cast {
|
|
66
66
|
constructor(
|
|
67
67
|
private readonly browser: playwright.Browser,
|
|
68
|
-
private readonly
|
|
68
|
+
private readonly contextOptions: playwright.BrowserContextOptions,
|
|
69
|
+
private readonly extraContextOptions: ExtraBrowserContextOptions,
|
|
69
70
|
) {
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
prepare(actor: Actor): Actor {
|
|
73
74
|
return actor.whoCan(
|
|
74
|
-
BrowseTheWebWithPlaywright.using(
|
|
75
|
+
BrowseTheWebWithPlaywright.using(
|
|
76
|
+
this.browser,
|
|
77
|
+
this.contextOptions,
|
|
78
|
+
this.extraContextOptions
|
|
79
|
+
),
|
|
75
80
|
// ... add other abilities as needed, like CallAnApi or TakeNotes
|
|
76
81
|
)
|
|
77
82
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type * as playwright from 'playwright-core';
|
|
2
1
|
/**
|
|
3
2
|
* Playwright-specific options used to configure the ability to [`BrowseTheWebWithPlaywright`](https://serenity-js.org/api/playwright/class/BrowseTheWebWithPlaywright/)
|
|
4
3
|
*
|
|
@@ -7,7 +6,7 @@ import type * as playwright from 'playwright-core';
|
|
|
7
6
|
*
|
|
8
7
|
* @group Configuration
|
|
9
8
|
*/
|
|
10
|
-
export interface
|
|
9
|
+
export interface ExtraBrowserContextOptions {
|
|
11
10
|
/**
|
|
12
11
|
* Changes the default maximum navigation time for the browser context used by [`BrowseTheWebWithPlaywright`](https://serenity-js.org/api/playwright/class/BrowseTheWebWithPlaywright/)
|
|
13
12
|
*
|
|
@@ -34,4 +33,4 @@ export interface PlaywrightOptions extends playwright.BrowserContextOptions {
|
|
|
34
33
|
*/
|
|
35
34
|
defaultTimeout?: number;
|
|
36
35
|
}
|
|
37
|
-
//# sourceMappingURL=
|
|
36
|
+
//# sourceMappingURL=ExtraBrowserContextOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExtraBrowserContextOptions.d.ts","sourceRoot":"","sources":["../src/ExtraBrowserContextOptions.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,0BAA0B;IAEvC;;;;;OAKG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAElC;;;;;;;;;OASG;IACH,0BAA0B,CAAC,EAAE,MAAM,GAAG,kBAAkB,GAAG,aAAa,GAAG,QAAQ,CAAC;IAEpF;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExtraBrowserContextOptions.js","sourceRoot":"","sources":["../src/ExtraBrowserContextOptions.ts"],"names":[],"mappings":""}
|
package/lib/index.d.ts
CHANGED
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./ExtraBrowserContextOptions"), exports);
|
|
18
18
|
__exportStar(require("./screenplay"), exports);
|
|
19
19
|
__exportStar(require("./selector-engines"), exports);
|
|
20
20
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C;AAC7C,+CAA6B;AAC7B,qDAAmC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Discardable } from '@serenity-js/core';
|
|
2
2
|
import { BrowseTheWeb } from '@serenity-js/web';
|
|
3
3
|
import * as playwright from 'playwright-core';
|
|
4
|
-
import type {
|
|
4
|
+
import type { ExtraBrowserContextOptions } from '../../ExtraBrowserContextOptions';
|
|
5
5
|
/**
|
|
6
6
|
* This implementation of the [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
7
7
|
* enables the [`Actor`](https://serenity-js.org/api/core/class/Actor/) to interact with web front-ends using [Playwright](https://playwright.dev/).
|
|
@@ -47,7 +47,7 @@ import type { PlaywrightOptions } from '../../PlaywrightOptions';
|
|
|
47
47
|
* Note that [Serenity/JS Playwright Test module](https://serenity-js.org/api/playwright-test/)
|
|
48
48
|
* automatically configures all your [actors](https://serenity-js.org/api/core/class/Actor/)
|
|
49
49
|
* with an ability to [`BrowseTheWebWithPlaywright`](https://serenity-js.org/api/playwright/class/BrowseTheWebWithPlaywright/),
|
|
50
|
-
* so you don't need to do it by hand unless you want to override the [default configuration](https://serenity-js.org/api/playwright-test/interface/
|
|
50
|
+
* so you don't need to do it by hand unless you want to override the [default configuration](https://serenity-js.org/api/playwright-test/interface/SerenityFixtures/).
|
|
51
51
|
*
|
|
52
52
|
* The example below demonstrates how to use the [`BrowseTheWebWithPlaywright.usingPage`](https://serenity-js.org/api/playwright/class/BrowseTheWebWithPlaywright/#usingPage) API and
|
|
53
53
|
* override the default [cast](https://serenity-js.org/api/core/class/Cast/) of actors.
|
|
@@ -94,7 +94,7 @@ import type { PlaywrightOptions } from '../../PlaywrightOptions';
|
|
|
94
94
|
*
|
|
95
95
|
* With other [test runners](https://serenity-js.org/handbook/test-runners/), you can configure Playwright by:
|
|
96
96
|
* - providing the browser-level configuration when calling [`BrowserType.launch`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch),
|
|
97
|
-
* - providing the browser context-level [`
|
|
97
|
+
* - providing the browser context-level [`ExtraBrowserContextOptions`](https://serenity-js.org/api/playwright/interface/ExtraBrowserContextOptions/)
|
|
98
98
|
* when initialising the ability to `BrowseTheWebWithPlaywright`.
|
|
99
99
|
*
|
|
100
100
|
* The code snippet below demonstrates how to configure the browser and some popular browser context options,
|
|
@@ -123,11 +123,9 @@ import type { PlaywrightOptions } from '../../PlaywrightOptions';
|
|
|
123
123
|
* viewport: { width: 1600, height: 1200 },
|
|
124
124
|
* geolocation: { longitude: 51.50084271042897, latitude: -0.12462540129500639 },
|
|
125
125
|
* permissions: [ 'geolocation' ],
|
|
126
|
-
*
|
|
126
|
+
* }, {
|
|
127
127
|
* defaultNavigationTimeout: 30_000,
|
|
128
128
|
* defaultTimeout: 10_000
|
|
129
|
-
*
|
|
130
|
-
* // ... and so on
|
|
131
129
|
* }))
|
|
132
130
|
* .attemptsTo(
|
|
133
131
|
* Navigate.to(`https://serenity-js.org`),
|
|
@@ -135,7 +133,9 @@ import type { PlaywrightOptions } from '../../PlaywrightOptions';
|
|
|
135
133
|
* )
|
|
136
134
|
* ```
|
|
137
135
|
*
|
|
138
|
-
* Note that in addition to all the standard Playwright BrowserContextOptions,
|
|
136
|
+
* Note that in addition to all the standard Playwright BrowserContextOptions,
|
|
137
|
+
* you can also provide several others defined in Serenity/JS [`ExtraBrowserContextOptions`](https://serenity-js.org/api/playwright/interface/ExtraBrowserContextOptions/),
|
|
138
|
+
* such as:
|
|
139
139
|
* - `defaultNavigationTimeout`, which changes the default maximum navigation timeout for the browser context,
|
|
140
140
|
* - `defaultTimeout`, which changes the default maximum time for all Playwright methods accepting the `timeout` option.
|
|
141
141
|
*
|
|
@@ -149,8 +149,8 @@ import type { PlaywrightOptions } from '../../PlaywrightOptions';
|
|
|
149
149
|
* @group Abilities
|
|
150
150
|
*/
|
|
151
151
|
export declare class BrowseTheWebWithPlaywright extends BrowseTheWeb<playwright.Locator> implements Discardable {
|
|
152
|
-
static using(browser: playwright.Browser,
|
|
153
|
-
static usingPage(page: playwright.Page,
|
|
152
|
+
static using(browser: playwright.Browser, browserContextOptions?: playwright.BrowserContextOptions, extraBrowserContextOptions?: ExtraBrowserContextOptions): BrowseTheWebWithPlaywright;
|
|
153
|
+
static usingPage(page: playwright.Page, extraBrowserContextOptions?: ExtraBrowserContextOptions): BrowseTheWebWithPlaywright;
|
|
154
154
|
/**
|
|
155
155
|
* Automatically closes any open [pages](https://serenity-js.org/api/web/class/Page/) when the [SceneFinishes](https://serenity-js.org/api/core-events/class/SceneFinishes/)
|
|
156
156
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrowseTheWebWithPlaywright.d.ts","sourceRoot":"","sources":["../../../src/screenplay/abilities/BrowseTheWebWithPlaywright.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAE9C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"BrowseTheWebWithPlaywright.d.ts","sourceRoot":"","sources":["../../../src/screenplay/abilities/BrowseTheWebWithPlaywright.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAE9C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAMnF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiJG;AACH,qBAAa,0BAA2B,SAAQ,YAAY,CAAC,UAAU,CAAC,OAAO,CAAE,YAAW,WAAW;IAEnG,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,EAAE,qBAAqB,CAAC,EAAE,UAAU,CAAC,qBAAqB,EAAE,0BAA0B,CAAC,EAAE,0BAA0B,GAAG,0BAA0B;IAIxL,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,0BAA0B,CAAC,EAAE,0BAA0B,GAAG,0BAA0B;IAI5H;;;;;;OAMG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAGjC"}
|
|
@@ -82,7 +82,7 @@ const models_1 = require("../models");
|
|
|
82
82
|
* Note that [Serenity/JS Playwright Test module](https://serenity-js.org/api/playwright-test/)
|
|
83
83
|
* automatically configures all your [actors](https://serenity-js.org/api/core/class/Actor/)
|
|
84
84
|
* with an ability to [`BrowseTheWebWithPlaywright`](https://serenity-js.org/api/playwright/class/BrowseTheWebWithPlaywright/),
|
|
85
|
-
* so you don't need to do it by hand unless you want to override the [default configuration](https://serenity-js.org/api/playwright-test/interface/
|
|
85
|
+
* so you don't need to do it by hand unless you want to override the [default configuration](https://serenity-js.org/api/playwright-test/interface/SerenityFixtures/).
|
|
86
86
|
*
|
|
87
87
|
* The example below demonstrates how to use the [`BrowseTheWebWithPlaywright.usingPage`](https://serenity-js.org/api/playwright/class/BrowseTheWebWithPlaywright/#usingPage) API and
|
|
88
88
|
* override the default [cast](https://serenity-js.org/api/core/class/Cast/) of actors.
|
|
@@ -129,7 +129,7 @@ const models_1 = require("../models");
|
|
|
129
129
|
*
|
|
130
130
|
* With other [test runners](https://serenity-js.org/handbook/test-runners/), you can configure Playwright by:
|
|
131
131
|
* - providing the browser-level configuration when calling [`BrowserType.launch`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch),
|
|
132
|
-
* - providing the browser context-level [`
|
|
132
|
+
* - providing the browser context-level [`ExtraBrowserContextOptions`](https://serenity-js.org/api/playwright/interface/ExtraBrowserContextOptions/)
|
|
133
133
|
* when initialising the ability to `BrowseTheWebWithPlaywright`.
|
|
134
134
|
*
|
|
135
135
|
* The code snippet below demonstrates how to configure the browser and some popular browser context options,
|
|
@@ -158,11 +158,9 @@ const models_1 = require("../models");
|
|
|
158
158
|
* viewport: { width: 1600, height: 1200 },
|
|
159
159
|
* geolocation: { longitude: 51.50084271042897, latitude: -0.12462540129500639 },
|
|
160
160
|
* permissions: [ 'geolocation' ],
|
|
161
|
-
*
|
|
161
|
+
* }, {
|
|
162
162
|
* defaultNavigationTimeout: 30_000,
|
|
163
163
|
* defaultTimeout: 10_000
|
|
164
|
-
*
|
|
165
|
-
* // ... and so on
|
|
166
164
|
* }))
|
|
167
165
|
* .attemptsTo(
|
|
168
166
|
* Navigate.to(`https://serenity-js.org`),
|
|
@@ -170,7 +168,9 @@ const models_1 = require("../models");
|
|
|
170
168
|
* )
|
|
171
169
|
* ```
|
|
172
170
|
*
|
|
173
|
-
* Note that in addition to all the standard Playwright BrowserContextOptions,
|
|
171
|
+
* Note that in addition to all the standard Playwright BrowserContextOptions,
|
|
172
|
+
* you can also provide several others defined in Serenity/JS [`ExtraBrowserContextOptions`](https://serenity-js.org/api/playwright/interface/ExtraBrowserContextOptions/),
|
|
173
|
+
* such as:
|
|
174
174
|
* - `defaultNavigationTimeout`, which changes the default maximum navigation timeout for the browser context,
|
|
175
175
|
* - `defaultTimeout`, which changes the default maximum time for all Playwright methods accepting the `timeout` option.
|
|
176
176
|
*
|
|
@@ -184,11 +184,11 @@ const models_1 = require("../models");
|
|
|
184
184
|
* @group Abilities
|
|
185
185
|
*/
|
|
186
186
|
class BrowseTheWebWithPlaywright extends web_1.BrowseTheWeb {
|
|
187
|
-
static using(browser,
|
|
188
|
-
return new BrowseTheWebWithPlaywright(new models_1.PlaywrightBrowsingSessionWithBrowser(browser,
|
|
187
|
+
static using(browser, browserContextOptions, extraBrowserContextOptions) {
|
|
188
|
+
return new BrowseTheWebWithPlaywright(new models_1.PlaywrightBrowsingSessionWithBrowser(browser, browserContextOptions, extraBrowserContextOptions, playwright.selectors));
|
|
189
189
|
}
|
|
190
|
-
static usingPage(page,
|
|
191
|
-
return new BrowseTheWebWithPlaywright(new models_1.PlaywrightBrowsingSessionWithPage(page,
|
|
190
|
+
static usingPage(page, extraBrowserContextOptions) {
|
|
191
|
+
return new BrowseTheWebWithPlaywright(new models_1.PlaywrightBrowsingSessionWithPage(page, extraBrowserContextOptions, playwright.selectors));
|
|
192
192
|
}
|
|
193
193
|
/**
|
|
194
194
|
* Automatically closes any open [pages](https://serenity-js.org/api/web/class/Page/) when the [SceneFinishes](https://serenity-js.org/api/core-events/class/SceneFinishes/)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrowseTheWebWithPlaywright.js","sourceRoot":"","sources":["../../../src/screenplay/abilities/BrowseTheWebWithPlaywright.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,0CAAgD;AAChD,4DAA8C;AAG9C,sCAGmB;AAEnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiJG;AACH,MAAa,0BAA2B,SAAQ,kBAAgC;IAE5E,MAAM,CAAC,KAAK,CAAC,OAA2B,EAAE,
|
|
1
|
+
{"version":3,"file":"BrowseTheWebWithPlaywright.js","sourceRoot":"","sources":["../../../src/screenplay/abilities/BrowseTheWebWithPlaywright.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,0CAAgD;AAChD,4DAA8C;AAG9C,sCAGmB;AAEnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiJG;AACH,MAAa,0BAA2B,SAAQ,kBAAgC;IAE5E,MAAM,CAAC,KAAK,CAAC,OAA2B,EAAE,qBAAwD,EAAE,0BAAuD;QACvJ,OAAO,IAAI,0BAA0B,CAAC,IAAI,6CAAoC,CAAC,OAAO,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;IACtK,CAAC;IAED,MAAM,CAAC,SAAS,CAAC,IAAqB,EAAE,0BAAuD;QAC3F,OAAO,IAAI,0BAA0B,CAAC,IAAI,0CAAiC,CAAC,IAAI,EAAE,0BAA0B,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;IACzI,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,OAAO;QACT,MAAM,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;IACvC,CAAC;CACJ;AApBD,gEAoBC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BrowserCapabilities } from '@serenity-js/web';
|
|
2
2
|
import { BrowsingSession, type Cookie, type CookieData } from '@serenity-js/web';
|
|
3
3
|
import type * as playwright from 'playwright-core';
|
|
4
|
-
import { type
|
|
4
|
+
import { type ExtraBrowserContextOptions } from '../../ExtraBrowserContextOptions';
|
|
5
5
|
import { SerenitySelectorEngines } from '../../selector-engines';
|
|
6
6
|
import { PlaywrightPage } from '../models';
|
|
7
7
|
/**
|
|
@@ -10,11 +10,11 @@ import { PlaywrightPage } from '../models';
|
|
|
10
10
|
* @group Models
|
|
11
11
|
*/
|
|
12
12
|
export declare abstract class PlaywrightBrowsingSession extends BrowsingSession<PlaywrightPage> {
|
|
13
|
-
protected readonly
|
|
13
|
+
protected readonly extraBrowserContextOptions: Partial<ExtraBrowserContextOptions>;
|
|
14
14
|
protected readonly selectors: playwright.Selectors;
|
|
15
15
|
protected readonly serenitySelectorEngines: SerenitySelectorEngines;
|
|
16
16
|
private currentPlaywrightBrowserContext;
|
|
17
|
-
protected constructor(
|
|
17
|
+
protected constructor(extraBrowserContextOptions: Partial<ExtraBrowserContextOptions>, selectors: playwright.Selectors);
|
|
18
18
|
/**
|
|
19
19
|
* Returns [basic meta-data](https://serenity-js.org/api/web/interface/BrowserCapabilities/) about the browser associated with this ability.
|
|
20
20
|
*
|
|
@@ -27,6 +27,6 @@ export declare abstract class PlaywrightBrowsingSession extends BrowsingSession<
|
|
|
27
27
|
setCookie(cookie: CookieData): Promise<void>;
|
|
28
28
|
deleteAllCookies(): Promise<void>;
|
|
29
29
|
protected browserContext(): Promise<playwright.BrowserContext>;
|
|
30
|
-
protected abstract createBrowserContext(
|
|
30
|
+
protected abstract createBrowserContext(): Promise<playwright.BrowserContext>;
|
|
31
31
|
}
|
|
32
32
|
//# sourceMappingURL=PlaywrightBrowsingSession.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlaywrightBrowsingSession.d.ts","sourceRoot":"","sources":["../../../src/screenplay/models/PlaywrightBrowsingSession.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,KAAK,MAAM,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACjF,OAAO,KAAK,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"PlaywrightBrowsingSession.d.ts","sourceRoot":"","sources":["../../../src/screenplay/models/PlaywrightBrowsingSession.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,KAAK,MAAM,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACjF,OAAO,KAAK,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAoB,cAAc,EAAE,MAAM,WAAW,CAAC;AAE7D;;;;GAIG;AACH,8BAAsB,yBAA0B,SAAQ,eAAe,CAAC,cAAc,CAAC;IAM/E,SAAS,CAAC,QAAQ,CAAC,0BAA0B,EAAE,OAAO,CAAC,0BAA0B,CAAC;IAClF,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC,SAAS;IALtD,SAAS,CAAC,QAAQ,CAAC,uBAAuB,0BAAiC;IAC3E,OAAO,CAAC,+BAA+B,CAA4B;IAEnE,SAAS,aACc,0BAA0B,EAAE,OAAO,CAAC,0BAA0B,CAAC,EAC/D,SAAS,EAAE,UAAU,CAAC,SAAS;IAKtD;;;;;;OAMG;aACa,mBAAmB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAE7D,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAKrC,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAM5C,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;cAKvB,cAAc,IAAI,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC;IAuBpE,SAAS,CAAC,QAAQ,CAAC,oBAAoB,IAAI,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC;CAChF"}
|
|
@@ -11,13 +11,13 @@ const models_1 = require("../models");
|
|
|
11
11
|
* @group Models
|
|
12
12
|
*/
|
|
13
13
|
class PlaywrightBrowsingSession extends web_1.BrowsingSession {
|
|
14
|
-
|
|
14
|
+
extraBrowserContextOptions;
|
|
15
15
|
selectors;
|
|
16
16
|
serenitySelectorEngines = new selector_engines_1.SerenitySelectorEngines();
|
|
17
17
|
currentPlaywrightBrowserContext;
|
|
18
|
-
constructor(
|
|
18
|
+
constructor(extraBrowserContextOptions, selectors) {
|
|
19
19
|
super();
|
|
20
|
-
this.
|
|
20
|
+
this.extraBrowserContextOptions = extraBrowserContextOptions;
|
|
21
21
|
this.selectors = selectors;
|
|
22
22
|
}
|
|
23
23
|
async cookie(name) {
|
|
@@ -35,15 +35,15 @@ class PlaywrightBrowsingSession extends web_1.BrowsingSession {
|
|
|
35
35
|
async browserContext() {
|
|
36
36
|
if (!this.currentPlaywrightBrowserContext) {
|
|
37
37
|
await this.serenitySelectorEngines.ensureRegisteredWith(this.selectors);
|
|
38
|
-
this.currentPlaywrightBrowserContext = await this.createBrowserContext(
|
|
38
|
+
this.currentPlaywrightBrowserContext = await this.createBrowserContext();
|
|
39
39
|
this.currentPlaywrightBrowserContext.on('page', async (page) => {
|
|
40
|
-
this.register(new models_1.PlaywrightPage(this, page, this.
|
|
40
|
+
this.register(new models_1.PlaywrightPage(this, page, this.extraBrowserContextOptions, model_1.CorrelationId.create()));
|
|
41
41
|
});
|
|
42
|
-
if (this.
|
|
43
|
-
this.currentPlaywrightBrowserContext.setDefaultNavigationTimeout(this.
|
|
42
|
+
if (this.extraBrowserContextOptions?.defaultNavigationTimeout) {
|
|
43
|
+
this.currentPlaywrightBrowserContext.setDefaultNavigationTimeout(this.extraBrowserContextOptions?.defaultNavigationTimeout);
|
|
44
44
|
}
|
|
45
|
-
if (this.
|
|
46
|
-
this.currentPlaywrightBrowserContext.setDefaultTimeout(this.
|
|
45
|
+
if (this.extraBrowserContextOptions?.defaultTimeout) {
|
|
46
|
+
this.currentPlaywrightBrowserContext.setDefaultTimeout(this.extraBrowserContextOptions?.defaultTimeout);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
return this.currentPlaywrightBrowserContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlaywrightBrowsingSession.js","sourceRoot":"","sources":["../../../src/screenplay/models/PlaywrightBrowsingSession.ts"],"names":[],"mappings":";;;AAAA,uDAA4D;AAE5D,0CAAiF;AAIjF,6DAAiE;AACjE,sCAA6D;AAE7D;;;;GAIG;AACH,MAAsB,yBAA0B,SAAQ,qBAA+B;IAM5D;IACA;IALJ,uBAAuB,GAAG,IAAI,0CAAuB,EAAE,CAAC;IACnE,+BAA+B,CAA4B;IAEnE,YACuB,
|
|
1
|
+
{"version":3,"file":"PlaywrightBrowsingSession.js","sourceRoot":"","sources":["../../../src/screenplay/models/Pl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AI,EAAE,IAAI,EAAE,IAAI,CAAC,0BAA0B,EAAE,qBAAa,CAAC,MAAM,EAAE,CAAC,CAC1F,CAAC;YACN,CAAC,CAAC,CAAC;YAEH,IAAI,IAAI,CAAC,0BAA0B,EAAE,wBAAwB,EAAE,CAAC;gBAC5D,IAAI,CAAC,+BAA+B,CAAC,2BAA2B,CAAC,IAAI,CAAC,0BAA0B,EAAE,wBAAwB,CAAC,CAAC;YAChI,CAAC;YAED,IAAI,IAAI,CAAC,0BAA0B,EAAE,cAAc,EAAE,CAAC;gBAClD,IAAI,CAAC,+BAA+B,CAAC,iBAAiB,CAAC,IAAI,CAAC,0BAA0B,EAAE,cAAc,CAAC,CAAC;YAC5G,CAAC;QACL,CAAC;QAED,OAAO,IAAI,CAAC,+BAA+B,CAAC;IAChD,CAAC;CAGJ;AA7DD,8DA6DC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BrowserCapabilities } from '@serenity-js/web';
|
|
2
2
|
import type * as playwright from 'playwright-core';
|
|
3
|
-
import type {
|
|
3
|
+
import type { ExtraBrowserContextOptions } from '../../ExtraBrowserContextOptions';
|
|
4
4
|
import { PlaywrightBrowsingSession } from './PlaywrightBrowsingSession';
|
|
5
5
|
import type { PlaywrightPage } from './PlaywrightPage';
|
|
6
6
|
/**
|
|
@@ -8,8 +8,9 @@ import type { PlaywrightPage } from './PlaywrightPage';
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class PlaywrightBrowsingSessionWithBrowser extends PlaywrightBrowsingSession {
|
|
10
10
|
protected readonly browser: playwright.Browser;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
protected readonly browserContextOptions: playwright.BrowserContextOptions;
|
|
12
|
+
constructor(browser: playwright.Browser, browserContextOptions: playwright.BrowserContextOptions, extraBrowserContextOptions: ExtraBrowserContextOptions, selectors: playwright.Selectors);
|
|
13
|
+
protected createBrowserContext(): Promise<playwright.BrowserContext>;
|
|
13
14
|
protected registerCurrentPage(): Promise<PlaywrightPage>;
|
|
14
15
|
closeAllPages(): Promise<void>;
|
|
15
16
|
browserCapabilities(): Promise<BrowserCapabilities>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlaywrightBrowsingSessionWithBrowser.d.ts","sourceRoot":"","sources":["../../../src/screenplay/models/PlaywrightBrowsingSessionWithBrowser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAEnD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"PlaywrightBrowsingSessionWithBrowser.d.ts","sourceRoot":"","sources":["../../../src/screenplay/models/PlaywrightBrowsingSessionWithBrowser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAEnD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;GAEG;AACH,qBAAa,oCAAqC,SAAQ,yBAAyB;IAG3E,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO;IAC9C,SAAS,CAAC,QAAQ,CAAC,qBAAqB,EAAE,UAAU,CAAC,qBAAqB;gBADvD,OAAO,EAAE,UAAU,CAAC,OAAO,EAC3B,qBAAqB,EAAE,UAAU,CAAC,qBAAqB,EAC1E,0BAA0B,EAAE,0BAA0B,EACtD,SAAS,EAAE,UAAU,CAAC,SAAS;cAKV,oBAAoB,IAAI,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC;cAI1D,mBAAmB,IAAI,OAAO,CAAC,cAAc,CAAC;IAcxD,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAO9B,mBAAmB,IAAI,OAAO,CAAC,mBAAmB,CAAC;CAOrE"}
|
|
@@ -7,11 +7,13 @@ const PlaywrightBrowsingSession_1 = require("./PlaywrightBrowsingSession");
|
|
|
7
7
|
*/
|
|
8
8
|
class PlaywrightBrowsingSessionWithBrowser extends PlaywrightBrowsingSession_1.PlaywrightBrowsingSession {
|
|
9
9
|
browser;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
browserContextOptions;
|
|
11
|
+
constructor(browser, browserContextOptions, extraBrowserContextOptions, selectors) {
|
|
12
|
+
super(extraBrowserContextOptions, selectors);
|
|
12
13
|
this.browser = browser;
|
|
14
|
+
this.browserContextOptions = browserContextOptions;
|
|
13
15
|
}
|
|
14
|
-
async createBrowserContext(
|
|
16
|
+
async createBrowserContext() {
|
|
15
17
|
return this.browser.newContext(this.browserContextOptions);
|
|
16
18
|
}
|
|
17
19
|
async registerCurrentPage() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlaywrightBrowsingSessionWithBrowser.js","sourceRoot":"","sources":["../../../src/screenplay/models/PlaywrightBrowsingSessionWithBrowser.ts"],"names":[],"mappings":";;;AAIA,2EAAwE;AAGxE;;GAEG;AACH,MAAa,oCAAqC,SAAQ,qDAAyB;IAGxD;
|
|
1
|
+
{"version":3,"file":"PlaywrightBrowsingSessionWithBrowser.js","sourceRoot":"","sources":["../../../src/screenplay/models/PlaywrightBrowsingSessionWithBrowser.ts"],"names":[],"mappings":";;;AAIA,2EAAwE;AAGxE;;GAEG;AACH,MAAa,oCAAqC,SAAQ,qDAAyB;IAGxD;IACA;IAFvB,YACuB,OAA2B,EAC3B,qBAAuD,EAC1E,0BAAsD,EACtD,SAA+B;QAE/B,KAAK,CAAC,0BAA0B,EAAE,SAAS,CAAC,CAAC;QAL1B,YAAO,GAAP,OAAO,CAAoB;QAC3B,0BAAqB,GAArB,qBAAqB,CAAkC;IAK9E,CAAC;IAEkB,KAAK,CAAC,oBAAoB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;IAC/D,CAAC;IAEkB,KAAK,CAAC,mBAAmB;QACxC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAE5C,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;QAExB,iFAAiF;QACjF,iFAAiF;QACjF,8BAA8B;QAE9B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAA;QAEtC,OAAO,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAEQ,KAAK,CAAC,aAAa;QACxB,MAAM,KAAK,CAAC,aAAa,EAAE,CAAC;QAE5B,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC5C,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;IAC1B,CAAC;IAEQ,KAAK,CAAC,mBAAmB;QAC9B,OAAO;YACH,WAAW,EAAG,IAAI,CAAC,OAAe,CAAC,YAAY,CAAC,IAAI,EAAI,4DAA4D;YACpH,YAAY,EAAE,OAAO,CAAC,QAAQ,EAA0B,gDAAgD;YACxG,cAAc,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;SACzC,CAAA;IACL,CAAC;CACJ;AA3CD,oFA2CC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BrowserCapabilities } from '@serenity-js/web';
|
|
2
2
|
import type * as playwright from 'playwright-core';
|
|
3
|
-
import type {
|
|
3
|
+
import type { ExtraBrowserContextOptions } from '../../ExtraBrowserContextOptions';
|
|
4
4
|
import { PlaywrightBrowsingSession } from './PlaywrightBrowsingSession';
|
|
5
5
|
import { PlaywrightPage } from './PlaywrightPage';
|
|
6
6
|
/**
|
|
@@ -9,9 +9,9 @@ import { PlaywrightPage } from './PlaywrightPage';
|
|
|
9
9
|
export declare class PlaywrightBrowsingSessionWithPage extends PlaywrightBrowsingSession {
|
|
10
10
|
protected readonly page: playwright.Page;
|
|
11
11
|
private readonly playwrightManagedPageId;
|
|
12
|
-
constructor(page: playwright.Page, browserContextOptions:
|
|
12
|
+
constructor(page: playwright.Page, browserContextOptions: ExtraBrowserContextOptions, selectors: playwright.Selectors);
|
|
13
13
|
protected registerCurrentPage(): Promise<PlaywrightPage>;
|
|
14
|
-
protected createBrowserContext(
|
|
14
|
+
protected createBrowserContext(): Promise<playwright.BrowserContext>;
|
|
15
15
|
/**
|
|
16
16
|
* Closes any newly opened pages, leaving only the original one managed by Playwright Test.
|
|
17
17
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlaywrightBrowsingSessionWithPage.d.ts","sourceRoot":"","sources":["../../../src/screenplay/models/PlaywrightBrowsingSessionWithPage.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAEnD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"PlaywrightBrowsingSessionWithPage.d.ts","sourceRoot":"","sources":["../../../src/screenplay/models/PlaywrightBrowsingSessionWithPage.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAEnD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;GAEG;AACH,qBAAa,iCAAkC,SAAQ,yBAAyB;IAIxE,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI;IAH5C,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAyC;gBAG1D,IAAI,EAAE,UAAU,CAAC,IAAI,EACxC,qBAAqB,EAAE,0BAA0B,EACjD,SAAS,EAAE,UAAU,CAAC,SAAS;cAKV,mBAAmB,IAAI,OAAO,CAAC,cAAc,CAAC;cAU9C,oBAAoB,IAAI,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC;IAInF;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAWrB,mBAAmB,IAAI,OAAO,CAAC,mBAAmB,CAAC;CAQrE"}
|
|
@@ -16,11 +16,11 @@ class PlaywrightBrowsingSessionWithPage extends PlaywrightBrowsingSession_1.Play
|
|
|
16
16
|
}
|
|
17
17
|
async registerCurrentPage() {
|
|
18
18
|
await this.browserContext();
|
|
19
|
-
const playwrightPage = new PlaywrightPage_1.PlaywrightPage(this, this.page, this.
|
|
19
|
+
const playwrightPage = new PlaywrightPage_1.PlaywrightPage(this, this.page, this.extraBrowserContextOptions, this.playwrightManagedPageId);
|
|
20
20
|
this.register(playwrightPage);
|
|
21
21
|
return playwrightPage;
|
|
22
22
|
}
|
|
23
|
-
async createBrowserContext(
|
|
23
|
+
async createBrowserContext() {
|
|
24
24
|
return this.page.context();
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlaywrightBrowsingSessionWithPage.js","sourceRoot":"","sources":["../../../src/screenplay/models/PlaywrightBrowsingSessionWithPage.ts"],"names":[],"mappings":";;;AAAA,uDAA4D;AAK5D,2EAAwE;AACxE,qDAAkD;AAElD;;GAEG;AACH,MAAa,iCAAkC,SAAQ,qDAAyB;IAIrD;IAHN,uBAAuB,GAAkB,qBAAa,CAAC,MAAM,EAAE,CAAC;IAEjF,YACuB,IAAqB,EACxC,
|
|
1
|
+
{"version":3,"file":"PlaywrightBrowsingSessionWithPage.js","sourceRoot":"","sources":["../../../src/screenplay/models/PlaywrightBrowsingSessionWithPage.ts"],"names":[],"mappings":";;;AAAA,uDAA4D;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4DAA4D;YAC/G,YAAY,EAAE,OAAO,CAAC,QAAQ,EAAqB,gDAAgD;YACnG,cAAc,EAAE,OAAO,CAAC,OAAO,EAAE;SACpC,CAAA;IACL,CAAC;CACJ;AA/CD,8EA+CC"}
|
|
@@ -4,7 +4,7 @@ import type { Cookie, CookieData, PageElements, Selector } from '@serenity-js/we
|
|
|
4
4
|
import { Key, Page, PageElement } from '@serenity-js/web';
|
|
5
5
|
import type * as playwright from 'playwright-core';
|
|
6
6
|
import { URL } from 'url';
|
|
7
|
-
import type {
|
|
7
|
+
import type { ExtraBrowserContextOptions } from '../../ExtraBrowserContextOptions';
|
|
8
8
|
import type { PlaywrightBrowsingSession } from './PlaywrightBrowsingSession';
|
|
9
9
|
/**
|
|
10
10
|
* Playwright-specific implementation of [`Page`](https://serenity-js.org/api/web/class/Page/).
|
|
@@ -17,7 +17,7 @@ export declare class PlaywrightPage extends Page<playwright.Locator> {
|
|
|
17
17
|
private lastScriptExecutionSummary;
|
|
18
18
|
private dehydrator;
|
|
19
19
|
static current(): QuestionAdapter<PlaywrightPage>;
|
|
20
|
-
constructor(session: PlaywrightBrowsingSession, page: playwright.Page, options:
|
|
20
|
+
constructor(session: PlaywrightBrowsingSession, page: playwright.Page, options: Partial<Pick<ExtraBrowserContextOptions, 'defaultNavigationWaitUntil'>>, pageId: CorrelationId);
|
|
21
21
|
createPageElement(nativeElement: playwright.Locator): PageElement<playwright.Locator>;
|
|
22
22
|
locate(selector: Selector): PageElement<playwright.Locator>;
|
|
23
23
|
locateAll(selector: Selector): PageElements<playwright.Locator>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlaywrightPage.d.ts","sourceRoot":"","sources":["../../../src/screenplay/models/PlaywrightPage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAA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,EAAE,IAAqC,EAAE,EAAE;QAC5C,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;QACjD,OAAO,aAAa,CAAC,aAAa,EAAE,CAAC;IACzC,CAAC,CACJ,CAAC;IACF,mBAAmB;IAEnB,MAAM,CAAU,OAAO;QACnB,OAAO,KAAK,CAAC,OAAO,EAAqC,CAAC;IAC9D,CAAC;IAED,YACI,OAAkC,EACjB,IAAqB,EACrB,
|
|
1
|
+
{"version":3,"file":"PlaywrightPage.js","sourceRoot":"","sources":["../../../src/screenplay/models/PlaywrightPage.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA2E;AAG3E,0CAAwI;AACxI,sEAAwD;AAExD,6BAA0B;AAG1B,0CAAuC;AACvC,yCAAwG;AAExG,iFAA8E;AAC9E,mEAAgE;AAEhE;;;;GAIG;AACH,MAAa,cAAe,SAAQ,UAAwB;IAoBnC;IACA;IAnBb,0BAA0B,CAA6B;IAE/D,wDAAwD;IAChD,UAAU,GAAkF,IAAI,wBAAkB,CACtH,CAAC,IAAS,EAA2C,EAAE,CAAC,IAAI,YAAY,iBAAW,EACnF,KAAK,EAAE,IAAqC,EAAE,EAAE;QAC5C,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;QACjD,OAAO,aAAa,CAAC,aAAa,EAAE,CAAC;IACzC,CAAC,CACJ,CAAC;IACF,mBAAmB;IAEnB,MAAM,CAAU,OAAO;QACnB,OAAO,KAAK,CAAC,OAAO,EAAqC,CAAC;IAC9D,CAAC;IAED,YACI,OAAkC,EACjB,IAAqB,EACrB,OAAgF,EACjG,MAAqB;QAErB,KAAK,CACD,OAAO,EACP,IAAI,gCAAqB,CAAC,IAAI,CAAC,EAC/B,IAAI,2DAA4B,CAAC,IAAI,CAAC,EACtC,MAAM,CACT,CAAC;QATe,SAAI,GAAJ,IAAI,CAAiB;QACrB,YAAO,GAAP,OAAO,CAA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1
|
{
|
|
2
2
|
"name": "@serenity-js/playwright",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.32.1",
|
|
4
4
|
"description": "Adapter that integrates @serenity-js/web with Playwright, enabling Serenity/JS reporting and using the Screenplay Pattern to write component and end-to-end test scenarios",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jan Molak",
|
|
@@ -57,23 +57,23 @@
|
|
|
57
57
|
"node": "^18.12 || ^20 || ^22"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@serenity-js/core": "3.
|
|
61
|
-
"@serenity-js/web": "3.
|
|
60
|
+
"@serenity-js/core": "3.32.1",
|
|
61
|
+
"@serenity-js/web": "3.32.1",
|
|
62
62
|
"tiny-types": "1.23.0"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"playwright-core": "~1.53.
|
|
65
|
+
"playwright-core": "~1.53.1"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@integration/testing-tools": "3.0.0",
|
|
69
69
|
"@types/chai": "4.3.20",
|
|
70
70
|
"@types/mocha": "10.0.10",
|
|
71
71
|
"c8": "10.1.3",
|
|
72
|
-
"mocha": "11.
|
|
72
|
+
"mocha": "11.7.0",
|
|
73
73
|
"mocha-multi": "1.1.7",
|
|
74
|
-
"playwright-core": "1.53.
|
|
74
|
+
"playwright-core": "1.53.1",
|
|
75
75
|
"ts-node": "10.9.2",
|
|
76
76
|
"typescript": "5.8.3"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "f1f288c9a75d28270dfe4ba16ca4f367a4dbba22"
|
|
79
79
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type * as playwright from 'playwright-core';
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* Playwright-specific options used to configure the ability to [`BrowseTheWebWithPlaywright`](https://serenity-js.org/api/playwright/class/BrowseTheWebWithPlaywright/)
|
|
5
3
|
*
|
|
@@ -8,7 +6,7 @@ import type * as playwright from 'playwright-core';
|
|
|
8
6
|
*
|
|
9
7
|
* @group Configuration
|
|
10
8
|
*/
|
|
11
|
-
export interface
|
|
9
|
+
export interface ExtraBrowserContextOptions {
|
|
12
10
|
|
|
13
11
|
/**
|
|
14
12
|
* Changes the default maximum navigation time for the browser context used by [`BrowseTheWebWithPlaywright`](https://serenity-js.org/api/playwright/class/BrowseTheWebWithPlaywright/)
|
|
@@ -28,7 +26,7 @@ export interface PlaywrightOptions extends playwright.BrowserContextOptions {
|
|
|
28
26
|
* #### Learn more
|
|
29
27
|
* - [Playwright `page.goto(url[, options])`](https://playwright.dev/docs/api/class-page#page-goto-option-wait-until)
|
|
30
28
|
*/
|
|
31
|
-
defaultNavigationWaitUntil?: 'load'|'domcontentloaded'|'networkidle'|'commit';
|
|
29
|
+
defaultNavigationWaitUntil?: 'load' | 'domcontentloaded' | 'networkidle' | 'commit';
|
|
32
30
|
|
|
33
31
|
/**
|
|
34
32
|
* This setting will change the default maximum time for all Playwright methods accepting `timeout` option.
|
package/src/index.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Discardable } from '@serenity-js/core';
|
|
|
2
2
|
import { BrowseTheWeb } from '@serenity-js/web';
|
|
3
3
|
import * as playwright from 'playwright-core';
|
|
4
4
|
|
|
5
|
-
import type {
|
|
5
|
+
import type { ExtraBrowserContextOptions } from '../../ExtraBrowserContextOptions';
|
|
6
6
|
import {
|
|
7
7
|
PlaywrightBrowsingSessionWithBrowser,
|
|
8
8
|
PlaywrightBrowsingSessionWithPage
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
* Note that [Serenity/JS Playwright Test module](https://serenity-js.org/api/playwright-test/)
|
|
54
54
|
* automatically configures all your [actors](https://serenity-js.org/api/core/class/Actor/)
|
|
55
55
|
* with an ability to [`BrowseTheWebWithPlaywright`](https://serenity-js.org/api/playwright/class/BrowseTheWebWithPlaywright/),
|
|
56
|
-
* so you don't need to do it by hand unless you want to override the [default configuration](https://serenity-js.org/api/playwright-test/interface/
|
|
56
|
+
* so you don't need to do it by hand unless you want to override the [default configuration](https://serenity-js.org/api/playwright-test/interface/SerenityFixtures/).
|
|
57
57
|
*
|
|
58
58
|
* The example below demonstrates how to use the [`BrowseTheWebWithPlaywright.usingPage`](https://serenity-js.org/api/playwright/class/BrowseTheWebWithPlaywright/#usingPage) API and
|
|
59
59
|
* override the default [cast](https://serenity-js.org/api/core/class/Cast/) of actors.
|
|
@@ -100,7 +100,7 @@ import {
|
|
|
100
100
|
*
|
|
101
101
|
* With other [test runners](https://serenity-js.org/handbook/test-runners/), you can configure Playwright by:
|
|
102
102
|
* - providing the browser-level configuration when calling [`BrowserType.launch`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch),
|
|
103
|
-
* - providing the browser context-level [`
|
|
103
|
+
* - providing the browser context-level [`ExtraBrowserContextOptions`](https://serenity-js.org/api/playwright/interface/ExtraBrowserContextOptions/)
|
|
104
104
|
* when initialising the ability to `BrowseTheWebWithPlaywright`.
|
|
105
105
|
*
|
|
106
106
|
* The code snippet below demonstrates how to configure the browser and some popular browser context options,
|
|
@@ -129,11 +129,9 @@ import {
|
|
|
129
129
|
* viewport: { width: 1600, height: 1200 },
|
|
130
130
|
* geolocation: { longitude: 51.50084271042897, latitude: -0.12462540129500639 },
|
|
131
131
|
* permissions: [ 'geolocation' ],
|
|
132
|
-
*
|
|
132
|
+
* }, {
|
|
133
133
|
* defaultNavigationTimeout: 30_000,
|
|
134
134
|
* defaultTimeout: 10_000
|
|
135
|
-
*
|
|
136
|
-
* // ... and so on
|
|
137
135
|
* }))
|
|
138
136
|
* .attemptsTo(
|
|
139
137
|
* Navigate.to(`https://serenity-js.org`),
|
|
@@ -141,7 +139,9 @@ import {
|
|
|
141
139
|
* )
|
|
142
140
|
* ```
|
|
143
141
|
*
|
|
144
|
-
* Note that in addition to all the standard Playwright BrowserContextOptions,
|
|
142
|
+
* Note that in addition to all the standard Playwright BrowserContextOptions,
|
|
143
|
+
* you can also provide several others defined in Serenity/JS [`ExtraBrowserContextOptions`](https://serenity-js.org/api/playwright/interface/ExtraBrowserContextOptions/),
|
|
144
|
+
* such as:
|
|
145
145
|
* - `defaultNavigationTimeout`, which changes the default maximum navigation timeout for the browser context,
|
|
146
146
|
* - `defaultTimeout`, which changes the default maximum time for all Playwright methods accepting the `timeout` option.
|
|
147
147
|
*
|
|
@@ -156,12 +156,12 @@ import {
|
|
|
156
156
|
*/
|
|
157
157
|
export class BrowseTheWebWithPlaywright extends BrowseTheWeb<playwright.Locator> implements Discardable {
|
|
158
158
|
|
|
159
|
-
static using(browser: playwright.Browser,
|
|
160
|
-
return new BrowseTheWebWithPlaywright(new PlaywrightBrowsingSessionWithBrowser(browser,
|
|
159
|
+
static using(browser: playwright.Browser, browserContextOptions?: playwright.BrowserContextOptions, extraBrowserContextOptions?: ExtraBrowserContextOptions): BrowseTheWebWithPlaywright {
|
|
160
|
+
return new BrowseTheWebWithPlaywright(new PlaywrightBrowsingSessionWithBrowser(browser, browserContextOptions, extraBrowserContextOptions, playwright.selectors));
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
static usingPage(page: playwright.Page,
|
|
164
|
-
return new BrowseTheWebWithPlaywright(new PlaywrightBrowsingSessionWithPage(page,
|
|
163
|
+
static usingPage(page: playwright.Page, extraBrowserContextOptions?: ExtraBrowserContextOptions): BrowseTheWebWithPlaywright {
|
|
164
|
+
return new BrowseTheWebWithPlaywright(new PlaywrightBrowsingSessionWithPage(page, extraBrowserContextOptions, playwright.selectors));
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
/**
|
|
@@ -3,7 +3,7 @@ import type { BrowserCapabilities } from '@serenity-js/web';
|
|
|
3
3
|
import { BrowsingSession, type Cookie, type CookieData } from '@serenity-js/web';
|
|
4
4
|
import type * as playwright from 'playwright-core';
|
|
5
5
|
|
|
6
|
-
import { type
|
|
6
|
+
import { type ExtraBrowserContextOptions } from '../../ExtraBrowserContextOptions';
|
|
7
7
|
import { SerenitySelectorEngines } from '../../selector-engines';
|
|
8
8
|
import { PlaywrightCookie, PlaywrightPage } from '../models';
|
|
9
9
|
|
|
@@ -18,7 +18,7 @@ export abstract class PlaywrightBrowsingSession extends BrowsingSession<Playwrig
|
|
|
18
18
|
private currentPlaywrightBrowserContext: playwright.BrowserContext;
|
|
19
19
|
|
|
20
20
|
protected constructor(
|
|
21
|
-
protected readonly
|
|
21
|
+
protected readonly extraBrowserContextOptions: Partial<ExtraBrowserContextOptions>,
|
|
22
22
|
protected readonly selectors: playwright.Selectors
|
|
23
23
|
) {
|
|
24
24
|
super();
|
|
@@ -52,25 +52,25 @@ export abstract class PlaywrightBrowsingSession extends BrowsingSession<Playwrig
|
|
|
52
52
|
protected async browserContext(): Promise<playwright.BrowserContext> {
|
|
53
53
|
if (! this.currentPlaywrightBrowserContext) {
|
|
54
54
|
await this.serenitySelectorEngines.ensureRegisteredWith(this.selectors);
|
|
55
|
-
this.currentPlaywrightBrowserContext = await this.createBrowserContext(
|
|
55
|
+
this.currentPlaywrightBrowserContext = await this.createBrowserContext();
|
|
56
56
|
|
|
57
57
|
this.currentPlaywrightBrowserContext.on('page', async page => {
|
|
58
58
|
this.register(
|
|
59
|
-
new PlaywrightPage(this, page, this.
|
|
59
|
+
new PlaywrightPage(this, page, this.extraBrowserContextOptions, CorrelationId.create())
|
|
60
60
|
);
|
|
61
61
|
});
|
|
62
62
|
|
|
63
|
-
if (this.
|
|
64
|
-
this.currentPlaywrightBrowserContext.setDefaultNavigationTimeout(this.
|
|
63
|
+
if (this.extraBrowserContextOptions?.defaultNavigationTimeout) {
|
|
64
|
+
this.currentPlaywrightBrowserContext.setDefaultNavigationTimeout(this.extraBrowserContextOptions?.defaultNavigationTimeout);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
if (this.
|
|
68
|
-
this.currentPlaywrightBrowserContext.setDefaultTimeout(this.
|
|
67
|
+
if (this.extraBrowserContextOptions?.defaultTimeout) {
|
|
68
|
+
this.currentPlaywrightBrowserContext.setDefaultTimeout(this.extraBrowserContextOptions?.defaultTimeout);
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
return this.currentPlaywrightBrowserContext;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
protected abstract createBrowserContext(
|
|
75
|
+
protected abstract createBrowserContext(): Promise<playwright.BrowserContext>;
|
|
76
76
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BrowserCapabilities } from '@serenity-js/web';
|
|
2
2
|
import type * as playwright from 'playwright-core';
|
|
3
3
|
|
|
4
|
-
import type {
|
|
4
|
+
import type { ExtraBrowserContextOptions } from '../../ExtraBrowserContextOptions';
|
|
5
5
|
import { PlaywrightBrowsingSession } from './PlaywrightBrowsingSession';
|
|
6
6
|
import type { PlaywrightPage } from './PlaywrightPage';
|
|
7
7
|
|
|
@@ -12,13 +12,14 @@ export class PlaywrightBrowsingSessionWithBrowser extends PlaywrightBrowsingSess
|
|
|
12
12
|
|
|
13
13
|
constructor(
|
|
14
14
|
protected readonly browser: playwright.Browser,
|
|
15
|
-
browserContextOptions:
|
|
15
|
+
protected readonly browserContextOptions: playwright.BrowserContextOptions,
|
|
16
|
+
extraBrowserContextOptions: ExtraBrowserContextOptions,
|
|
16
17
|
selectors: playwright.Selectors,
|
|
17
18
|
) {
|
|
18
|
-
super(
|
|
19
|
+
super(extraBrowserContextOptions, selectors);
|
|
19
20
|
}
|
|
20
21
|
|
|
21
|
-
protected override async createBrowserContext(
|
|
22
|
+
protected override async createBrowserContext(): Promise<playwright.BrowserContext> {
|
|
22
23
|
return this.browser.newContext(this.browserContextOptions);
|
|
23
24
|
}
|
|
24
25
|
|
|
@@ -2,7 +2,7 @@ import { CorrelationId } from '@serenity-js/core/lib/model';
|
|
|
2
2
|
import type { BrowserCapabilities } from '@serenity-js/web';
|
|
3
3
|
import type * as playwright from 'playwright-core';
|
|
4
4
|
|
|
5
|
-
import type {
|
|
5
|
+
import type { ExtraBrowserContextOptions } from '../../ExtraBrowserContextOptions';
|
|
6
6
|
import { PlaywrightBrowsingSession } from './PlaywrightBrowsingSession';
|
|
7
7
|
import { PlaywrightPage } from './PlaywrightPage';
|
|
8
8
|
|
|
@@ -14,7 +14,7 @@ export class PlaywrightBrowsingSessionWithPage extends PlaywrightBrowsingSession
|
|
|
14
14
|
|
|
15
15
|
constructor(
|
|
16
16
|
protected readonly page: playwright.Page,
|
|
17
|
-
browserContextOptions:
|
|
17
|
+
browserContextOptions: ExtraBrowserContextOptions,
|
|
18
18
|
selectors: playwright.Selectors,
|
|
19
19
|
) {
|
|
20
20
|
super(browserContextOptions, selectors);
|
|
@@ -23,14 +23,14 @@ export class PlaywrightBrowsingSessionWithPage extends PlaywrightBrowsingSession
|
|
|
23
23
|
protected override async registerCurrentPage(): Promise<PlaywrightPage> {
|
|
24
24
|
await this.browserContext();
|
|
25
25
|
|
|
26
|
-
const playwrightPage = new PlaywrightPage(this, this.page, this.
|
|
26
|
+
const playwrightPage = new PlaywrightPage(this, this.page, this.extraBrowserContextOptions, this.playwrightManagedPageId);
|
|
27
27
|
|
|
28
28
|
this.register(playwrightPage);
|
|
29
29
|
|
|
30
30
|
return playwrightPage;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
protected override async createBrowserContext(
|
|
33
|
+
protected override async createBrowserContext(): Promise<playwright.BrowserContext> {
|
|
34
34
|
return this.page.context();
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -6,7 +6,7 @@ import * as scripts from '@serenity-js/web/lib/scripts';
|
|
|
6
6
|
import type * as playwright from 'playwright-core';
|
|
7
7
|
import { URL } from 'url';
|
|
8
8
|
|
|
9
|
-
import type {
|
|
9
|
+
import type { ExtraBrowserContextOptions } from '../../ExtraBrowserContextOptions';
|
|
10
10
|
import { promised } from '../promised';
|
|
11
11
|
import { PlaywrightExistingElementLocator, PlaywrightLocator, PlaywrightRootLocator } from './locators';
|
|
12
12
|
import type { PlaywrightBrowsingSession } from './PlaywrightBrowsingSession';
|
|
@@ -39,7 +39,7 @@ export class PlaywrightPage extends Page<playwright.Locator> {
|
|
|
39
39
|
constructor(
|
|
40
40
|
session: PlaywrightBrowsingSession,
|
|
41
41
|
private readonly page: playwright.Page,
|
|
42
|
-
private readonly options:
|
|
42
|
+
private readonly options: Partial<Pick<ExtraBrowserContextOptions, 'defaultNavigationWaitUntil'>>,
|
|
43
43
|
pageId: CorrelationId,
|
|
44
44
|
) {
|
|
45
45
|
super(
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PlaywrightOptions.d.ts","sourceRoot":"","sources":["../src/PlaywrightOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAEnD;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAkB,SAAQ,UAAU,CAAC,qBAAqB;IAEvE;;;;;OAKG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAElC;;;;;;;;;OASG;IACH,0BAA0B,CAAC,EAAE,MAAM,GAAC,kBAAkB,GAAC,aAAa,GAAC,QAAQ,CAAC;IAE9E;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PlaywrightOptions.js","sourceRoot":"","sources":["../src/PlaywrightOptions.ts"],"names":[],"mappings":""}
|