@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
|
@@ -6,15 +6,15 @@ import { PageElementsLocator } from './PageElementsLocator';
|
|
|
6
6
|
import type { Selector } from './selectors';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Uses the
|
|
10
|
-
* a group of Web elements located by
|
|
9
|
+
* 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 identify
|
|
10
|
+
* a group of Web elements located by [`Selector`](https://serenity-js.org/api/web/class/Selector/).
|
|
11
11
|
*
|
|
12
12
|
* ## Learn more
|
|
13
13
|
*
|
|
14
|
-
* - [Page Element Query Language](/handbook/web-testing/page-element-query-language)
|
|
15
|
-
* -
|
|
16
|
-
* -
|
|
17
|
-
* -
|
|
14
|
+
* - [Page Element Query Language](https://serenity-js.org/handbook/web-testing/page-element-query-language)
|
|
15
|
+
* - [`Actor`](https://serenity-js.org/api/core/class/Actor/)}
|
|
16
|
+
* - [`List`](https://serenity-js.org/api/core/class/List/)
|
|
17
|
+
* - [`ChainableMetaQuestion`](https://serenity-js.org/api/core/interface/ChainableMetaQuestion/)
|
|
18
18
|
*
|
|
19
19
|
* @group Models
|
|
20
20
|
*/
|
|
@@ -3,14 +3,14 @@ import { inspectedObject } from '@serenity-js/core/lib/io';
|
|
|
3
3
|
import * as util from 'util'; // eslint-disable-line unicorn/import-style
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* [`RootLocator`](https://serenity-js.org/api/web/class/RootLocator/) represents the context in which [`Locator`](https://serenity-js.org/api/web/class/Locator/) looks for [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) or [`PageElement`](https://serenity-js.org/api/web/class/PageElements/).
|
|
7
7
|
* This context is either a parent element, or some representation of the top-level browsing context.
|
|
8
8
|
*
|
|
9
9
|
* ## Learn more
|
|
10
|
-
* -
|
|
11
|
-
* -
|
|
12
|
-
* -
|
|
13
|
-
* -
|
|
10
|
+
* - [`Locator`](https://serenity-js.org/api/web/class/Locator/)
|
|
11
|
+
* - [`Page.locate`](https://serenity-js.org/api/web/class/Page/#locate)
|
|
12
|
+
* - [`PageElement`](https://serenity-js.org/api/web/class/PageElement/)
|
|
13
|
+
* - [`PageElement`](https://serenity-js.org/api/web/class/PageElements/)
|
|
14
14
|
*
|
|
15
15
|
* @group Models
|
|
16
16
|
*/
|
|
@@ -6,10 +6,10 @@ import { TinyType } from 'tiny-types';
|
|
|
6
6
|
*
|
|
7
7
|
* ## Learn more
|
|
8
8
|
*
|
|
9
|
-
* -
|
|
10
|
-
* -
|
|
11
|
-
* -
|
|
12
|
-
* -
|
|
9
|
+
* - [`Select`](https://serenity-js.org/api/web/class/Select/)
|
|
10
|
+
* - [`Selected`](https://serenity-js.org/api/web/class/Selected/)
|
|
11
|
+
* - [`PageElement.selectOptions`](https://serenity-js.org/api/web/class/PageElement/#selectOptions)
|
|
12
|
+
* - [`PageElement.selectedOptions`](https://serenity-js.org/api/web/class/PageElement/#selectedOptions)
|
|
13
13
|
*
|
|
14
14
|
* @group Models
|
|
15
15
|
*/
|
|
@@ -2,14 +2,14 @@ import type { SwitchableOrigin } from './SwitchableOrigin';
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Describes a Serenity/JS model object that can be switched _to_ and switched back _from_
|
|
5
|
-
* using the
|
|
5
|
+
* using the [task](https://serenity-js.org/api/core/class/Task/) to [`Switch`](https://serenity-js.org/api/web/class/Switch/).
|
|
6
6
|
*
|
|
7
|
-
* Examples of switchable models include a
|
|
7
|
+
* Examples of switchable models include a [`Page`](https://serenity-js.org/api/web/class/Page/) and [`PageElement`](https://serenity-js.org/api/web/class/PageElement/).
|
|
8
8
|
*
|
|
9
9
|
* ## Learn more
|
|
10
|
-
* -
|
|
11
|
-
* -
|
|
12
|
-
* -
|
|
10
|
+
* - [`Page`](https://serenity-js.org/api/web/class/Page/)
|
|
11
|
+
* - [`PageElement`](https://serenity-js.org/api/web/class/PageElement/)
|
|
12
|
+
* - [`Switch`](https://serenity-js.org/api/web/class/Switch/)
|
|
13
13
|
*
|
|
14
14
|
* @group Models
|
|
15
15
|
*/
|
|
@@ -17,7 +17,7 @@ export interface Switchable {
|
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Switches the context to the object implementing this interface
|
|
20
|
-
* and returns
|
|
20
|
+
* and returns [`SwitchableOrigin`](https://serenity-js.org/api/web/interface/SwitchableOrigin/) that allows for the context to be switched
|
|
21
21
|
* back when needed.
|
|
22
22
|
*/
|
|
23
23
|
switchTo(): Promise<SwitchableOrigin>;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Enables the
|
|
2
|
+
* Enables the [`Task`](https://serenity-js.org/api/core/class/Task/) to [`Switch`](https://serenity-js.org/api/web/class/Switch/) to perform a sequence of activities
|
|
3
3
|
* and switch back to the original context afterwards.
|
|
4
4
|
*
|
|
5
5
|
* ## Learn more
|
|
6
6
|
*
|
|
7
|
-
* -
|
|
8
|
-
* -
|
|
7
|
+
* - [`Switch`](https://serenity-js.org/api/web/class/Switch/)
|
|
8
|
+
* - [`Switchable`](https://serenity-js.org/api/web/interface/Switchable/)
|
|
9
9
|
*
|
|
10
10
|
* @group Models
|
|
11
11
|
*/
|
|
12
12
|
export interface SwitchableOrigin {
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* Switches the context back to the original
|
|
15
|
+
* Switches the context back to the original [`Switchable`](https://serenity-js.org/api/web/interface/Switchable/)
|
|
16
16
|
*/
|
|
17
17
|
switchBack(): Promise<void>;
|
|
18
18
|
}
|
|
@@ -4,10 +4,10 @@ import { ModalDialog } from './ModalDialog';
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* `AbsentModalDialog` is a [null object](https://en.wikipedia.org/wiki/Null_object_pattern)
|
|
7
|
-
* representing a
|
|
7
|
+
* representing a [`ModalDialog`](https://serenity-js.org/api/web/class/ModalDialog/) that hasn't appeared yet.
|
|
8
8
|
*
|
|
9
9
|
* ## Learn more
|
|
10
|
-
* -
|
|
10
|
+
* - [`ModalDialog`](https://serenity-js.org/api/web/class/ModalDialog/)
|
|
11
11
|
*
|
|
12
12
|
* @group Models
|
|
13
13
|
*/
|
|
@@ -3,11 +3,11 @@ import { ensure, isDefined } from 'tiny-types';
|
|
|
3
3
|
import { ModalDialog } from './ModalDialog';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* `AcceptedModalDialog` represents a
|
|
7
|
-
* via
|
|
6
|
+
* `AcceptedModalDialog` represents a [`ModalDialog`](https://serenity-js.org/api/web/class/ModalDialog/) that has been accepted
|
|
7
|
+
* via [`ModalDialog.acceptNext`](https://serenity-js.org/api/web/class/ModalDialog/#acceptNext).
|
|
8
8
|
*
|
|
9
9
|
* ## Learn more
|
|
10
|
-
* -
|
|
10
|
+
* - [`ModalDialog`](https://serenity-js.org/api/web/class/ModalDialog/)
|
|
11
11
|
*
|
|
12
12
|
* @group Models
|
|
13
13
|
*/
|
|
@@ -3,11 +3,11 @@ import { ensure, isDefined } from 'tiny-types';
|
|
|
3
3
|
import { ModalDialog } from './ModalDialog';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* `DismissedModalDialog` represents a
|
|
7
|
-
* via
|
|
6
|
+
* `DismissedModalDialog` represents a [`ModalDialog`](https://serenity-js.org/api/web/class/ModalDialog/) that has been dismissed
|
|
7
|
+
* via [`ModalDialog.dismissNext`](https://serenity-js.org/api/web/class/ModalDialog/#dismissNext).
|
|
8
8
|
*
|
|
9
9
|
* ## Learn more
|
|
10
|
-
* -
|
|
10
|
+
* - [`ModalDialog`](https://serenity-js.org/api/web/class/ModalDialog/)
|
|
11
11
|
*
|
|
12
12
|
* @group Models
|
|
13
13
|
*/
|
|
@@ -14,7 +14,10 @@ import { Page } from '../Page';
|
|
|
14
14
|
* consistent across the various Web integration tools (such as Playwright, Puppeteer,
|
|
15
15
|
* WebdriverIO or Selenium), Serenity/JS works as follows:
|
|
16
16
|
* - Serenity/JS dismisses any modal dialogs by default and stores their message so that it can be asserted on.
|
|
17
|
-
* - This behaviour can be changed by invoking
|
|
17
|
+
* - This behaviour can be changed by invoking [`ModalDialog.acceptNext`](https://serenity-js.org/api/web/class/ModalDialog/#acceptNext),
|
|
18
|
+
* [`ModalDialog.acceptNextWithValue`](https://serenity-js.org/api/web/class/ModalDialog/#acceptNextWithValue),
|
|
19
|
+
* or [`ModalDialog.dismissNext`](https://serenity-js.org/api/web/class/ModalDialog/#dismissNext)
|
|
20
|
+
* before the dialog is triggered, as per the below examples.
|
|
18
21
|
* - Serenity/JS also allows you to `Wait.until(ModalDialog, isPresent())` so that you can synchronise your tests
|
|
19
22
|
* with modal dialogs that appear after a delay.
|
|
20
23
|
*
|
|
@@ -93,7 +96,7 @@ import { Page } from '../Page';
|
|
|
93
96
|
* ```
|
|
94
97
|
*
|
|
95
98
|
* ## Learn more
|
|
96
|
-
* -
|
|
99
|
+
* - [`Optional`](https://serenity-js.org/api/core/interface/Optional/)
|
|
97
100
|
*
|
|
98
101
|
* @group Models
|
|
99
102
|
*/
|
|
@@ -126,7 +129,7 @@ export abstract class ModalDialog implements Optional {
|
|
|
126
129
|
}
|
|
127
130
|
|
|
128
131
|
/**
|
|
129
|
-
* Produces an
|
|
132
|
+
* Produces an [interaction](https://serenity-js.org/api/core/class/Interaction/) that invokes [`ModalDialog.acceptNext`](https://serenity-js.org/api/web/class/ModalDialog/#acceptNext).
|
|
130
133
|
*/
|
|
131
134
|
static acceptNext(): Interaction {
|
|
132
135
|
return Page.current().modalDialog().acceptNext()
|
|
@@ -134,7 +137,7 @@ export abstract class ModalDialog implements Optional {
|
|
|
134
137
|
}
|
|
135
138
|
|
|
136
139
|
/**
|
|
137
|
-
* Produces an
|
|
140
|
+
* Produces an [interaction](https://serenity-js.org/api/core/class/Interaction/) that invokes [`ModalDialog.acceptNextWithValue`](https://serenity-js.org/api/web/class/ModalDialog/#acceptNextWithValue).
|
|
138
141
|
*
|
|
139
142
|
* @param value
|
|
140
143
|
*/
|
|
@@ -144,7 +147,7 @@ export abstract class ModalDialog implements Optional {
|
|
|
144
147
|
}
|
|
145
148
|
|
|
146
149
|
/**
|
|
147
|
-
* Produces an
|
|
150
|
+
* Produces an [interaction](https://serenity-js.org/api/core/class/Interaction/) that invokes [`ModalDialog.dismissNext`](https://serenity-js.org/api/web/class/ModalDialog/#dismissNext).
|
|
148
151
|
*/
|
|
149
152
|
static dismissNext(): Interaction {
|
|
150
153
|
return Page.current().modalDialog().dismissNext()
|
|
@@ -152,7 +155,7 @@ export abstract class ModalDialog implements Optional {
|
|
|
152
155
|
}
|
|
153
156
|
|
|
154
157
|
/**
|
|
155
|
-
*
|
|
158
|
+
* [`QuestionAdapter`](https://serenity-js.org/api/core/#QuestionAdapter) that resolves to [`ModalDialog.message`](https://serenity-js.org/api/web/class/ModalDialog/#message) for the current [`Page`](https://serenity-js.org/api/web/class/Page/).
|
|
156
159
|
*/
|
|
157
160
|
static lastDialogMessage(): QuestionAdapter<string> {
|
|
158
161
|
return Page.current().modalDialog().last().message()
|
|
@@ -160,7 +163,7 @@ export abstract class ModalDialog implements Optional {
|
|
|
160
163
|
}
|
|
161
164
|
|
|
162
165
|
/**
|
|
163
|
-
*
|
|
166
|
+
* [`QuestionAdapter`](https://serenity-js.org/api/core/#QuestionAdapter) that resolves to [`ModalDialog.state`](https://serenity-js.org/api/web/class/ModalDialog/#state) for the current [`Page`](https://serenity-js.org/api/web/class/Page/).
|
|
164
167
|
*/
|
|
165
168
|
static lastDialogState(): QuestionAdapter<string> {
|
|
166
169
|
return Page.current().modalDialog().last().state()
|
|
@@ -169,12 +172,12 @@ export abstract class ModalDialog implements Optional {
|
|
|
169
172
|
|
|
170
173
|
/**
|
|
171
174
|
* Returns the message of the last modal dialog handled,
|
|
172
|
-
* or rejects the promise with a
|
|
175
|
+
* or rejects the promise with a [`LogicError`](https://serenity-js.org/api/core/class/LogicError/)
|
|
173
176
|
* when no modal dialogs have been observed yet.
|
|
174
177
|
*
|
|
175
178
|
* @returns
|
|
176
179
|
* Message of the last handled dialog, or a `Promise`
|
|
177
|
-
* rejected with a
|
|
180
|
+
* rejected with a [`LogicError`](https://serenity-js.org/api/core/class/LogicError/)
|
|
178
181
|
* when no dialog has been handled yet.
|
|
179
182
|
*/
|
|
180
183
|
abstract message(): Promise<string>;
|
|
@@ -4,12 +4,12 @@ import { AbsentModalDialog } from './AbsentModalDialog';
|
|
|
4
4
|
import type { ModalDialog } from './ModalDialog';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Represent the strategy to use with any upcoming
|
|
7
|
+
* Represent the strategy to use with any upcoming [`ModalDialog`](https://serenity-js.org/api/web/class/ModalDialog/) windows.
|
|
8
8
|
*
|
|
9
9
|
* ## Learn more
|
|
10
10
|
*
|
|
11
|
-
* -
|
|
12
|
-
* -
|
|
11
|
+
* - [`ModalDialog`](https://serenity-js.org/api/web/class/ModalDialog/)
|
|
12
|
+
* - [`Page.modalDialog`](https://serenity-js.org/api/web/class/Page/#modalDialog)
|
|
13
13
|
*
|
|
14
14
|
* @group Models
|
|
15
15
|
*/
|
|
@@ -41,8 +41,8 @@ export abstract class ModalDialogHandler {
|
|
|
41
41
|
abstract reset(): Promise<void>;
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
|
-
* Returns the most recently handled
|
|
45
|
-
* or
|
|
44
|
+
* Returns the most recently handled [`ModalDialog`](https://serenity-js.org/api/web/class/ModalDialog/),
|
|
45
|
+
* or [`AbsentModalDialog`](https://serenity-js.org/api/web/class/AbsentModalDialog/) when no dialogs have been handled yet.
|
|
46
46
|
*/
|
|
47
47
|
async last(): Promise<ModalDialog> {
|
|
48
48
|
return this.modalDialog;
|
|
@@ -9,8 +9,8 @@ import { ByTagName } from './ByTagName';
|
|
|
9
9
|
import { ByXPath } from './ByXPath';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* `By` produces a
|
|
13
|
-
* Selectors can be defined using a static value or a
|
|
12
|
+
* `By` produces a [`Selector`](https://serenity-js.org/api/web/class/Selector/) used to locate a [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) or [`PageElement`](https://serenity-js.org/api/web/class/PageElements/) on a web page.
|
|
13
|
+
* Selectors can be defined using a static value or a [`Question`](https://serenity-js.org/api/core/class/Question/) to be resolved at runtime.
|
|
14
14
|
*
|
|
15
15
|
* ### Defining a selector using a static value
|
|
16
16
|
*
|
|
@@ -30,11 +30,11 @@ import { ByXPath } from './ByXPath';
|
|
|
30
30
|
*
|
|
31
31
|
* ### Defining a selector using a Question
|
|
32
32
|
*
|
|
33
|
-
* Each method on this class accepts an
|
|
33
|
+
* Each method on this class accepts an [`Answerable`](https://serenity-js.org/api/core/#Answerable) to allow for dynamic resolution of the selector.
|
|
34
34
|
* This can be useful when the selector is not known at the time of writing the test, or when the selector
|
|
35
35
|
* needs to be calculated based on the state of the system under test.
|
|
36
36
|
*
|
|
37
|
-
* The example below demonstrates how to use
|
|
37
|
+
* The example below demonstrates how to use [`q`](https://serenity-js.org/api/core/function/q/) to define a selector that includes a dynamic value.
|
|
38
38
|
*
|
|
39
39
|
* ```typescript
|
|
40
40
|
* import { q } from '@serenity-js/core'
|
|
@@ -49,17 +49,17 @@ import { ByXPath } from './ByXPath';
|
|
|
49
49
|
* ```
|
|
50
50
|
*
|
|
51
51
|
* ### Learn more
|
|
52
|
-
* - [Page Element Query Language](/handbook/web-testing/page-element-query-language)
|
|
53
|
-
* -
|
|
54
|
-
* -
|
|
55
|
-
* -
|
|
52
|
+
* - [Page Element Query Language](https://serenity-js.org/handbook/web-testing/page-element-query-language)
|
|
53
|
+
* - [`PageElement`](https://serenity-js.org/api/web/class/PageElement/)
|
|
54
|
+
* - [`PageElement`](https://serenity-js.org/api/web/class/PageElements/)
|
|
55
|
+
* - [`q`](https://serenity-js.org/api/core/function/q/)
|
|
56
56
|
*
|
|
57
57
|
* @group Models
|
|
58
58
|
*/
|
|
59
59
|
export class By {
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
|
-
* Locates a
|
|
62
|
+
* Locates a [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) using a [CSS selector](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Selectors).
|
|
63
63
|
*
|
|
64
64
|
* @param selector
|
|
65
65
|
*/
|
|
@@ -71,7 +71,7 @@ export class By {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
|
-
* Locates a
|
|
74
|
+
* Locates a [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) with a given [`innerText`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/innerText)
|
|
75
75
|
* using a [CSS selector](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Selectors).
|
|
76
76
|
*
|
|
77
77
|
* @param selector
|
|
@@ -86,7 +86,7 @@ export class By {
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
|
-
* Locates a
|
|
89
|
+
* Locates a [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) using a [CSS selector](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Selectors)
|
|
90
90
|
* capable of piercing [shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM)-piercing
|
|
91
91
|
*
|
|
92
92
|
* @param selector
|
|
@@ -99,7 +99,7 @@ export class By {
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
|
-
* Locates a
|
|
102
|
+
* Locates a [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) using its [id](https://developer.mozilla.org/en-US/docs/Web/CSS/ID_selectors).
|
|
103
103
|
*
|
|
104
104
|
* @param selector
|
|
105
105
|
*/
|
|
@@ -111,7 +111,7 @@ export class By {
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
|
-
* Locates a
|
|
114
|
+
* Locates a [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) using the name of its [HTML tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element).
|
|
115
115
|
*
|
|
116
116
|
* @param selector
|
|
117
117
|
*/
|
|
@@ -123,7 +123,7 @@ export class By {
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
|
-
* Locates a
|
|
126
|
+
* Locates a [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) using an [XPath selector](https://developer.mozilla.org/en-US/docs/Web/XPath).
|
|
127
127
|
*
|
|
128
128
|
* @param selector
|
|
129
129
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Selector } from './Selector';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Locates a
|
|
4
|
+
* Locates a [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) using a [CSS selector](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Selectors).
|
|
5
5
|
*
|
|
6
|
-
* **Pro tip:** Instantiate using
|
|
6
|
+
* **Pro tip:** Instantiate using [`By.css`](https://serenity-js.org/api/web/class/By/#css)
|
|
7
7
|
*
|
|
8
8
|
* @group Models
|
|
9
9
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Selector } from './Selector';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Locates a
|
|
4
|
+
* Locates a [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) with a given [`innerText`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/innerText)
|
|
5
5
|
* using a [CSS selector](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Selectors).
|
|
6
6
|
*
|
|
7
|
-
* **Pro tip:** Instantiate using
|
|
7
|
+
* **Pro tip:** Instantiate using [`By.cssContainingText`](https://serenity-js.org/api/web/class/By/#cssContainingText)
|
|
8
8
|
*
|
|
9
9
|
* @group Models
|
|
10
10
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Selector } from './Selector';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Locates a
|
|
4
|
+
* Locates a [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) using a [CSS selector](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Selectors)
|
|
5
5
|
* capable of piercing [shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM)-piercing
|
|
6
6
|
*
|
|
7
|
-
* **Pro tip:** Instantiate using
|
|
7
|
+
* **Pro tip:** Instantiate using [`By.deepCss`](https://serenity-js.org/api/web/class/By/#deepCss)
|
|
8
8
|
*
|
|
9
9
|
* @group Models
|
|
10
10
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Selector } from './Selector';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Locates a
|
|
4
|
+
* Locates a [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) using its [id](https://developer.mozilla.org/en-US/docs/Web/CSS/ID_selectors).
|
|
5
5
|
*
|
|
6
|
-
* **Pro tip:** Instantiate using
|
|
6
|
+
* **Pro tip:** Instantiate using [`By.id`](https://serenity-js.org/api/web/class/By/#id)
|
|
7
7
|
*
|
|
8
8
|
* @group Models
|
|
9
9
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Selector } from './Selector';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Locates a
|
|
4
|
+
* Locates a [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) using the name of its [HTML tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element).
|
|
5
5
|
*
|
|
6
|
-
* **Pro tip:** Instantiate using
|
|
6
|
+
* **Pro tip:** Instantiate using [`By.tagName`](https://serenity-js.org/api/web/class/By/#tagName)
|
|
7
7
|
*
|
|
8
8
|
* @group Models
|
|
9
9
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Selector } from './Selector';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Locates a
|
|
4
|
+
* Locates a [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) using an [XPath selector](https://developer.mozilla.org/en-US/docs/Web/XPath).
|
|
5
5
|
*
|
|
6
|
-
* **Pro tip:** Instantiate using
|
|
6
|
+
* **Pro tip:** Instantiate using [`By.xpath`](https://serenity-js.org/api/web/class/By/#xpath)
|
|
7
7
|
*
|
|
8
8
|
* @group Models
|
|
9
9
|
*/
|
|
@@ -2,7 +2,7 @@ import { f } from '@serenity-js/core';
|
|
|
2
2
|
import { TinyType } from 'tiny-types';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Describes a selector you use to identify a
|
|
5
|
+
* Describes a selector you use to identify a [`PageElement`](https://serenity-js.org/api/web/class/PageElement/) or a group of [`PageElement`](https://serenity-js.org/api/web/class/PageElements/).
|
|
6
6
|
*
|
|
7
7
|
* @group Models
|
|
8
8
|
*/
|
|
@@ -4,8 +4,8 @@ import { d, LogicError, Question, the } from '@serenity-js/core';
|
|
|
4
4
|
import { PageElement } from '../models';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Uses the
|
|
8
|
-
* the value of the specified HTML 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 of the specified HTML attribute of a given [`PageElement`](https://serenity-js.org/api/web/class/PageElement/).
|
|
9
9
|
*
|
|
10
10
|
* ## Example widget
|
|
11
11
|
*
|
|
@@ -17,7 +17,7 @@ import { PageElement } from '../models';
|
|
|
17
17
|
* </ul>
|
|
18
18
|
* ```
|
|
19
19
|
*
|
|
20
|
-
* ## Retrieve an HTML attribute of a given
|
|
20
|
+
* ## Retrieve an HTML attribute of a given [`PageElement`](https://serenity-js.org/api/web/class/PageElement/)
|
|
21
21
|
*
|
|
22
22
|
* ```ts
|
|
23
23
|
* import { actorCalled } from '@serenity-js/core'
|
|
@@ -37,7 +37,7 @@ import { PageElement } from '../models';
|
|
|
37
37
|
* )
|
|
38
38
|
* ```
|
|
39
39
|
*
|
|
40
|
-
* ## Using `Attribute` as
|
|
40
|
+
* ## Using `Attribute` as [`QuestionAdapter`](https://serenity-js.org/api/core/#QuestionAdapter)
|
|
41
41
|
*
|
|
42
42
|
* ```ts
|
|
43
43
|
* import { actorCalled } from '@serenity-js/core'
|
|
@@ -57,7 +57,7 @@ import { PageElement } from '../models';
|
|
|
57
57
|
* )
|
|
58
58
|
* ```
|
|
59
59
|
*
|
|
60
|
-
* ## Using as filter in
|
|
60
|
+
* ## Using as filter in [Page Element Query Language](https://serenity-js.org/handbook/web-testing/page-element-query-language/)
|
|
61
61
|
*
|
|
62
62
|
* ```ts
|
|
63
63
|
* import { actorCalled } from '@serenity-js/core'
|
|
@@ -88,10 +88,10 @@ import { PageElement } from '../models';
|
|
|
88
88
|
* ```
|
|
89
89
|
*
|
|
90
90
|
* ## Learn more
|
|
91
|
-
* -
|
|
92
|
-
* -
|
|
93
|
-
* -
|
|
94
|
-
* -
|
|
91
|
+
* - [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
92
|
+
* - [`MetaQuestion`](https://serenity-js.org/api/core/interface/MetaQuestion/)
|
|
93
|
+
* - [`QuestionAdapter`](https://serenity-js.org/api/core/#QuestionAdapter)
|
|
94
|
+
* - [`Question`](https://serenity-js.org/api/core/class/Question/)
|
|
95
95
|
*
|
|
96
96
|
* @group Questions
|
|
97
97
|
*/
|
|
@@ -100,9 +100,9 @@ export class Attribute<Native_Element_Type>
|
|
|
100
100
|
implements MetaQuestion<PageElement<Native_Element_Type>, Question<Promise<string>>>, Optional
|
|
101
101
|
{
|
|
102
102
|
/**
|
|
103
|
-
* Instantiates a
|
|
104
|
-
* the
|
|
105
|
-
* the value of the specified HTML attribute of a given
|
|
103
|
+
* Instantiates a [`Question`](https://serenity-js.org/api/core/class/Question/) that uses
|
|
104
|
+
* 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
|
|
105
|
+
* the value of the specified HTML attribute of a given [`PageElement`](https://serenity-js.org/api/web/class/PageElement/).
|
|
106
106
|
*
|
|
107
107
|
* @param name
|
|
108
108
|
* The name of the attribute to retrieve
|
|
@@ -125,7 +125,7 @@ export class Attribute<Native_Element_Type>
|
|
|
125
125
|
* Resolves to the value of an HTML attribute of the `pageElement`.
|
|
126
126
|
*
|
|
127
127
|
* #### Learn more
|
|
128
|
-
* -
|
|
128
|
+
* - [`MetaQuestion`](https://serenity-js.org/api/core/interface/MetaQuestion/)
|
|
129
129
|
*
|
|
130
130
|
* @param pageElement
|
|
131
131
|
*/
|
|
@@ -12,8 +12,8 @@ import { BrowseTheWeb } from '../abilities';
|
|
|
12
12
|
import { PageElement } from '../models';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* Uses the
|
|
16
|
-
* the value of the specified computed style property of a given
|
|
15
|
+
* 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
|
|
16
|
+
* the value of the specified computed style property of a given [`PageElement`](https://serenity-js.org/api/web/class/PageElement/).
|
|
17
17
|
*
|
|
18
18
|
* ## Example widget
|
|
19
19
|
*
|
|
@@ -25,7 +25,7 @@ import { PageElement } from '../models';
|
|
|
25
25
|
* </ul>
|
|
26
26
|
* ```
|
|
27
27
|
*
|
|
28
|
-
* ## Retrieve a computed style property of a given
|
|
28
|
+
* ## Retrieve a computed style property of a given [`PageElement`](https://serenity-js.org/api/web/class/PageElement/)
|
|
29
29
|
*
|
|
30
30
|
* ```ts
|
|
31
31
|
* import { actorCalled } from '@serenity-js/core'
|
|
@@ -44,7 +44,7 @@ import { PageElement } from '../models';
|
|
|
44
44
|
* )
|
|
45
45
|
* ```
|
|
46
46
|
*
|
|
47
|
-
* ## Using `ComputedStyle` as
|
|
47
|
+
* ## Using `ComputedStyle` as [`QuestionAdapter`](https://serenity-js.org/api/core/#QuestionAdapter)
|
|
48
48
|
*
|
|
49
49
|
* ```ts
|
|
50
50
|
* import { actorCalled } from '@serenity-js/core'
|
|
@@ -63,7 +63,7 @@ import { PageElement } from '../models';
|
|
|
63
63
|
* )
|
|
64
64
|
* ```
|
|
65
65
|
*
|
|
66
|
-
* ## Using as filter in
|
|
66
|
+
* ## Using as filter in [Page Element Query Language](https://serenity-js.org/handbook/web-testing/page-element-query-language/)
|
|
67
67
|
*
|
|
68
68
|
* ```ts
|
|
69
69
|
* import { actorCalled } from '@serenity-js/core'
|
|
@@ -94,10 +94,10 @@ import { PageElement } from '../models';
|
|
|
94
94
|
* ```
|
|
95
95
|
*
|
|
96
96
|
* ## Learn more
|
|
97
|
-
* -
|
|
98
|
-
* -
|
|
99
|
-
* -
|
|
100
|
-
* -
|
|
97
|
+
* - [`BrowseTheWeb`](https://serenity-js.org/api/web/class/BrowseTheWeb/)
|
|
98
|
+
* - [`MetaQuestion`](https://serenity-js.org/api/core/interface/MetaQuestion/)
|
|
99
|
+
* - [`QuestionAdapter`](https://serenity-js.org/api/core/#QuestionAdapter)
|
|
100
|
+
* - [`Question`](https://serenity-js.org/api/core/class/Question/)
|
|
101
101
|
*
|
|
102
102
|
* @group Questions
|
|
103
103
|
*/
|
|
@@ -106,9 +106,9 @@ export class ComputedStyle<Native_Element_Type>
|
|
|
106
106
|
implements MetaQuestion<PageElement<Native_Element_Type>, Question<Promise<string>>>
|
|
107
107
|
{
|
|
108
108
|
/**
|
|
109
|
-
* Instantiates a
|
|
110
|
-
* the
|
|
111
|
-
* the value of the specified computed style property of a given
|
|
109
|
+
* Instantiates a [`Question`](https://serenity-js.org/api/core/class/Question/) that uses
|
|
110
|
+
* 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
|
|
111
|
+
* the value of the specified computed style property of a given [`PageElement`](https://serenity-js.org/api/web/class/PageElement/).
|
|
112
112
|
*
|
|
113
113
|
* @param name
|
|
114
114
|
* The name of the computed style property to retrieve
|
|
@@ -130,9 +130,9 @@ export class ComputedStyle<Native_Element_Type>
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
|
-
* Instantiates a
|
|
134
|
-
* the
|
|
135
|
-
* the value of the specified computed style property of the specified pseudo-element of a given
|
|
133
|
+
* Instantiates a [`Question`](https://serenity-js.org/api/core/class/Question/) that uses
|
|
134
|
+
* 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
|
+
* the value of the specified computed style property of the specified pseudo-element of a given [`PageElement`](https://serenity-js.org/api/web/class/PageElement/).
|
|
136
136
|
*
|
|
137
137
|
* @param pseudoElement
|
|
138
138
|
* The pseudo-element to retrieve the computed style property from, such as `::before` or `::after`
|
|
@@ -151,7 +151,7 @@ export class ComputedStyle<Native_Element_Type>
|
|
|
151
151
|
* Resolves to the value of a computed style property of the `pageElement`.
|
|
152
152
|
*
|
|
153
153
|
* #### Learn more
|
|
154
|
-
* -
|
|
154
|
+
* - [`MetaQuestion`](https://serenity-js.org/api/core/interface/MetaQuestion/)
|
|
155
155
|
*
|
|
156
156
|
* @param pageElement
|
|
157
157
|
*/
|