@serenity-js/web 3.25.0 → 3.25.2
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 +19 -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 +5 -5
- 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
|
@@ -8,16 +8,16 @@ import { Key } from '../models';
|
|
|
8
8
|
import { PageElementInteraction } from './PageElementInteraction';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* Instructs an
|
|
11
|
+
* Instructs an [actor](https://serenity-js.org/api/core/class/Actor/) who has the [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
12
12
|
* to send a key press or a sequence of keys to a Web element.
|
|
13
13
|
*
|
|
14
14
|
* **Note:** On macOS, some keyboard shortcuts might not work
|
|
15
15
|
* with the [`devtools` protocol](https://webdriver.io/docs/automationProtocols/#devtools-protocol).
|
|
16
16
|
*
|
|
17
17
|
* For example:
|
|
18
|
-
* - to *copy*, instead of
|
|
19
|
-
* - to *cut*, instead of
|
|
20
|
-
* - to *paste*, instead of
|
|
18
|
+
* - to *copy*, instead of [`Key.Meta`](https://serenity-js.org/api/web/class/Key/#Meta)+`C`, use [`Key.Control`](https://serenity-js.org/api/web/class/Key/#Control)+[`Key.Insert`](https://serenity-js.org/api/web/class/Key/#Insert)
|
|
19
|
+
* - to *cut*, instead of [`Key.Meta`](https://serenity-js.org/api/web/class/Key/#Meta)+`X`, use [`Key.Control`](https://serenity-js.org/api/web/class/Key/#Control)+[`Key.Delete`](https://serenity-js.org/api/web/class/Key/#Delete)
|
|
20
|
+
* - to *paste*, instead of [`Key.Meta`](https://serenity-js.org/api/web/class/Key/#Meta)+`V`, use [`Key.Shift`](https://serenity-js.org/api/web/class/Key/#Shift)+[`Key.Insert`](https://serenity-js.org/api/web/class/Key/#Insert)
|
|
21
21
|
*
|
|
22
22
|
* ## Example widget
|
|
23
23
|
*
|
|
@@ -55,18 +55,18 @@ import { PageElementInteraction } from './PageElementInteraction';
|
|
|
55
55
|
*
|
|
56
56
|
* ## Learn more
|
|
57
57
|
*
|
|
58
|
-
* -
|
|
59
|
-
* -
|
|
60
|
-
* -
|
|
58
|
+
* - [`Key`](https://serenity-js.org/api/web/class/Key/)
|
|
59
|
+
* - [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
60
|
+
* - [`PageElement`](https://serenity-js.org/api/web/class/PageElement/)
|
|
61
61
|
*
|
|
62
62
|
* @group Activities
|
|
63
63
|
*/
|
|
64
64
|
export class Press extends PageElementInteraction {
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
|
-
* Instantiates an
|
|
68
|
-
* that instructs the
|
|
69
|
-
* to press a sequence of
|
|
67
|
+
* Instantiates an [interaction](https://serenity-js.org/api/core/class/Interaction/)
|
|
68
|
+
* that instructs the [actor](https://serenity-js.org/api/core/class/Actor/)
|
|
69
|
+
* to press a sequence of [keys](https://serenity-js.org/api/web/class/Key/),
|
|
70
70
|
*
|
|
71
71
|
* When no `field` is specified, the key sequence will be sent to the currently focused element,
|
|
72
72
|
* and if no element is focused - to the `document.body` to handle.
|
|
@@ -5,8 +5,8 @@ import type { PageElement } from '../models';
|
|
|
5
5
|
import { PageElementInteraction } from './PageElementInteraction';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* Instructs an
|
|
9
|
-
* to perform a right click on a given
|
|
8
|
+
* Instructs an [actor](https://serenity-js.org/api/core/class/Actor/) who has the [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
9
|
+
* to perform a right click on a given [`PageElement`](https://serenity-js.org/api/web/class/PageElement/).
|
|
10
10
|
*
|
|
11
11
|
* This is typically used to open a [custom context menu](https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event)
|
|
12
12
|
* on a given Web element, since it's not possible to interact with the standard context menu offered by your browser.
|
|
@@ -63,14 +63,14 @@ import { PageElementInteraction } from './PageElementInteraction';
|
|
|
63
63
|
*
|
|
64
64
|
* ## Learn more
|
|
65
65
|
*
|
|
66
|
-
* -
|
|
67
|
-
* -
|
|
66
|
+
* - [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
67
|
+
* - [`PageElement`](https://serenity-js.org/api/web/class/PageElement/)
|
|
68
68
|
*
|
|
69
69
|
* @group Activities
|
|
70
70
|
*/
|
|
71
71
|
export class RightClick extends PageElementInteraction {
|
|
72
72
|
/**
|
|
73
|
-
* Instantiates this
|
|
73
|
+
* Instantiates this [`Interaction`](https://serenity-js.org/api/core/class/Interaction/).
|
|
74
74
|
*
|
|
75
75
|
* @param pageElement
|
|
76
76
|
* The element to be right-clicked on
|
|
@@ -4,8 +4,8 @@ import { Interaction, the } from '@serenity-js/core';
|
|
|
4
4
|
import type { PageElement } from '../models';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Instructs an
|
|
8
|
-
* to scroll until a given
|
|
7
|
+
* Instructs an [actor](https://serenity-js.org/api/core/class/Actor/) who has the [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
8
|
+
* to scroll until a given [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) comes into view.
|
|
9
9
|
*
|
|
10
10
|
* ## Example widget
|
|
11
11
|
*
|
|
@@ -45,15 +45,15 @@ import type { PageElement } from '../models';
|
|
|
45
45
|
*
|
|
46
46
|
* ## Learn more
|
|
47
47
|
*
|
|
48
|
-
* -
|
|
49
|
-
* -
|
|
48
|
+
* - [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
49
|
+
* - [`PageElement`](https://serenity-js.org/api/web/class/PageElement/)
|
|
50
50
|
*
|
|
51
51
|
* @group Activities
|
|
52
52
|
*/
|
|
53
53
|
export class Scroll extends Interaction {
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
* Instantiates this
|
|
56
|
+
* Instantiates this [`Interaction`](https://serenity-js.org/api/core/class/Interaction/).
|
|
57
57
|
*
|
|
58
58
|
* @param pageElement
|
|
59
59
|
* The element to scroll to
|
|
@@ -6,20 +6,20 @@ import type { PageElement } from '../models';
|
|
|
6
6
|
import { SelectOption } from '../models';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Instructs an
|
|
9
|
+
* Instructs an [actor](https://serenity-js.org/api/core/class/Actor/) who has the [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
10
10
|
* to select an option from a [HTML `<select>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select),
|
|
11
11
|
* either by its display name, or by value.
|
|
12
12
|
*
|
|
13
13
|
* ## Learn more
|
|
14
|
-
* -
|
|
14
|
+
* - [`Selected`](https://serenity-js.org/api/web/class/Selected/)
|
|
15
15
|
*
|
|
16
16
|
* @group Activities
|
|
17
17
|
*/
|
|
18
18
|
export class Select {
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
-
* Instantiates an
|
|
22
|
-
* that instructs the
|
|
21
|
+
* Instantiates an [interaction](https://serenity-js.org/api/core/class/Interaction/)
|
|
22
|
+
* that instructs the [actor](https://serenity-js.org/api/core/class/Actor/)
|
|
23
23
|
* to select a single [`<option>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option)
|
|
24
24
|
* with a given [`value`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#attr-value).,
|
|
25
25
|
*
|
|
@@ -60,12 +60,12 @@ export class Select {
|
|
|
60
60
|
* ```
|
|
61
61
|
*
|
|
62
62
|
* #### Learn more
|
|
63
|
-
* -
|
|
64
|
-
* -
|
|
63
|
+
* - [`Selected.valueOf`](https://serenity-js.org/api/web/class/Selected/#valueOf)
|
|
64
|
+
* - [`PageElement`](https://serenity-js.org/api/web/class/PageElement/)
|
|
65
65
|
*
|
|
66
66
|
* @param value
|
|
67
67
|
* A value of the [`option` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option)
|
|
68
|
-
* for the
|
|
68
|
+
* for the [`Actor`](https://serenity-js.org/api/core/class/Actor/) to select
|
|
69
69
|
*/
|
|
70
70
|
static value(value: Answerable<string>): { from: (pageElement: Answerable<PageElement>) => Interaction } {
|
|
71
71
|
return {
|
|
@@ -80,8 +80,8 @@ export class Select {
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
/**
|
|
83
|
-
* Instantiates an
|
|
84
|
-
* that instructs the
|
|
83
|
+
* Instantiates an [interaction](https://serenity-js.org/api/core/class/Interaction/)
|
|
84
|
+
* that instructs the [actor](https://serenity-js.org/api/core/class/Actor/)
|
|
85
85
|
* to select multiple [`<option>` elements](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option)
|
|
86
86
|
* identified by their [`value`s](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#attr-value).
|
|
87
87
|
*
|
|
@@ -123,12 +123,12 @@ export class Select {
|
|
|
123
123
|
*
|
|
124
124
|
* #### Learn more
|
|
125
125
|
*
|
|
126
|
-
* -
|
|
127
|
-
* -
|
|
126
|
+
* - [`Selected.valuesOf`](https://serenity-js.org/api/web/class/Selected/#valuesOf)
|
|
127
|
+
* - [`PageElement`](https://serenity-js.org/api/web/class/PageElement/)
|
|
128
128
|
*
|
|
129
129
|
* @param values
|
|
130
130
|
* Values of the [`option` elements](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option)
|
|
131
|
-
* for the
|
|
131
|
+
* for the [`Actor`](https://serenity-js.org/api/core/class/Actor/) to select
|
|
132
132
|
*/
|
|
133
133
|
static values(...values: Array<Answerable<string[] | string>>): { from: (pageElement: Answerable<PageElement>) => Interaction } {
|
|
134
134
|
return {
|
|
@@ -146,8 +146,8 @@ export class Select {
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
|
-
* Instantiates an
|
|
150
|
-
* that instructs the
|
|
149
|
+
* Instantiates an [interaction](https://serenity-js.org/api/core/class/Interaction/)
|
|
150
|
+
* that instructs the [actor](https://serenity-js.org/api/core/class/Actor/)
|
|
151
151
|
* to select a single [`<option>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option)
|
|
152
152
|
* with a given description.
|
|
153
153
|
*
|
|
@@ -191,12 +191,12 @@ export class Select {
|
|
|
191
191
|
* ```
|
|
192
192
|
*
|
|
193
193
|
* #### Learn more
|
|
194
|
-
* -
|
|
195
|
-
* -
|
|
194
|
+
* - [`Selected.optionIn`](https://serenity-js.org/api/web/class/Selected/#optionIn)
|
|
195
|
+
* - [`PageElement`](https://serenity-js.org/api/web/class/PageElement/)
|
|
196
196
|
*
|
|
197
197
|
* @param value
|
|
198
198
|
* Text of the [`option` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option)
|
|
199
|
-
* for the
|
|
199
|
+
* for the [`Actor`](https://serenity-js.org/api/core/class/Actor/) to select
|
|
200
200
|
*/
|
|
201
201
|
static option(value: Answerable<string>): { from: (pageElement: Answerable<PageElement>) => Interaction } {
|
|
202
202
|
return {
|
|
@@ -211,8 +211,8 @@ export class Select {
|
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
/**
|
|
214
|
-
* Instantiates an
|
|
215
|
-
* that instructs the
|
|
214
|
+
* Instantiates an [interaction](https://serenity-js.org/api/core/class/Interaction/)
|
|
215
|
+
* that instructs the [actor](https://serenity-js.org/api/core/class/Actor/)
|
|
216
216
|
* to select multiple [`<option>` elements](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option)
|
|
217
217
|
* identified by their descriptions.
|
|
218
218
|
*
|
|
@@ -257,12 +257,12 @@ export class Select {
|
|
|
257
257
|
* ```
|
|
258
258
|
*
|
|
259
259
|
* #### Learn more
|
|
260
|
-
* -
|
|
261
|
-
* -
|
|
260
|
+
* - [`Selected.optionsIn`](https://serenity-js.org/api/web/class/Selected/#optionsIn)
|
|
261
|
+
* - [`PageElement`](https://serenity-js.org/api/web/class/PageElement/)
|
|
262
262
|
*
|
|
263
263
|
* @param values
|
|
264
264
|
* Text of the [`option` elements ](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option)
|
|
265
|
-
* for the
|
|
265
|
+
* for the [`Actor`](https://serenity-js.org/api/core/class/Actor/) to select
|
|
266
266
|
*/
|
|
267
267
|
static options(...values: Array<Answerable<string[] | string>>): { from: (pageElement: Answerable<PageElement>) => Interaction } {
|
|
268
268
|
return {
|
|
@@ -4,17 +4,17 @@ import { Interaction, Task, the } from '@serenity-js/core';
|
|
|
4
4
|
import type { Switchable } from '../models';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Instructs an
|
|
8
|
-
* to switch the context for future activities to a
|
|
7
|
+
* Instructs an [actor](https://serenity-js.org/api/core/class/Actor/) who has the [ability](https://serenity-js.org/api/core/class/Ability/) to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
8
|
+
* to switch the context for future activities to a [`Switchable`](https://serenity-js.org/api/web/interface/Switchable/), such as a [`Page`](https://serenity-js.org/api/web/class/Page/) or a [`PageElement`](https://serenity-js.org/api/web/class/PageElement/).
|
|
9
9
|
*
|
|
10
|
-
* Please note that when the
|
|
11
|
-
* using
|
|
10
|
+
* Please note that when the [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) implementing [`Switchable`](https://serenity-js.org/api/web/interface/Switchable/) represents an [`iframe`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe),
|
|
11
|
+
* using [`Switch`](https://serenity-js.org/api/web/class/Switch/) will result in switching the top-level browsing context to that [`iframe`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe).
|
|
12
12
|
*
|
|
13
|
-
* When the
|
|
14
|
-
* using
|
|
13
|
+
* When the [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) represents any other [HTMLElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement),
|
|
14
|
+
* using [`Switch`](https://serenity-js.org/api/web/class/Switch/) sets [`HTMLElement#focus`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus)
|
|
15
15
|
* on the specified element. Assuming it can be focused.
|
|
16
16
|
*
|
|
17
|
-
* **Note:** The focused element is the element which will receive keyboard
|
|
17
|
+
* **Note:** The focused element is the element which will receive keyboard [press](https://serenity-js.org/api/web/class/Press/) events by default.
|
|
18
18
|
*
|
|
19
19
|
* ## Perform activities in the context of an iframe
|
|
20
20
|
*
|
|
@@ -97,18 +97,18 @@ import type { Switchable } from '../models';
|
|
|
97
97
|
*
|
|
98
98
|
* ## Learn more
|
|
99
99
|
*
|
|
100
|
-
* -
|
|
101
|
-
* -
|
|
102
|
-
* -
|
|
100
|
+
* - [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
101
|
+
* - [`Switchable`](https://serenity-js.org/api/web/interface/Switchable/)
|
|
102
|
+
* - [`SwitchableOrigin`](https://serenity-js.org/api/web/interface/SwitchableOrigin/)
|
|
103
103
|
*
|
|
104
104
|
* @group Activities
|
|
105
105
|
*/
|
|
106
106
|
export class Switch extends Interaction {
|
|
107
107
|
|
|
108
108
|
/**
|
|
109
|
-
* Instructs the
|
|
110
|
-
* to switch the context for future activities to a
|
|
111
|
-
* such as a
|
|
109
|
+
* Instructs the [`Actor`](https://serenity-js.org/api/core/class/Actor/)
|
|
110
|
+
* to switch the context for future activities to a [`Switchable`](https://serenity-js.org/api/web/interface/Switchable/),
|
|
111
|
+
* such as a [`Page`](https://serenity-js.org/api/web/class/Page/) or a [`PageElement`](https://serenity-js.org/api/web/class/PageElement/).
|
|
112
112
|
*
|
|
113
113
|
* @param switchable
|
|
114
114
|
*/
|
|
@@ -121,9 +121,9 @@ export class Switch extends Interaction {
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
|
-
* Instructs the
|
|
125
|
-
* to switch the context for future activities to a
|
|
126
|
-
* such as a
|
|
124
|
+
* Instructs the [`Actor`](https://serenity-js.org/api/core/class/Actor/)
|
|
125
|
+
* to switch the context for future activities to a [`Switchable`](https://serenity-js.org/api/web/interface/Switchable/),
|
|
126
|
+
* such as a [`Page`](https://serenity-js.org/api/web/class/Page/) or a [`PageElement`](https://serenity-js.org/api/web/class/PageElement/),
|
|
127
127
|
* perform a sequence of `activities`, and then switch the context back.
|
|
128
128
|
*
|
|
129
129
|
* @param activities
|
|
@@ -5,10 +5,12 @@ import { Name, Photo } from '@serenity-js/core/lib/model';
|
|
|
5
5
|
import { BrowseTheWeb } from '../abilities';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* Instructs an
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* Instructs an [actor](https://serenity-js.org/api/core/class/Actor/)
|
|
9
|
+
* who has the [ability](https://serenity-js.org/api/core/class/Ability/)
|
|
10
|
+
* to [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
11
|
+
* to take a screenshot and emit an artifact,
|
|
12
|
+
* which can then be persisted by [`ArtifactArchiver`](https://serenity-js.org/api/core/class/ArtifactArchiver/)
|
|
13
|
+
* and reported by [Serenity BDD reporter](https://serenity-js.org/api/serenity-bdd).
|
|
12
14
|
*
|
|
13
15
|
* #### Taking a screenshot
|
|
14
16
|
*
|
|
@@ -25,20 +27,19 @@ import { BrowseTheWeb } from '../abilities';
|
|
|
25
27
|
*
|
|
26
28
|
* ## Learn more
|
|
27
29
|
*
|
|
28
|
-
* -
|
|
29
|
-
* -
|
|
30
|
-
* -
|
|
31
|
-
* - {@apilink ArtifactArchiver}
|
|
30
|
+
* - [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
31
|
+
* - [`CollectsArtifacts`](https://serenity-js.org/api/core/interface/CollectsArtifacts/)
|
|
32
|
+
* - [`ArtifactArchiver`](https://serenity-js.org/api/core/class/ArtifactArchiver/)
|
|
32
33
|
*
|
|
33
34
|
* @group Activities
|
|
34
35
|
*/
|
|
35
36
|
export class TakeScreenshot extends Interaction {
|
|
36
37
|
|
|
37
38
|
/**
|
|
38
|
-
* Instantiates this
|
|
39
|
+
* Instantiates this [`Interaction`](https://serenity-js.org/api/core/class/Interaction/).
|
|
39
40
|
*
|
|
40
41
|
* @param name
|
|
41
|
-
* The name to give the emitted
|
|
42
|
+
* The name to give the emitted artifact
|
|
42
43
|
*/
|
|
43
44
|
static of(name: Answerable<string>): Interaction {
|
|
44
45
|
return new TakeScreenshot(name);
|
|
@@ -27,17 +27,17 @@ export abstract class BrowsingSession<Page_Type extends Page> {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* Opens a new browser page and associates it with a
|
|
30
|
+
* Opens a new browser page and associates it with a [`Page`](https://serenity-js.org/api/web/class/Page/) object.
|
|
31
31
|
*/
|
|
32
32
|
protected abstract registerCurrentPage(): Promise<Page_Type>;
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
* Returns
|
|
35
|
+
* Returns [basic meta-data](https://serenity-js.org/api/web/interface/BrowserCapabilities/) about the browser associated with this browsing session.
|
|
36
36
|
*/
|
|
37
37
|
public abstract browserCapabilities(): Promise<BrowserCapabilities>;
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
|
-
* Returns a
|
|
40
|
+
* Returns a [`Page`](https://serenity-js.org/api/web/class/Page/) representing the currently active top-level browsing context.
|
|
41
41
|
*/
|
|
42
42
|
async currentPage(): Promise<Page_Type> {
|
|
43
43
|
if (! this.currentBrowserPage || ! await this.currentBrowserPage.isPresent()) {
|
|
@@ -48,7 +48,7 @@ export abstract class BrowsingSession<Page_Type extends Page> {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
* Registers specified
|
|
51
|
+
* Registers specified [pages](https://serenity-js.org/api/web/class/Page/) to be managed by this [`BrowsingSession`](https://serenity-js.org/api/web/class/BrowsingSession/).
|
|
52
52
|
*
|
|
53
53
|
* @param pages
|
|
54
54
|
*/
|
|
@@ -59,7 +59,7 @@ export abstract class BrowsingSession<Page_Type extends Page> {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
|
-
* Informs this
|
|
62
|
+
* Informs this [`BrowsingSession`](https://serenity-js.org/api/web/class/BrowsingSession/) that it should no longer manage [pages](https://serenity-js.org/api/web/class/Page/)
|
|
63
63
|
* identified by the given `pageIds`.
|
|
64
64
|
*
|
|
65
65
|
* @param pageIds
|
|
@@ -71,7 +71,7 @@ export abstract class BrowsingSession<Page_Type extends Page> {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
|
-
* Returns a
|
|
74
|
+
* Returns a [pages](https://serenity-js.org/api/web/class/Page/) representing all the available
|
|
75
75
|
* top-level browsing context, e.g. all the open browser tabs.
|
|
76
76
|
*/
|
|
77
77
|
async allPages(): Promise<Array<Page_Type>> {
|
|
@@ -79,14 +79,14 @@ export abstract class BrowsingSession<Page_Type extends Page> {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
|
-
* Returns the ids of any
|
|
82
|
+
* Returns the ids of any [pages](https://serenity-js.org/api/web/class/Page/) this [`BrowsingSession`](https://serenity-js.org/api/web/class/BrowsingSession/) is aware of.
|
|
83
83
|
*/
|
|
84
84
|
registeredPageIds(): Array<CorrelationId> {
|
|
85
85
|
return Array.from(this.pages.keys());
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
|
-
* Informs the
|
|
89
|
+
* Informs the [`BrowsingSession`](https://serenity-js.org/api/web/class/BrowsingSession/) that the "current page" has changed to `page`.
|
|
90
90
|
*
|
|
91
91
|
* Please note that different Web integration tools have a different definition of what a "current page" is.
|
|
92
92
|
* For example, Selenium or WebdriverIO use a single "focused" window that a developer
|
|
@@ -8,7 +8,7 @@ import { BrowseTheWeb } from '../abilities';
|
|
|
8
8
|
import type { CookieData } from './CookieData';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* A Screenplay Pattern-style model responsible for managing cookies available to the current
|
|
11
|
+
* A Screenplay Pattern-style model responsible for managing cookies available to the current [`Page`](https://serenity-js.org/api/web/class/Page/).
|
|
12
12
|
*
|
|
13
13
|
* ## Checking if a cookie exists
|
|
14
14
|
*
|
|
@@ -69,15 +69,15 @@ import type { CookieData } from './CookieData';
|
|
|
69
69
|
* ```
|
|
70
70
|
*
|
|
71
71
|
* ## Learn more
|
|
72
|
-
* -
|
|
73
|
-
* -
|
|
72
|
+
* - [`CookieData`](https://serenity-js.org/api/web/interface/CookieData/)
|
|
73
|
+
* - [`Page.cookie`](https://serenity-js.org/api/web/class/Page/#cookie)
|
|
74
74
|
*
|
|
75
75
|
* @group Models
|
|
76
76
|
*/
|
|
77
77
|
export abstract class Cookie implements Optional {
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
|
-
* Creates a
|
|
80
|
+
* Creates a [`QuestionAdapter`](https://serenity-js.org/api/core/#QuestionAdapter) that resolves to [`Cookie`](https://serenity-js.org/api/web/class/Cookie/) identified by `name`.
|
|
81
81
|
*
|
|
82
82
|
* @param name
|
|
83
83
|
*/
|
|
@@ -90,7 +90,7 @@ export abstract class Cookie implements Optional {
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
|
-
* Sets a cookie for the current
|
|
93
|
+
* Sets a cookie for the current [`Page`](https://serenity-js.org/api/web/class/Page/). Note that [`CookieData`](https://serenity-js.org/api/web/interface/CookieData/) can be either a plain-old JavaScript object, or an [`Answerable`](https://serenity-js.org/api/core/#Answerable) [`WithAnswerableProperties`](https://serenity-js.org/api/core/#WithAnswerableProperties).
|
|
94
94
|
*
|
|
95
95
|
* :::info
|
|
96
96
|
* Make sure that the actor performing this interaction is on the page that should receive the cookie.
|
|
@@ -122,7 +122,7 @@ export abstract class Cookie implements Optional {
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
/**
|
|
125
|
-
* Creates an
|
|
125
|
+
* Creates an [interaction](https://serenity-js.org/api/core/class/Interaction/) to delete all cookies available to the current [`Page`](https://serenity-js.org/api/web/class/Page/)..
|
|
126
126
|
*/
|
|
127
127
|
static deleteAll(): Interaction {
|
|
128
128
|
return Interaction.where(`#actor deletes all cookies`, async actor => {
|
|
@@ -148,7 +148,7 @@ export abstract class Cookie implements Optional {
|
|
|
148
148
|
* Checks if a given cookie is set.
|
|
149
149
|
*
|
|
150
150
|
* #### Learn more
|
|
151
|
-
* -
|
|
151
|
+
* - [`Optional`](https://serenity-js.org/api/core/interface/Optional/)
|
|
152
152
|
*/
|
|
153
153
|
async isPresent(): Promise<boolean> {
|
|
154
154
|
try {
|
|
@@ -214,7 +214,7 @@ export abstract class Cookie implements Optional {
|
|
|
214
214
|
* Returns the expiry date of a given cookie
|
|
215
215
|
*
|
|
216
216
|
* #### Learn more
|
|
217
|
-
* -
|
|
217
|
+
* - [`Timestamp`](https://serenity-js.org/api/core/class/Timestamp/)
|
|
218
218
|
*/
|
|
219
219
|
async expiry(): Promise<Timestamp> {
|
|
220
220
|
const cookie = await this.lazyLoadCookie();
|
|
@@ -232,12 +232,12 @@ export abstract class Cookie implements Optional {
|
|
|
232
232
|
* This method is to be implemented by test integration tool-specific adapters.
|
|
233
233
|
*
|
|
234
234
|
* **Please note**: you don't need to implement any response caching here
|
|
235
|
-
* since it is covered by
|
|
235
|
+
* since it is covered by [`Cookie`](https://serenity-js.org/api/web/class/Cookie/).lazyLoadCookie} method.
|
|
236
236
|
*/
|
|
237
237
|
protected abstract read(): Promise<CookieData>;
|
|
238
238
|
|
|
239
239
|
/**
|
|
240
|
-
* Invokes
|
|
240
|
+
* Invokes `Cookie.read` and caches the result in memory.
|
|
241
241
|
*/
|
|
242
242
|
private async lazyLoadCookie(): Promise<CookieData> {
|
|
243
243
|
if (! this.cookie) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { Timestamp } from '@serenity-js/core';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* A data structure describing a
|
|
4
|
+
* A data structure describing a [`Cookie`](https://serenity-js.org/api/web/class/Cookie/) to be set, or one that's been read.
|
|
5
5
|
*
|
|
6
6
|
* ## Learn more
|
|
7
7
|
*
|
|
8
|
-
* -
|
|
9
|
-
* -
|
|
8
|
+
* - [`Cookie`](https://serenity-js.org/api/web/class/Cookie/)
|
|
9
|
+
* - [`Page.cookie`](https://serenity-js.org/api/web/class/Page/#cookie)
|
|
10
10
|
*
|
|
11
11
|
* @group Models
|
|
12
12
|
*/
|
|
@@ -35,7 +35,7 @@ export interface CookieData {
|
|
|
35
35
|
path?: string;
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
|
-
* The
|
|
38
|
+
* The [timestamp](https://serenity-js.org/api/core/class/Timestamp/) describing the point in time when this cookie expires.
|
|
39
39
|
*/
|
|
40
40
|
expiry?: Timestamp;
|
|
41
41
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Represents keyboard keys that aren't text, and that can be used with the
|
|
2
|
+
* Represents keyboard keys that aren't text, and that can be used with the [interaction](https://serenity-js.org/api/core/class/Interaction/) to [`Press`](https://serenity-js.org/api/web/class/Press/).
|
|
3
3
|
*
|
|
4
|
-
* **Note:** Modifier keys like
|
|
4
|
+
* **Note:** Modifier keys like [`Key.Shift`](https://serenity-js.org/api/web/class/Key/#Shift), [`Key.Alt`](https://serenity-js.org/api/web/class/Key/#Alt) and [`Key.Meta`](https://serenity-js.org/api/web/class/Key/#Meta) (a.k.a. "Command" on Mac) will stay pressed,
|
|
5
5
|
* so there's no need to depress them.
|
|
6
6
|
*
|
|
7
7
|
* ## Learn more
|
|
8
8
|
*
|
|
9
|
-
* -
|
|
10
|
-
* -
|
|
9
|
+
* - [`Press`](https://serenity-js.org/api/web/class/Press/)
|
|
10
|
+
* - [`Page.sendKeys`](https://serenity-js.org/api/web/class/Page/#sendKeys)
|
|
11
11
|
* - [W3C WebDriver Spec: Keyboard Actions](https://w3c.github.io/webdriver/webdriver-spec.html#keyboard-actions)
|
|
12
12
|
* - [Selenium WebDriver: Inputs](https://github.com/SeleniumHQ/selenium/blob/trunk/javascript/node/selenium-webdriver/lib/input.js#L46)
|
|
13
13
|
* - [WebdriverIO: Constants](https://github.com/webdriverio/webdriverio/blob/main/packages/wdio-utils/src/constants.ts#L5)
|
|
@@ -7,14 +7,14 @@ import { RootLocator } from './RootLocator';
|
|
|
7
7
|
import { ByCss, ById, ByTagName, type Selector } from './selectors';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
* within the
|
|
10
|
+
* [`Locator`](https://serenity-js.org/api/web/class/Locator/) uses a [`Selector`](https://serenity-js.org/api/web/class/Selector/) to locate a [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) or [`PageElement`](https://serenity-js.org/api/web/class/PageElements/)
|
|
11
|
+
* within the [`Page`](https://serenity-js.org/api/web/class/Page/).
|
|
12
12
|
*
|
|
13
13
|
* ## Learn more
|
|
14
|
-
* -
|
|
15
|
-
* -
|
|
16
|
-
* -
|
|
17
|
-
* -
|
|
14
|
+
* - [`RootLocator`](https://serenity-js.org/api/web/class/RootLocator/)
|
|
15
|
+
* - [`Page.locate`](https://serenity-js.org/api/web/class/Page/#locate)
|
|
16
|
+
* - [`PageElement`](https://serenity-js.org/api/web/class/PageElement/)
|
|
17
|
+
* - [`PageElement`](https://serenity-js.org/api/web/class/PageElements/)
|
|
18
18
|
*
|
|
19
19
|
* @group Models
|
|
20
20
|
*/
|
|
@@ -50,10 +50,10 @@ export abstract class Locator<Native_Element_Type, Native_Selector_Type = any>
|
|
|
50
50
|
abstract locate(child: Locator<Native_Element_Type>): Locator<Native_Element_Type>;
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
|
-
* Expresses
|
|
53
|
+
* Expresses [`ByCss`](https://serenity-js.org/api/web/class/ByCss/), [`ById`](https://serenity-js.org/api/web/class/ById/), or [`ByTagName`](https://serenity-js.org/api/web/class/ByTagName/) as a [`ByCss`](https://serenity-js.org/api/web/class/ByCss/) selector.
|
|
54
54
|
*
|
|
55
55
|
* @throws LogicError
|
|
56
|
-
* if the `selector` can't be expressed as
|
|
56
|
+
* if the `selector` can't be expressed as [`ByCss`](https://serenity-js.org/api/web/class/ByCss/)
|
|
57
57
|
*
|
|
58
58
|
* @param selector
|
|
59
59
|
* @protected
|