@serenity-js/web 3.25.0 → 3.25.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 +11 -0
- package/README.md +1 -1
- package/lib/errors/BrowserWindowClosedError.d.ts +2 -2
- package/lib/errors/BrowserWindowClosedError.js +2 -2
- package/lib/errors/CookieMissingError.d.ts +2 -2
- package/lib/errors/CookieMissingError.js +2 -2
- package/lib/errors/ModalDialogObstructsScreenshotError.d.ts +3 -3
- package/lib/errors/ModalDialogObstructsScreenshotError.js +3 -3
- package/lib/expectations/isActive.d.ts +8 -8
- package/lib/expectations/isActive.js +8 -8
- package/lib/expectations/isClickable.d.ts +8 -8
- package/lib/expectations/isClickable.js +8 -8
- package/lib/expectations/isEnabled.d.ts +8 -8
- package/lib/expectations/isEnabled.js +8 -8
- package/lib/expectations/isSelected.d.ts +8 -8
- package/lib/expectations/isSelected.js +8 -8
- package/lib/expectations/isVisible.d.ts +8 -8
- package/lib/expectations/isVisible.js +8 -8
- package/lib/screenplay/abilities/BrowseTheWeb.d.ts +25 -23
- package/lib/screenplay/abilities/BrowseTheWeb.d.ts.map +1 -1
- package/lib/screenplay/abilities/BrowseTheWeb.js +25 -23
- package/lib/screenplay/abilities/BrowseTheWeb.js.map +1 -1
- package/lib/screenplay/interactions/Clear.d.ts +7 -7
- package/lib/screenplay/interactions/Clear.js +7 -7
- package/lib/screenplay/interactions/Click.d.ts +5 -5
- package/lib/screenplay/interactions/Click.js +5 -5
- package/lib/screenplay/interactions/DoubleClick.d.ts +5 -5
- package/lib/screenplay/interactions/DoubleClick.js +5 -5
- package/lib/screenplay/interactions/Enter.d.ts +5 -5
- package/lib/screenplay/interactions/Enter.js +5 -5
- package/lib/screenplay/interactions/ExecuteScript.d.ts +19 -19
- package/lib/screenplay/interactions/ExecuteScript.js +18 -18
- package/lib/screenplay/interactions/Hover.d.ts +5 -5
- package/lib/screenplay/interactions/Hover.js +5 -5
- package/lib/screenplay/interactions/Navigate.d.ts +8 -8
- package/lib/screenplay/interactions/Navigate.js +8 -8
- package/lib/screenplay/interactions/PageElementInteraction.d.ts +3 -3
- package/lib/screenplay/interactions/PageElementInteraction.js +3 -3
- package/lib/screenplay/interactions/Press.d.ts +10 -10
- package/lib/screenplay/interactions/Press.js +10 -10
- package/lib/screenplay/interactions/RightClick.d.ts +5 -5
- package/lib/screenplay/interactions/RightClick.js +5 -5
- package/lib/screenplay/interactions/Scroll.d.ts +5 -5
- package/lib/screenplay/interactions/Scroll.js +5 -5
- package/lib/screenplay/interactions/Select.d.ts +22 -22
- package/lib/screenplay/interactions/Select.js +22 -22
- package/lib/screenplay/interactions/Switch.d.ts +16 -16
- package/lib/screenplay/interactions/Switch.js +16 -16
- package/lib/screenplay/interactions/TakeScreenshot.d.ts +11 -10
- package/lib/screenplay/interactions/TakeScreenshot.d.ts.map +1 -1
- package/lib/screenplay/interactions/TakeScreenshot.js +11 -10
- package/lib/screenplay/interactions/TakeScreenshot.js.map +1 -1
- package/lib/screenplay/models/BrowserCapabilities.d.ts +1 -1
- package/lib/screenplay/models/BrowsingSession.d.ts +8 -8
- package/lib/screenplay/models/BrowsingSession.js +6 -6
- package/lib/screenplay/models/Cookie.d.ts +10 -10
- package/lib/screenplay/models/Cookie.js +9 -9
- package/lib/screenplay/models/CookieData.d.ts +4 -4
- package/lib/screenplay/models/Key.d.ts +4 -4
- package/lib/screenplay/models/Key.js +4 -4
- package/lib/screenplay/models/Locator.d.ts +8 -8
- package/lib/screenplay/models/Locator.js +8 -8
- package/lib/screenplay/models/Page.d.ts +32 -32
- package/lib/screenplay/models/Page.js +14 -14
- package/lib/screenplay/models/PageElement.d.ts +13 -13
- package/lib/screenplay/models/PageElement.js +7 -7
- package/lib/screenplay/models/PageElements.d.ts +6 -6
- package/lib/screenplay/models/PageElements.js +6 -6
- package/lib/screenplay/models/RootLocator.d.ts +5 -5
- package/lib/screenplay/models/RootLocator.js +5 -5
- package/lib/screenplay/models/SelectOption.d.ts +4 -4
- package/lib/screenplay/models/SelectOption.js +4 -4
- package/lib/screenplay/models/Switchable.d.ts +6 -6
- package/lib/screenplay/models/SwitchableOrigin.d.ts +4 -4
- package/lib/screenplay/models/dialogs/AbsentModalDialog.d.ts +2 -2
- package/lib/screenplay/models/dialogs/AbsentModalDialog.js +2 -2
- package/lib/screenplay/models/dialogs/AcceptedModalDialog.d.ts +3 -3
- package/lib/screenplay/models/dialogs/AcceptedModalDialog.js +3 -3
- package/lib/screenplay/models/dialogs/DismissedModalDialog.d.ts +3 -3
- package/lib/screenplay/models/dialogs/DismissedModalDialog.js +3 -3
- package/lib/screenplay/models/dialogs/ModalDialog.d.ts +12 -9
- package/lib/screenplay/models/dialogs/ModalDialog.d.ts.map +1 -1
- package/lib/screenplay/models/dialogs/ModalDialog.js +10 -7
- package/lib/screenplay/models/dialogs/ModalDialog.js.map +1 -1
- package/lib/screenplay/models/dialogs/ModalDialogHandler.d.ts +5 -5
- package/lib/screenplay/models/dialogs/ModalDialogHandler.js +5 -5
- package/lib/screenplay/models/selectors/By.d.ts +14 -14
- package/lib/screenplay/models/selectors/By.js +14 -14
- package/lib/screenplay/models/selectors/ByCss.d.ts +2 -2
- package/lib/screenplay/models/selectors/ByCss.js +2 -2
- package/lib/screenplay/models/selectors/ByCssContainingText.d.ts +2 -2
- package/lib/screenplay/models/selectors/ByCssContainingText.js +2 -2
- package/lib/screenplay/models/selectors/ByDeepCss.d.ts +2 -2
- package/lib/screenplay/models/selectors/ByDeepCss.js +2 -2
- package/lib/screenplay/models/selectors/ById.d.ts +2 -2
- package/lib/screenplay/models/selectors/ById.js +2 -2
- package/lib/screenplay/models/selectors/ByTagName.d.ts +2 -2
- package/lib/screenplay/models/selectors/ByTagName.js +2 -2
- package/lib/screenplay/models/selectors/ByXPath.d.ts +2 -2
- package/lib/screenplay/models/selectors/ByXPath.js +2 -2
- package/lib/screenplay/models/selectors/Selector.d.ts +1 -1
- package/lib/screenplay/models/selectors/Selector.js +1 -1
- package/lib/screenplay/questions/Attribute.d.ts +13 -13
- package/lib/screenplay/questions/Attribute.js +13 -13
- package/lib/screenplay/questions/ComputedStyle.d.ts +16 -16
- package/lib/screenplay/questions/ComputedStyle.js +16 -16
- package/lib/screenplay/questions/CssClasses.d.ts +13 -13
- package/lib/screenplay/questions/CssClasses.js +13 -13
- package/lib/screenplay/questions/LastScriptExecution.d.ts +7 -7
- package/lib/screenplay/questions/LastScriptExecution.js +7 -7
- package/lib/screenplay/questions/Selected.d.ts +17 -17
- package/lib/screenplay/questions/Selected.js +17 -17
- package/lib/screenplay/questions/Text.d.ts +18 -18
- package/lib/screenplay/questions/Text.js +14 -14
- package/lib/screenplay/questions/Value.d.ts +12 -12
- package/lib/screenplay/questions/Value.js +12 -12
- package/lib/stage/crew/photographer/Photographer.d.ts +18 -17
- package/lib/stage/crew/photographer/Photographer.d.ts.map +1 -1
- package/lib/stage/crew/photographer/Photographer.js +18 -17
- package/lib/stage/crew/photographer/Photographer.js.map +1 -1
- package/lib/stage/crew/photographer/strategies/PhotoTakingStrategy.d.ts +6 -6
- package/lib/stage/crew/photographer/strategies/PhotoTakingStrategy.js +6 -6
- package/lib/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.d.ts +3 -3
- package/lib/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.js +3 -3
- package/lib/stage/crew/photographer/strategies/TakePhotosOfFailures.d.ts +3 -3
- package/lib/stage/crew/photographer/strategies/TakePhotosOfFailures.js +3 -3
- package/lib/stage/crew/photographer/strategies/TakePhotosOfInteractions.d.ts +3 -3
- package/lib/stage/crew/photographer/strategies/TakePhotosOfInteractions.js +3 -3
- package/package.json +4 -4
- package/src/errors/BrowserWindowClosedError.ts +2 -2
- package/src/errors/CookieMissingError.ts +2 -2
- package/src/errors/ModalDialogObstructsScreenshotError.ts +3 -3
- package/src/expectations/isActive.ts +8 -8
- package/src/expectations/isClickable.ts +8 -8
- package/src/expectations/isEnabled.ts +8 -8
- package/src/expectations/isSelected.ts +8 -8
- package/src/expectations/isVisible.ts +8 -8
- package/src/screenplay/abilities/BrowseTheWeb.ts +25 -23
- package/src/screenplay/interactions/Clear.ts +7 -7
- package/src/screenplay/interactions/Click.ts +5 -5
- package/src/screenplay/interactions/DoubleClick.ts +5 -5
- package/src/screenplay/interactions/Enter.ts +5 -5
- package/src/screenplay/interactions/ExecuteScript.ts +19 -19
- package/src/screenplay/interactions/Hover.ts +5 -5
- package/src/screenplay/interactions/Navigate.ts +8 -8
- package/src/screenplay/interactions/PageElementInteraction.ts +3 -3
- package/src/screenplay/interactions/Press.ts +10 -10
- package/src/screenplay/interactions/RightClick.ts +5 -5
- package/src/screenplay/interactions/Scroll.ts +5 -5
- package/src/screenplay/interactions/Select.ts +22 -22
- package/src/screenplay/interactions/Switch.ts +16 -16
- package/src/screenplay/interactions/TakeScreenshot.ts +11 -10
- package/src/screenplay/models/BrowserCapabilities.ts +1 -1
- package/src/screenplay/models/BrowsingSession.ts +8 -8
- package/src/screenplay/models/Cookie.ts +10 -10
- package/src/screenplay/models/CookieData.ts +4 -4
- package/src/screenplay/models/Key.ts +4 -4
- package/src/screenplay/models/Locator.ts +8 -8
- package/src/screenplay/models/Page.ts +32 -32
- package/src/screenplay/models/PageElement.ts +13 -13
- package/src/screenplay/models/PageElements.ts +6 -6
- package/src/screenplay/models/RootLocator.ts +5 -5
- package/src/screenplay/models/SelectOption.ts +4 -4
- package/src/screenplay/models/Switchable.ts +6 -6
- package/src/screenplay/models/SwitchableOrigin.ts +4 -4
- package/src/screenplay/models/dialogs/AbsentModalDialog.ts +2 -2
- package/src/screenplay/models/dialogs/AcceptedModalDialog.ts +3 -3
- package/src/screenplay/models/dialogs/DismissedModalDialog.ts +3 -3
- package/src/screenplay/models/dialogs/ModalDialog.ts +12 -9
- package/src/screenplay/models/dialogs/ModalDialogHandler.ts +5 -5
- package/src/screenplay/models/selectors/By.ts +14 -14
- package/src/screenplay/models/selectors/ByCss.ts +2 -2
- package/src/screenplay/models/selectors/ByCssContainingText.ts +2 -2
- package/src/screenplay/models/selectors/ByDeepCss.ts +2 -2
- package/src/screenplay/models/selectors/ById.ts +2 -2
- package/src/screenplay/models/selectors/ByTagName.ts +2 -2
- package/src/screenplay/models/selectors/ByXPath.ts +2 -2
- package/src/screenplay/models/selectors/Selector.ts +1 -1
- package/src/screenplay/questions/Attribute.ts +13 -13
- package/src/screenplay/questions/ComputedStyle.ts +16 -16
- package/src/screenplay/questions/CssClasses.ts +13 -13
- package/src/screenplay/questions/LastScriptExecution.ts +7 -7
- package/src/screenplay/questions/Selected.ts +17 -17
- package/src/screenplay/questions/Text.ts +18 -18
- package/src/screenplay/questions/Value.ts +12 -12
- package/src/stage/crew/photographer/Photographer.ts +18 -17
- package/src/stage/crew/photographer/strategies/PhotoTakingStrategy.ts +6 -6
- package/src/stage/crew/photographer/strategies/TakePhotosBeforeAndAfterInteractions.ts +3 -3
- package/src/stage/crew/photographer/strategies/TakePhotosOfFailures.ts +3 -3
- package/src/stage/crew/photographer/strategies/TakePhotosOfInteractions.ts +3 -3
|
@@ -4,8 +4,8 @@ exports.LastScriptExecution = void 0;
|
|
|
4
4
|
const core_1 = require("@serenity-js/core");
|
|
5
5
|
const abilities_1 = require("../abilities");
|
|
6
6
|
/**
|
|
7
|
-
* Uses the
|
|
8
|
-
* a returns the result of the last script executed via
|
|
7
|
+
* Uses the [actor's](https://serenity-js.org/api/core/class/Actor/) [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/) to retrieve
|
|
8
|
+
* a returns the result of the last script executed via [`ExecuteScript`](https://serenity-js.org/api/web/class/ExecuteScript/).
|
|
9
9
|
*
|
|
10
10
|
* ## Executing a script and reading the result
|
|
11
11
|
*
|
|
@@ -21,7 +21,7 @@ const abilities_1 = require("../abilities");
|
|
|
21
21
|
* )
|
|
22
22
|
* ```
|
|
23
23
|
*
|
|
24
|
-
* ## Using LastScriptExecution as
|
|
24
|
+
* ## Using LastScriptExecution as [`QuestionAdapter`](https://serenity-js.org/api/core/#QuestionAdapter)
|
|
25
25
|
*
|
|
26
26
|
* ```ts
|
|
27
27
|
* import { actorCalled } from '@serenity-js/core'
|
|
@@ -39,15 +39,15 @@ const abilities_1 = require("../abilities");
|
|
|
39
39
|
* ```
|
|
40
40
|
*
|
|
41
41
|
* ## Learn more
|
|
42
|
-
* -
|
|
43
|
-
* -
|
|
44
|
-
* -
|
|
42
|
+
* - [`ExecuteScript`](https://serenity-js.org/api/web/class/ExecuteScript/)
|
|
43
|
+
* - [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
44
|
+
* - [`QuestionAdapter`](https://serenity-js.org/api/core/#QuestionAdapter)
|
|
45
45
|
*
|
|
46
46
|
* @group Questions
|
|
47
47
|
*/
|
|
48
48
|
class LastScriptExecution {
|
|
49
49
|
/**
|
|
50
|
-
* Enables asserting on the result of a function executed via
|
|
50
|
+
* Enables asserting on the result of a function executed via [`ExecuteScript`](https://serenity-js.org/api/web/class/ExecuteScript/).
|
|
51
51
|
*/
|
|
52
52
|
static result() {
|
|
53
53
|
return core_1.Question.about(`last script execution result`, async (actor) => {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import type { Answerable, QuestionAdapter } from '@serenity-js/core';
|
|
2
2
|
import type { PageElement } from '../models';
|
|
3
3
|
/**
|
|
4
|
-
* Uses the
|
|
4
|
+
* Uses the [actor's](https://serenity-js.org/api/core/class/Actor/) [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/) to retrieve
|
|
5
5
|
* options and values selected in a
|
|
6
6
|
* [HTML `<select>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select).
|
|
7
7
|
*
|
|
8
8
|
* ## Learn more
|
|
9
|
-
* -
|
|
10
|
-
* -
|
|
11
|
-
* -
|
|
12
|
-
* -
|
|
9
|
+
* - [`Select`](https://serenity-js.org/api/web/class/Select/)
|
|
10
|
+
* - [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
11
|
+
* - [`QuestionAdapter`](https://serenity-js.org/api/core/#QuestionAdapter)
|
|
12
|
+
* - [`Question`](https://serenity-js.org/api/core/class/Question/)
|
|
13
13
|
*
|
|
14
14
|
* @group Questions
|
|
15
15
|
*/
|
|
16
16
|
export declare class Selected {
|
|
17
17
|
/**
|
|
18
|
-
* Uses the
|
|
18
|
+
* Uses the [actor's](https://serenity-js.org/api/core/class/Actor/) [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/) to retrieve
|
|
19
19
|
* a single [option](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option)
|
|
20
20
|
* selected in an [HTML `<select>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select).
|
|
21
21
|
*
|
|
@@ -57,14 +57,14 @@ export declare class Selected {
|
|
|
57
57
|
* ```
|
|
58
58
|
*
|
|
59
59
|
* #### Learn more
|
|
60
|
-
* -
|
|
60
|
+
* - [`Select.value`](https://serenity-js.org/api/web/class/Select/#value)
|
|
61
61
|
*
|
|
62
62
|
* @param pageElement
|
|
63
|
-
* A
|
|
63
|
+
* A [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) identifying the `<select>` element of interest
|
|
64
64
|
*/
|
|
65
65
|
static valueOf(pageElement: Answerable<PageElement>): QuestionAdapter<string>;
|
|
66
66
|
/**
|
|
67
|
-
* Uses the
|
|
67
|
+
* Uses the [actor's](https://serenity-js.org/api/core/class/Actor/) [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/) to retrieve
|
|
68
68
|
* values of [options](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option)
|
|
69
69
|
* selected in an [HTML `<select multiple>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-multiple)
|
|
70
70
|
*
|
|
@@ -106,14 +106,14 @@ export declare class Selected {
|
|
|
106
106
|
* ```
|
|
107
107
|
*
|
|
108
108
|
* #### Learn more
|
|
109
|
-
* -
|
|
109
|
+
* - [`Select.values`](https://serenity-js.org/api/web/class/Select/#values)
|
|
110
110
|
*
|
|
111
111
|
* @param pageElement
|
|
112
|
-
* A
|
|
112
|
+
* A [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) identifying the `<select>` element of interest
|
|
113
113
|
*/
|
|
114
114
|
static valuesOf(pageElement: Answerable<PageElement>): QuestionAdapter<Array<string>>;
|
|
115
115
|
/**
|
|
116
|
-
* Uses the
|
|
116
|
+
* Uses the [actor's](https://serenity-js.org/api/core/class/Actor/) [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/) to retrieve
|
|
117
117
|
* a single option selected in an [HTML `<select>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-multiple)
|
|
118
118
|
*
|
|
119
119
|
* #### Example widget
|
|
@@ -156,14 +156,14 @@ export declare class Selected {
|
|
|
156
156
|
* ```
|
|
157
157
|
*
|
|
158
158
|
* #### Learn more
|
|
159
|
-
* -
|
|
159
|
+
* - [`Select.option`](https://serenity-js.org/api/web/class/Select/#option)
|
|
160
160
|
*
|
|
161
161
|
* @param pageElement
|
|
162
|
-
* A
|
|
162
|
+
* A [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) identifying the `<select>` element of interest
|
|
163
163
|
*/
|
|
164
164
|
static optionIn(pageElement: Answerable<PageElement>): QuestionAdapter<string>;
|
|
165
165
|
/**
|
|
166
|
-
* Uses the
|
|
166
|
+
* Uses the [actor's](https://serenity-js.org/api/core/class/Actor/) [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/) to retrieve
|
|
167
167
|
* options selected in an [HTML `<select multiple>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-multiple)
|
|
168
168
|
*
|
|
169
169
|
* #### Example widget
|
|
@@ -206,10 +206,10 @@ export declare class Selected {
|
|
|
206
206
|
* ```
|
|
207
207
|
*
|
|
208
208
|
* #### Learn more
|
|
209
|
-
* -
|
|
209
|
+
* - [`Select.options`](https://serenity-js.org/api/web/class/Select/#options)
|
|
210
210
|
*
|
|
211
211
|
* @param pageElement
|
|
212
|
-
* A
|
|
212
|
+
* A [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) identifying the `<select>` element of interest
|
|
213
213
|
*/
|
|
214
214
|
static optionsIn(pageElement: Answerable<PageElement>): QuestionAdapter<Array<string>>;
|
|
215
215
|
}
|
|
@@ -3,21 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Selected = void 0;
|
|
4
4
|
const core_1 = require("@serenity-js/core");
|
|
5
5
|
/**
|
|
6
|
-
* Uses the
|
|
6
|
+
* Uses the [actor's](https://serenity-js.org/api/core/class/Actor/) [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/) to retrieve
|
|
7
7
|
* options and values selected in a
|
|
8
8
|
* [HTML `<select>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select).
|
|
9
9
|
*
|
|
10
10
|
* ## Learn more
|
|
11
|
-
* -
|
|
12
|
-
* -
|
|
13
|
-
* -
|
|
14
|
-
* -
|
|
11
|
+
* - [`Select`](https://serenity-js.org/api/web/class/Select/)
|
|
12
|
+
* - [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
13
|
+
* - [`QuestionAdapter`](https://serenity-js.org/api/core/#QuestionAdapter)
|
|
14
|
+
* - [`Question`](https://serenity-js.org/api/core/class/Question/)
|
|
15
15
|
*
|
|
16
16
|
* @group Questions
|
|
17
17
|
*/
|
|
18
18
|
class Selected {
|
|
19
19
|
/**
|
|
20
|
-
* Uses the
|
|
20
|
+
* Uses the [actor's](https://serenity-js.org/api/core/class/Actor/) [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/) to retrieve
|
|
21
21
|
* a single [option](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option)
|
|
22
22
|
* selected in an [HTML `<select>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select).
|
|
23
23
|
*
|
|
@@ -59,10 +59,10 @@ class Selected {
|
|
|
59
59
|
* ```
|
|
60
60
|
*
|
|
61
61
|
* #### Learn more
|
|
62
|
-
* -
|
|
62
|
+
* - [`Select.value`](https://serenity-js.org/api/web/class/Select/#value)
|
|
63
63
|
*
|
|
64
64
|
* @param pageElement
|
|
65
|
-
* A
|
|
65
|
+
* A [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) identifying the `<select>` element of interest
|
|
66
66
|
*/
|
|
67
67
|
static valueOf(pageElement) {
|
|
68
68
|
return core_1.Question.about((0, core_1.the) `value selected in ${pageElement}`, async (actor) => {
|
|
@@ -74,7 +74,7 @@ class Selected {
|
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
77
|
-
* Uses the
|
|
77
|
+
* Uses the [actor's](https://serenity-js.org/api/core/class/Actor/) [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/) to retrieve
|
|
78
78
|
* values of [options](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option)
|
|
79
79
|
* selected in an [HTML `<select multiple>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-multiple)
|
|
80
80
|
*
|
|
@@ -116,10 +116,10 @@ class Selected {
|
|
|
116
116
|
* ```
|
|
117
117
|
*
|
|
118
118
|
* #### Learn more
|
|
119
|
-
* -
|
|
119
|
+
* - [`Select.values`](https://serenity-js.org/api/web/class/Select/#values)
|
|
120
120
|
*
|
|
121
121
|
* @param pageElement
|
|
122
|
-
* A
|
|
122
|
+
* A [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) identifying the `<select>` element of interest
|
|
123
123
|
*/
|
|
124
124
|
static valuesOf(pageElement) {
|
|
125
125
|
return core_1.Question.about((0, core_1.the) `values selected in ${pageElement}`, async (actor) => {
|
|
@@ -131,7 +131,7 @@ class Selected {
|
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
133
|
/**
|
|
134
|
-
* Uses the
|
|
134
|
+
* Uses the [actor's](https://serenity-js.org/api/core/class/Actor/) [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/) to retrieve
|
|
135
135
|
* a single option selected in an [HTML `<select>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-multiple)
|
|
136
136
|
*
|
|
137
137
|
* #### Example widget
|
|
@@ -174,10 +174,10 @@ class Selected {
|
|
|
174
174
|
* ```
|
|
175
175
|
*
|
|
176
176
|
* #### Learn more
|
|
177
|
-
* -
|
|
177
|
+
* - [`Select.option`](https://serenity-js.org/api/web/class/Select/#option)
|
|
178
178
|
*
|
|
179
179
|
* @param pageElement
|
|
180
|
-
* A
|
|
180
|
+
* A [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) identifying the `<select>` element of interest
|
|
181
181
|
*/
|
|
182
182
|
static optionIn(pageElement) {
|
|
183
183
|
return core_1.Question.about((0, core_1.the) `option selected in ${pageElement}`, async (actor) => {
|
|
@@ -189,7 +189,7 @@ class Selected {
|
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
191
|
/**
|
|
192
|
-
* Uses the
|
|
192
|
+
* Uses the [actor's](https://serenity-js.org/api/core/class/Actor/) [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/) to retrieve
|
|
193
193
|
* options selected in an [HTML `<select multiple>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-multiple)
|
|
194
194
|
*
|
|
195
195
|
* #### Example widget
|
|
@@ -232,10 +232,10 @@ class Selected {
|
|
|
232
232
|
* ```
|
|
233
233
|
*
|
|
234
234
|
* #### Learn more
|
|
235
|
-
* -
|
|
235
|
+
* - [`Select.options`](https://serenity-js.org/api/web/class/Select/#options)
|
|
236
236
|
*
|
|
237
237
|
* @param pageElement
|
|
238
|
-
* A
|
|
238
|
+
* A [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) identifying the `<select>` element of interest
|
|
239
239
|
*/
|
|
240
240
|
static optionsIn(pageElement) {
|
|
241
241
|
return core_1.Question.about((0, core_1.the) `options selected in ${pageElement}`, async (actor) => {
|
|
@@ -2,10 +2,10 @@ import type { Answerable, MetaQuestionAdapter, QuestionAdapter } from '@serenity
|
|
|
2
2
|
import type { PageElements } from '../models';
|
|
3
3
|
import { PageElement } from '../models';
|
|
4
4
|
/**
|
|
5
|
-
* Uses the
|
|
5
|
+
* Uses the [actor's](https://serenity-js.org/api/core/class/Actor/) [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/) to retrieve
|
|
6
6
|
* the visible (i.e. not hidden by CSS) [`innerText`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/innerText) of:
|
|
7
|
-
* - a given
|
|
8
|
-
* - a group of
|
|
7
|
+
* - a given [`PageElement`](https://serenity-js.org/api/web/class/PageElement/)
|
|
8
|
+
* - a group of [`PageElement`](https://serenity-js.org/api/web/class/PageElements/)
|
|
9
9
|
*
|
|
10
10
|
* The result includes the visible text of any sub-elements, without any leading or trailing whitespace.
|
|
11
11
|
*
|
|
@@ -20,7 +20,7 @@ import { PageElement } from '../models';
|
|
|
20
20
|
* </ul>
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
23
|
-
* ## Retrieve text of a single
|
|
23
|
+
* ## Retrieve text of a single [`PageElement`](https://serenity-js.org/api/web/class/PageElement/)
|
|
24
24
|
*
|
|
25
25
|
* ```ts
|
|
26
26
|
* import { actorCalled } from '@serenity-js/core'
|
|
@@ -38,7 +38,7 @@ import { PageElement } from '../models';
|
|
|
38
38
|
* )
|
|
39
39
|
* ```
|
|
40
40
|
*
|
|
41
|
-
* ## Retrieve text of multiple
|
|
41
|
+
* ## Retrieve text of multiple [`PageElement`](https://serenity-js.org/api/web/class/PageElements/)
|
|
42
42
|
*
|
|
43
43
|
* ```ts
|
|
44
44
|
* import { actorCalled } from '@serenity-js/core'
|
|
@@ -58,7 +58,7 @@ import { PageElement } from '../models';
|
|
|
58
58
|
* )
|
|
59
59
|
* ```
|
|
60
60
|
*
|
|
61
|
-
* ## Using as filter in
|
|
61
|
+
* ## Using as filter in [Page Element Query Language](https://serenity-js.org/handbook/web-testing/page-element-query-language/)
|
|
62
62
|
*
|
|
63
63
|
* ```ts
|
|
64
64
|
* import { actorCalled } from '@serenity-js/core'
|
|
@@ -81,32 +81,32 @@ import { PageElement } from '../models';
|
|
|
81
81
|
* ```
|
|
82
82
|
*
|
|
83
83
|
* ## Learn more
|
|
84
|
-
* -
|
|
85
|
-
* -
|
|
86
|
-
* -
|
|
87
|
-
* -
|
|
84
|
+
* - [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
85
|
+
* - [`MetaQuestion`](https://serenity-js.org/api/core/interface/MetaQuestion/)
|
|
86
|
+
* - [`QuestionAdapter`](https://serenity-js.org/api/core/#QuestionAdapter)
|
|
87
|
+
* - [`Question`](https://serenity-js.org/api/core/class/Question/)
|
|
88
88
|
*
|
|
89
89
|
* @group Questions
|
|
90
90
|
*/
|
|
91
91
|
export declare class Text {
|
|
92
92
|
/**
|
|
93
|
-
* Instantiates a
|
|
94
|
-
* the
|
|
95
|
-
* the text of a single
|
|
93
|
+
* Instantiates a [`Question`](https://serenity-js.org/api/core/class/Question/) that uses
|
|
94
|
+
* the [actor's](https://serenity-js.org/api/core/class/Actor/) [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/) to retrieve
|
|
95
|
+
* the text of a single [`PageElement`](https://serenity-js.org/api/web/class/PageElement/).
|
|
96
96
|
*
|
|
97
97
|
* #### Learn more
|
|
98
|
-
* -
|
|
98
|
+
* - [`MetaQuestion`](https://serenity-js.org/api/core/interface/MetaQuestion/)
|
|
99
99
|
*
|
|
100
100
|
* @param pageElement
|
|
101
101
|
*/
|
|
102
102
|
static of(pageElement: QuestionAdapter<PageElement> | PageElement): MetaQuestionAdapter<PageElement, string>;
|
|
103
103
|
/**
|
|
104
|
-
* Instantiates a
|
|
105
|
-
* the
|
|
106
|
-
* the text of a group of
|
|
104
|
+
* Instantiates a [`Question`](https://serenity-js.org/api/core/class/Question/) that uses
|
|
105
|
+
* the [actor's](https://serenity-js.org/api/core/class/Actor/) [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/) to retrieve
|
|
106
|
+
* the text of a group of [`PageElement`](https://serenity-js.org/api/web/class/PageElements/).
|
|
107
107
|
*
|
|
108
108
|
* #### Learn more
|
|
109
|
-
* -
|
|
109
|
+
* - [`MetaQuestion`](https://serenity-js.org/api/core/interface/MetaQuestion/)
|
|
110
110
|
*
|
|
111
111
|
* @param pageElements
|
|
112
112
|
*/
|
|
@@ -5,10 +5,10 @@ const core_1 = require("@serenity-js/core");
|
|
|
5
5
|
const io_1 = require("@serenity-js/core/lib/io");
|
|
6
6
|
const models_1 = require("../models");
|
|
7
7
|
/**
|
|
8
|
-
* Uses the
|
|
8
|
+
* Uses the [actor's](https://serenity-js.org/api/core/class/Actor/) [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/) to retrieve
|
|
9
9
|
* the visible (i.e. not hidden by CSS) [`innerText`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/innerText) of:
|
|
10
|
-
* - a given
|
|
11
|
-
* - a group of
|
|
10
|
+
* - a given [`PageElement`](https://serenity-js.org/api/web/class/PageElement/)
|
|
11
|
+
* - a group of [`PageElement`](https://serenity-js.org/api/web/class/PageElements/)
|
|
12
12
|
*
|
|
13
13
|
* The result includes the visible text of any sub-elements, without any leading or trailing whitespace.
|
|
14
14
|
*
|
|
@@ -23,7 +23,7 @@ const models_1 = require("../models");
|
|
|
23
23
|
* </ul>
|
|
24
24
|
* ```
|
|
25
25
|
*
|
|
26
|
-
* ## Retrieve text of a single
|
|
26
|
+
* ## Retrieve text of a single [`PageElement`](https://serenity-js.org/api/web/class/PageElement/)
|
|
27
27
|
*
|
|
28
28
|
* ```ts
|
|
29
29
|
* import { actorCalled } from '@serenity-js/core'
|
|
@@ -41,7 +41,7 @@ const models_1 = require("../models");
|
|
|
41
41
|
* )
|
|
42
42
|
* ```
|
|
43
43
|
*
|
|
44
|
-
* ## Retrieve text of multiple
|
|
44
|
+
* ## Retrieve text of multiple [`PageElement`](https://serenity-js.org/api/web/class/PageElements/)
|
|
45
45
|
*
|
|
46
46
|
* ```ts
|
|
47
47
|
* import { actorCalled } from '@serenity-js/core'
|
|
@@ -61,7 +61,7 @@ const models_1 = require("../models");
|
|
|
61
61
|
* )
|
|
62
62
|
* ```
|
|
63
63
|
*
|
|
64
|
-
* ## Using as filter in
|
|
64
|
+
* ## Using as filter in [Page Element Query Language](https://serenity-js.org/handbook/web-testing/page-element-query-language/)
|
|
65
65
|
*
|
|
66
66
|
* ```ts
|
|
67
67
|
* import { actorCalled } from '@serenity-js/core'
|
|
@@ -84,21 +84,21 @@ const models_1 = require("../models");
|
|
|
84
84
|
* ```
|
|
85
85
|
*
|
|
86
86
|
* ## Learn more
|
|
87
|
-
* -
|
|
88
|
-
* -
|
|
89
|
-
* -
|
|
90
|
-
* -
|
|
87
|
+
* - [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
88
|
+
* - [`MetaQuestion`](https://serenity-js.org/api/core/interface/MetaQuestion/)
|
|
89
|
+
* - [`QuestionAdapter`](https://serenity-js.org/api/core/#QuestionAdapter)
|
|
90
|
+
* - [`Question`](https://serenity-js.org/api/core/class/Question/)
|
|
91
91
|
*
|
|
92
92
|
* @group Questions
|
|
93
93
|
*/
|
|
94
94
|
class Text {
|
|
95
95
|
/**
|
|
96
|
-
* Instantiates a
|
|
97
|
-
* the
|
|
98
|
-
* the text of a single
|
|
96
|
+
* Instantiates a [`Question`](https://serenity-js.org/api/core/class/Question/) that uses
|
|
97
|
+
* the [actor's](https://serenity-js.org/api/core/class/Actor/) [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/) to retrieve
|
|
98
|
+
* the text of a single [`PageElement`](https://serenity-js.org/api/web/class/PageElement/).
|
|
99
99
|
*
|
|
100
100
|
* #### Learn more
|
|
101
|
-
* -
|
|
101
|
+
* - [`MetaQuestion`](https://serenity-js.org/api/core/interface/MetaQuestion/)
|
|
102
102
|
*
|
|
103
103
|
* @param pageElement
|
|
104
104
|
*/
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { MetaQuestionAdapter, QuestionAdapter } from '@serenity-js/core';
|
|
2
2
|
import { PageElement } from '../models';
|
|
3
3
|
/**
|
|
4
|
-
* Uses the
|
|
5
|
-
* the `value` attribute of a given
|
|
4
|
+
* Uses the [actor's](https://serenity-js.org/api/core/class/Actor/) [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/) to retrieve
|
|
5
|
+
* the `value` attribute of a given [`PageElement`](https://serenity-js.org/api/web/class/PageElement/).
|
|
6
6
|
*
|
|
7
7
|
* ## Example widget
|
|
8
8
|
* ```html
|
|
9
9
|
* <input type="text" id="username" value="Alice" />
|
|
10
10
|
* ```
|
|
11
11
|
*
|
|
12
|
-
* ## Retrieve the `value` of a given
|
|
12
|
+
* ## Retrieve the `value` of a given [`PageElement`](https://serenity-js.org/api/web/class/PageElement/)
|
|
13
13
|
*
|
|
14
14
|
* ```ts
|
|
15
15
|
* import { actorCalled } from '@serenity-js/core'
|
|
@@ -26,7 +26,7 @@ import { PageElement } from '../models';
|
|
|
26
26
|
* )
|
|
27
27
|
* ```
|
|
28
28
|
*
|
|
29
|
-
* ## Using Value as
|
|
29
|
+
* ## Using Value as [`QuestionAdapter`](https://serenity-js.org/api/core/#QuestionAdapter)
|
|
30
30
|
*
|
|
31
31
|
* ```ts
|
|
32
32
|
* import { actorCalled } from '@serenity-js/core'
|
|
@@ -47,21 +47,21 @@ import { PageElement } from '../models';
|
|
|
47
47
|
* ```
|
|
48
48
|
*
|
|
49
49
|
* ## Learn more
|
|
50
|
-
* -
|
|
51
|
-
* -
|
|
52
|
-
* -
|
|
53
|
-
* -
|
|
50
|
+
* - [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
51
|
+
* - [`MetaQuestion`](https://serenity-js.org/api/core/interface/MetaQuestion/)
|
|
52
|
+
* - [`QuestionAdapter`](https://serenity-js.org/api/core/#QuestionAdapter)
|
|
53
|
+
* - [`Question`](https://serenity-js.org/api/core/class/Question/)
|
|
54
54
|
*
|
|
55
55
|
* @group Questions
|
|
56
56
|
*/
|
|
57
57
|
export declare class Value {
|
|
58
58
|
/**
|
|
59
|
-
* Instantiates a
|
|
60
|
-
* the
|
|
61
|
-
* the `value` attribute of a given
|
|
59
|
+
* Instantiates a [`Question`](https://serenity-js.org/api/core/class/Question/) that uses
|
|
60
|
+
* the [actor's](https://serenity-js.org/api/core/class/Actor/) [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/) to retrieve
|
|
61
|
+
* the `value` attribute of a given [`PageElement`](https://serenity-js.org/api/web/class/PageElement/).
|
|
62
62
|
*
|
|
63
63
|
* #### Learn more
|
|
64
|
-
* -
|
|
64
|
+
* - [`MetaQuestion`](https://serenity-js.org/api/core/interface/MetaQuestion/)
|
|
65
65
|
*
|
|
66
66
|
* @param pageElement
|
|
67
67
|
*/
|
|
@@ -4,15 +4,15 @@ exports.Value = void 0;
|
|
|
4
4
|
const core_1 = require("@serenity-js/core");
|
|
5
5
|
const models_1 = require("../models");
|
|
6
6
|
/**
|
|
7
|
-
* Uses the
|
|
8
|
-
* the `value` attribute of a given
|
|
7
|
+
* Uses the [actor's](https://serenity-js.org/api/core/class/Actor/) [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/) to retrieve
|
|
8
|
+
* the `value` attribute of a given [`PageElement`](https://serenity-js.org/api/web/class/PageElement/).
|
|
9
9
|
*
|
|
10
10
|
* ## Example widget
|
|
11
11
|
* ```html
|
|
12
12
|
* <input type="text" id="username" value="Alice" />
|
|
13
13
|
* ```
|
|
14
14
|
*
|
|
15
|
-
* ## Retrieve the `value` of a given
|
|
15
|
+
* ## Retrieve the `value` of a given [`PageElement`](https://serenity-js.org/api/web/class/PageElement/)
|
|
16
16
|
*
|
|
17
17
|
* ```ts
|
|
18
18
|
* import { actorCalled } from '@serenity-js/core'
|
|
@@ -29,7 +29,7 @@ const models_1 = require("../models");
|
|
|
29
29
|
* )
|
|
30
30
|
* ```
|
|
31
31
|
*
|
|
32
|
-
* ## Using Value as
|
|
32
|
+
* ## Using Value as [`QuestionAdapter`](https://serenity-js.org/api/core/#QuestionAdapter)
|
|
33
33
|
*
|
|
34
34
|
* ```ts
|
|
35
35
|
* import { actorCalled } from '@serenity-js/core'
|
|
@@ -50,21 +50,21 @@ const models_1 = require("../models");
|
|
|
50
50
|
* ```
|
|
51
51
|
*
|
|
52
52
|
* ## Learn more
|
|
53
|
-
* -
|
|
54
|
-
* -
|
|
55
|
-
* -
|
|
56
|
-
* -
|
|
53
|
+
* - [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
54
|
+
* - [`MetaQuestion`](https://serenity-js.org/api/core/interface/MetaQuestion/)
|
|
55
|
+
* - [`QuestionAdapter`](https://serenity-js.org/api/core/#QuestionAdapter)
|
|
56
|
+
* - [`Question`](https://serenity-js.org/api/core/class/Question/)
|
|
57
57
|
*
|
|
58
58
|
* @group Questions
|
|
59
59
|
*/
|
|
60
60
|
class Value {
|
|
61
61
|
/**
|
|
62
|
-
* Instantiates a
|
|
63
|
-
* the
|
|
64
|
-
* the `value` attribute of a given
|
|
62
|
+
* Instantiates a [`Question`](https://serenity-js.org/api/core/class/Question/) that uses
|
|
63
|
+
* the [actor's](https://serenity-js.org/api/core/class/Actor/) [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/) to retrieve
|
|
64
|
+
* the `value` attribute of a given [`PageElement`](https://serenity-js.org/api/web/class/PageElement/).
|
|
65
65
|
*
|
|
66
66
|
* #### Learn more
|
|
67
|
-
* -
|
|
67
|
+
* - [`MetaQuestion`](https://serenity-js.org/api/core/interface/MetaQuestion/)
|
|
68
68
|
*
|
|
69
69
|
* @param pageElement
|
|
70
70
|
*/
|
|
@@ -2,8 +2,9 @@ import type { DomainEvent } from '@serenity-js/core/lib/events';
|
|
|
2
2
|
import type { Stage, StageCrewMember } from '@serenity-js/core/lib/stage';
|
|
3
3
|
import * as strategies from './strategies';
|
|
4
4
|
/**
|
|
5
|
-
* The Photographer is a
|
|
6
|
-
* using the web browser associated with the
|
|
5
|
+
* The Photographer is a [`StageCrewMember`](https://serenity-js.org/api/core/interface/StageCrewMember/) who takes screenshots
|
|
6
|
+
* using the web browser associated with the [actor](https://serenity-js.org/api/core/class/Actor/) that is
|
|
7
|
+
* currently [in the spotlight](https://serenity-js.org/api/core/function/actorInTheSpotlight/).
|
|
7
8
|
*
|
|
8
9
|
* ## Registering Photographer programmatically
|
|
9
10
|
*
|
|
@@ -49,7 +50,7 @@ import * as strategies from './strategies';
|
|
|
49
50
|
* ```
|
|
50
51
|
*
|
|
51
52
|
* #### Learn more
|
|
52
|
-
* -
|
|
53
|
+
* - [`SerenityOptions`](https://serenity-js.org/api/playwright-test/interface/SerenityOptions/)
|
|
53
54
|
*
|
|
54
55
|
* ## Using Photographer with WebdriverIO
|
|
55
56
|
*
|
|
@@ -140,11 +141,11 @@ import * as strategies from './strategies';
|
|
|
140
141
|
* ```
|
|
141
142
|
*
|
|
142
143
|
* ## Learn more
|
|
143
|
-
* -
|
|
144
|
-
* -
|
|
145
|
-
* -
|
|
146
|
-
* -
|
|
147
|
-
* -
|
|
144
|
+
* - [`Stage`](https://serenity-js.org/api/core/class/Stage/)
|
|
145
|
+
* - [`StageCrewMember`](https://serenity-js.org/api/core/interface/StageCrewMember/)
|
|
146
|
+
* - [`TakePhotosBeforeAndAfterInteractions`](https://serenity-js.org/api/web/class/TakePhotosBeforeAndAfterInteractions/)
|
|
147
|
+
* - [`TakePhotosOfFailures`](https://serenity-js.org/api/web/class/TakePhotosOfFailures/)
|
|
148
|
+
* - [`TakePhotosOfInteractions`](https://serenity-js.org/api/web/class/TakePhotosOfInteractions/)
|
|
148
149
|
*
|
|
149
150
|
* @group Stage
|
|
150
151
|
*/
|
|
@@ -152,16 +153,16 @@ export declare class Photographer implements StageCrewMember {
|
|
|
152
153
|
private readonly photoTakingStrategy;
|
|
153
154
|
private stage?;
|
|
154
155
|
/**
|
|
155
|
-
* Instantiates a new
|
|
156
|
-
* as per the specified
|
|
156
|
+
* Instantiates a new [`Photographer`](https://serenity-js.org/api/web/class/Photographer/) configured to take photos (screenshots)
|
|
157
|
+
* as per the specified [`PhotoTakingStrategy`](https://serenity-js.org/api/web/class/PhotoTakingStrategy/).
|
|
157
158
|
*
|
|
158
159
|
* @param strategy
|
|
159
|
-
* A no-arg constructor function that instantiates a
|
|
160
|
+
* A no-arg constructor function that instantiates a [`PhotoTakingStrategy`](https://serenity-js.org/api/web/class/PhotoTakingStrategy/)
|
|
160
161
|
*/
|
|
161
162
|
static whoWill(strategy: new () => strategies.PhotoTakingStrategy): StageCrewMember;
|
|
162
163
|
/**
|
|
163
|
-
* Instantiates a new
|
|
164
|
-
* as per the specified
|
|
164
|
+
* Instantiates a new [`Photographer`](https://serenity-js.org/api/web/class/Photographer/) configured to take photos (screenshots)
|
|
165
|
+
* as per the specified [`PhotoTakingStrategy`](https://serenity-js.org/api/web/class/PhotoTakingStrategy/).
|
|
165
166
|
*
|
|
166
167
|
* @param config
|
|
167
168
|
*/
|
|
@@ -170,15 +171,15 @@ export declare class Photographer implements StageCrewMember {
|
|
|
170
171
|
}): StageCrewMember;
|
|
171
172
|
constructor(photoTakingStrategy: strategies.PhotoTakingStrategy, stage?: Stage);
|
|
172
173
|
/**
|
|
173
|
-
* Assigns this
|
|
174
|
+
* Assigns this [`StageCrewMember`](https://serenity-js.org/api/core/interface/StageCrewMember/) to a given [`Stage`](https://serenity-js.org/api/core/class/Stage/).
|
|
174
175
|
*
|
|
175
176
|
* @param stage
|
|
176
|
-
* An instance of a
|
|
177
|
+
* An instance of a [`Stage`](https://serenity-js.org/api/core/class/Stage/) this [`StageCrewMember`](https://serenity-js.org/api/core/interface/StageCrewMember/) will be assigned to
|
|
177
178
|
*/
|
|
178
179
|
assignedTo(stage: Stage): StageCrewMember;
|
|
179
180
|
/**
|
|
180
|
-
* Handles
|
|
181
|
-
* this
|
|
181
|
+
* Handles [`DomainEvent`](https://serenity-js.org/api/core-events/class/DomainEvent/) objects emitted by the [`Stage`](https://serenity-js.org/api/core/class/Stage/)
|
|
182
|
+
* this [`StageCrewMember`](https://serenity-js.org/api/core/interface/StageCrewMember/) is assigned to.
|
|
182
183
|
*
|
|
183
184
|
* @param event
|
|
184
185
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Photographer.d.ts","sourceRoot":"","sources":["../../../../src/stage/crew/photographer/Photographer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE1E,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAE3C
|
|
1
|
+
{"version":3,"file":"Photographer.d.ts","sourceRoot":"","sources":["../../../../src/stage/crew/photographer/Photographer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE1E,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmJG;AACH,qBAAa,YAAa,YAAW,eAAe;IAqC5C,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,KAAK,CAAC;IApClB;;;;;;OAMG;IACH,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAU,UAAU,CAAC,mBAAmB,GAAG,eAAe;IAInF;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,IAAI,CAAC,MAAM,OAAO,UAAU,EAAE,qBAAqB,CAAC,CAAA;KAAE,GAAG,eAAe;gBAkBzF,mBAAmB,EAAE,UAAU,CAAC,mBAAmB,EAC5D,KAAK,CAAC,EAAE,KAAK;IAIzB;;;;;OAKG;IACH,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,eAAe;IAKzC;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;CAarC"}
|