@playq/core 0.2.77
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/README.md +41 -0
- package/bin/playq.js +175 -0
- package/cucumber.js +10 -0
- package/dist/exec/featureFileCache.d.ts +21 -0
- package/dist/exec/featureFileCache.js +124 -0
- package/dist/exec/featureFilePreProcess.d.ts +12 -0
- package/dist/exec/featureFilePreProcess.js +208 -0
- package/dist/exec/preLoader.d.ts +1 -0
- package/dist/exec/preLoader.js +72 -0
- package/dist/exec/preProcessEntry.d.ts +1 -0
- package/dist/exec/preProcessEntry.js +83 -0
- package/dist/exec/preProcess_old_todelete.d.ts +1 -0
- package/dist/exec/preProcess_old_todelete.js +258 -0
- package/dist/exec/runner.d.ts +1 -0
- package/dist/exec/runner.js +221 -0
- package/dist/exec/runner_orchestrator.d.ts +1 -0
- package/dist/exec/runner_orchestrator.js +85 -0
- package/dist/exec/sgGenerator.d.ts +11 -0
- package/dist/exec/sgGenerator.js +310 -0
- package/dist/global.d.ts +15 -0
- package/dist/global.js +185 -0
- package/dist/helper/actions/api/apiRequestActions.d.ts +117 -0
- package/dist/helper/actions/api/apiRequestActions.js +374 -0
- package/dist/helper/actions/api/apiValidationActions.d.ts +119 -0
- package/dist/helper/actions/api/apiValidationActions.js +615 -0
- package/dist/helper/actions/apiActions.d.ts +18 -0
- package/dist/helper/actions/apiActions.js +34 -0
- package/dist/helper/actions/apiStepDefs.d.ts +1 -0
- package/dist/helper/actions/apiStepDefs.js +64 -0
- package/dist/helper/actions/comm/commonActions.d.ts +58 -0
- package/dist/helper/actions/comm/commonActions.js +198 -0
- package/dist/helper/actions/comm/utilityActions.d.ts +131 -0
- package/dist/helper/actions/comm/utilityActions.js +351 -0
- package/dist/helper/actions/commActions.d.ts +18 -0
- package/dist/helper/actions/commActions.js +34 -0
- package/dist/helper/actions/commStepDefs.d.ts +1 -0
- package/dist/helper/actions/commStepDefs.js +57 -0
- package/dist/helper/actions/stepGroupStepDefs.d.ts +1 -0
- package/dist/helper/actions/stepGroupStepDefs.js +15 -0
- package/dist/helper/actions/web/alertActions.d.ts +61 -0
- package/dist/helper/actions/web/alertActions.js +224 -0
- package/dist/helper/actions/web/cookieActions.d.ts +45 -0
- package/dist/helper/actions/web/cookieActions.js +186 -0
- package/dist/helper/actions/web/downloadActions.d.ts +40 -0
- package/dist/helper/actions/web/downloadActions.js +153 -0
- package/dist/helper/actions/web/elementReaderActions.d.ts +95 -0
- package/dist/helper/actions/web/elementReaderActions.js +326 -0
- package/dist/helper/actions/web/formActions.d.ts +122 -0
- package/dist/helper/actions/web/formActions.js +423 -0
- package/dist/helper/actions/web/iframeActions.d.ts +23 -0
- package/dist/helper/actions/web/iframeActions.js +108 -0
- package/dist/helper/actions/web/javascriptActions.d.ts +14 -0
- package/dist/helper/actions/web/javascriptActions.js +77 -0
- package/dist/helper/actions/web/keyboardActions.d.ts +35 -0
- package/dist/helper/actions/web/keyboardActions.js +118 -0
- package/dist/helper/actions/web/localStorageActions.d.ts +51 -0
- package/dist/helper/actions/web/localStorageActions.js +163 -0
- package/dist/helper/actions/web/mouseActions.d.ts +240 -0
- package/dist/helper/actions/web/mouseActions.js +609 -0
- package/dist/helper/actions/web/reportingActions.d.ts +34 -0
- package/dist/helper/actions/web/reportingActions.js +58 -0
- package/dist/helper/actions/web/screenshotActions.d.ts +34 -0
- package/dist/helper/actions/web/screenshotActions.js +151 -0
- package/dist/helper/actions/web/testDataActions.d.ts +21 -0
- package/dist/helper/actions/web/testDataActions.js +211 -0
- package/dist/helper/actions/web/validationActions.d.ts +547 -0
- package/dist/helper/actions/web/validationActions.js +1754 -0
- package/dist/helper/actions/web/waitActions.d.ts +191 -0
- package/dist/helper/actions/web/waitActions.js +589 -0
- package/dist/helper/actions/web/webNavigation.d.ts +104 -0
- package/dist/helper/actions/web/webNavigation.js +288 -0
- package/dist/helper/actions/webActions.d.ts +32 -0
- package/dist/helper/actions/webActions.js +48 -0
- package/dist/helper/actions/webStepDefs.d.ts +1 -0
- package/dist/helper/actions/webStepDefs.js +455 -0
- package/dist/helper/browsers/browserManager.d.ts +1 -0
- package/dist/helper/browsers/browserManager.js +56 -0
- package/dist/helper/bundle/defaultEntries.d.ts +6 -0
- package/dist/helper/bundle/defaultEntries.js +200 -0
- package/dist/helper/bundle/env.d.ts +1 -0
- package/dist/helper/bundle/env.js +157 -0
- package/dist/helper/bundle/vars.d.ts +9 -0
- package/dist/helper/bundle/vars.js +375 -0
- package/dist/helper/faker/customFaker.d.ts +55 -0
- package/dist/helper/faker/customFaker.js +45 -0
- package/dist/helper/faker/modules/data/postcodes_valid_sg.json +17 -0
- package/dist/helper/faker/modules/dateTime.d.ts +18 -0
- package/dist/helper/faker/modules/dateTime.js +106 -0
- package/dist/helper/faker/modules/mobile.d.ts +4 -0
- package/dist/helper/faker/modules/mobile.js +59 -0
- package/dist/helper/faker/modules/nric.d.ts +32 -0
- package/dist/helper/faker/modules/nric.js +84 -0
- package/dist/helper/faker/modules/passport.d.ts +3 -0
- package/dist/helper/faker/modules/passport.js +36 -0
- package/dist/helper/faker/modules/person.d.ts +14 -0
- package/dist/helper/faker/modules/person.js +73 -0
- package/dist/helper/faker/modules/postcode.d.ts +6 -0
- package/dist/helper/faker/modules/postcode.js +47 -0
- package/dist/helper/fixtures/locAggregate.d.ts +7 -0
- package/dist/helper/fixtures/locAggregate.js +94 -0
- package/dist/helper/fixtures/logFixture.d.ts +8 -0
- package/dist/helper/fixtures/logFixture.js +56 -0
- package/dist/helper/fixtures/webFixture.d.ts +19 -0
- package/dist/helper/fixtures/webFixture.js +186 -0
- package/dist/helper/fixtures/webLocFixture.d.ts +2 -0
- package/dist/helper/fixtures/webLocFixture.js +144 -0
- package/dist/helper/report/allureStepLogger.d.ts +0 -0
- package/dist/helper/report/allureStepLogger.js +25 -0
- package/dist/helper/report/customiseReport.d.ts +1 -0
- package/dist/helper/report/customiseReport.js +55 -0
- package/dist/helper/report/init.d.ts +1 -0
- package/dist/helper/report/init.js +14 -0
- package/dist/helper/report/report.d.ts +1 -0
- package/dist/helper/report/report.js +102 -0
- package/dist/helper/util/dataLoader.d.ts +10 -0
- package/dist/helper/util/dataLoader.js +73 -0
- package/dist/helper/util/logger.d.ts +4 -0
- package/dist/helper/util/logger.js +61 -0
- package/dist/helper/util/session/sessionUtil.d.ts +26 -0
- package/dist/helper/util/session/sessionUtil.js +729 -0
- package/dist/helper/util/stepHelpers.d.ts +2 -0
- package/dist/helper/util/stepHelpers.js +16 -0
- package/dist/helper/util/test-data/dataLoader.d.ts +7 -0
- package/dist/helper/util/test-data/dataLoader.js +145 -0
- package/dist/helper/util/test-data/dataTest.d.ts +10 -0
- package/dist/helper/util/test-data/dataTest.js +216 -0
- package/dist/helper/util/totp/totpHelper.d.ts +38 -0
- package/dist/helper/util/totp/totpHelper.js +117 -0
- package/dist/helper/util/utilities/cryptoUtil.d.ts +2 -0
- package/dist/helper/util/utilities/cryptoUtil.js +53 -0
- package/dist/helper/util/utilities/schemaGeneratorUtil.d.ts +2 -0
- package/dist/helper/util/utilities/schemaGeneratorUtil.js +129 -0
- package/dist/helper/util/utils.d.ts +2 -0
- package/dist/helper/util/utils.js +22 -0
- package/dist/helper/wrapper/PlaywrightWrappers.d.ts +8 -0
- package/dist/helper/wrapper/PlaywrightWrappers.js +26 -0
- package/dist/helper/wrapper/assert.d.ts +9 -0
- package/dist/helper/wrapper/assert.js +23 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +57 -0
- package/dist/scripts/get-versions.d.ts +1 -0
- package/dist/scripts/get-versions.js +98 -0
- package/dist/scripts/posttest.d.ts +1 -0
- package/dist/scripts/posttest.js +29 -0
- package/dist/scripts/pretest.d.ts +1 -0
- package/dist/scripts/pretest.js +57 -0
- package/dist/scripts/util.d.ts +1 -0
- package/dist/scripts/util.js +376 -0
- package/package.json +68 -0
- package/src/exec/featureFileCache.ts +80 -0
- package/src/exec/featureFilePreProcess.ts +239 -0
- package/src/exec/preLoader.ts +72 -0
- package/src/exec/preProcessEntry.ts +59 -0
- package/src/exec/preProcess_old_todelete.ts +289 -0
- package/src/exec/runner.ts +241 -0
- package/src/exec/runnerCuke.js +90 -0
- package/src/exec/runner_orchestrator.ts +91 -0
- package/src/exec/sgGenerator.ts +373 -0
- package/src/global.ts +130 -0
- package/src/helper/actions/api/apiRequestActions.ts +362 -0
- package/src/helper/actions/api/apiValidationActions.ts +594 -0
- package/src/helper/actions/apiActions.ts +18 -0
- package/src/helper/actions/apiStepDefs.ts +80 -0
- package/src/helper/actions/comm/commonActions.ts +165 -0
- package/src/helper/actions/comm/utilityActions.ts +344 -0
- package/src/helper/actions/commActions.ts +18 -0
- package/src/helper/actions/commStepDefs.ts +72 -0
- package/src/helper/actions/stepGroupStepDefs.ts +17 -0
- package/src/helper/actions/web/alertActions.ts +179 -0
- package/src/helper/actions/web/cookieActions.ts +124 -0
- package/src/helper/actions/web/downloadActions.ts +129 -0
- package/src/helper/actions/web/elementReaderActions.ts +323 -0
- package/src/helper/actions/web/formActions.ts +469 -0
- package/src/helper/actions/web/iframeActions.ts +67 -0
- package/src/helper/actions/web/javascriptActions.ts +38 -0
- package/src/helper/actions/web/keyboardActions.ts +101 -0
- package/src/helper/actions/web/localStorageActions.ts +109 -0
- package/src/helper/actions/web/mouseActions.ts +864 -0
- package/src/helper/actions/web/reportingActions.ts +53 -0
- package/src/helper/actions/web/screenshotActions.ts +124 -0
- package/src/helper/actions/web/testDataActions.ts +162 -0
- package/src/helper/actions/web/validationActions.ts +2287 -0
- package/src/helper/actions/web/waitActions.ts +757 -0
- package/src/helper/actions/web/webNavigation.ts +313 -0
- package/src/helper/actions/webActions.ts +33 -0
- package/src/helper/actions/webStepDefs.ts +505 -0
- package/src/helper/browsers/browserManager.ts +23 -0
- package/src/helper/bundle/defaultEntries.ts +208 -0
- package/src/helper/bundle/env.ts +119 -0
- package/src/helper/bundle/vars.ts +368 -0
- package/src/helper/faker/customFaker.ts +107 -0
- package/src/helper/faker/modules/data/postcodes_valid_sg.json +17 -0
- package/src/helper/faker/modules/dateTime.ts +121 -0
- package/src/helper/faker/modules/mobile.ts +58 -0
- package/src/helper/faker/modules/nric.ts +109 -0
- package/src/helper/faker/modules/passport.ts +34 -0
- package/src/helper/faker/modules/person.ts +93 -0
- package/src/helper/faker/modules/postcode.ts +57 -0
- package/src/helper/fixtures/locAggregate.ts +61 -0
- package/src/helper/fixtures/logFixture.ts +57 -0
- package/src/helper/fixtures/webFixture.ts +206 -0
- package/src/helper/fixtures/webLocFixture.ts +143 -0
- package/src/helper/report/allureStepLogger.ts +26 -0
- package/src/helper/report/customiseReport.ts +61 -0
- package/src/helper/report/init.ts +18 -0
- package/src/helper/report/report.ts +72 -0
- package/src/helper/util/dataLoader.ts +42 -0
- package/src/helper/util/logger.ts +32 -0
- package/src/helper/util/session/sessionUtil.ts +839 -0
- package/src/helper/util/stepHelpers.ts +14 -0
- package/src/helper/util/test-data/dataLoader.ts +108 -0
- package/src/helper/util/test-data/dataTest.ts +191 -0
- package/src/helper/util/test-data/registerUser.json +7 -0
- package/src/helper/util/totp/totpHelper.ts +102 -0
- package/src/helper/util/utilities/cryptoUtil.ts +53 -0
- package/src/helper/util/utilities/schemaGeneratorUtil.ts +143 -0
- package/src/helper/util/utils.ts +28 -0
- package/src/helper/wrapper/PlaywrightWrappers.ts +28 -0
- package/src/helper/wrapper/assert.ts +25 -0
- package/src/index.ts +17 -0
- package/src/scripts/get-versions.ts +68 -0
- package/src/scripts/posttest.ts +32 -0
- package/src/scripts/pretest.ts +48 -0
- package/src/scripts/util.ts +406 -0
- package/tsconfig.json +30 -0
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { Page, Locator } from "@playwright/test";
|
|
2
|
+
/**
|
|
3
|
+
* Comm: Wait-In-Milli-Seconds -seconds: {param}
|
|
4
|
+
*
|
|
5
|
+
* Pauses execution for the given number of milliseconds.
|
|
6
|
+
* Delegates to `comm.waitInMilliSeconds`.
|
|
7
|
+
*
|
|
8
|
+
* @param ms Milliseconds to wait
|
|
9
|
+
*/
|
|
10
|
+
export declare function wait(ms: number): Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* Web: Wait For Condition -timeout: {param}
|
|
13
|
+
*
|
|
14
|
+
* Polls a predicate until it returns true or times out.
|
|
15
|
+
*
|
|
16
|
+
* @param page Playwright Page instance
|
|
17
|
+
* @param predicate Async function returning a boolean
|
|
18
|
+
* @param options Optional JSON string or object ({ timeout, interval })
|
|
19
|
+
*/
|
|
20
|
+
export declare function waitForCondition(page: Page, predicate: (page: Page) => Promise<boolean>, options?: string | Record<string, any>): Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Waits for the page to fully load by checking multiple browser states:
|
|
23
|
+
* - `domcontentloaded`: Ensures DOM is parsed and ready.
|
|
24
|
+
* - `load`: Waits for all resources like images and scripts to load.
|
|
25
|
+
* - `requestIdleCallback`: Ensures the browser is idle before proceeding.
|
|
26
|
+
*
|
|
27
|
+
* This function is useful after navigation, form submission, or any page transition
|
|
28
|
+
* to ensure stable element interaction.
|
|
29
|
+
*
|
|
30
|
+
* @param page - The Playwright Page instance.
|
|
31
|
+
* @param actionTimeout - Optional timeout (in ms) to wait for each load state. Default: 10000.
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
export declare function waitForPageToLoad(page: Page, actionTimeout?: number): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Waits for a given locator (element) to become enabled within the specified timeout.
|
|
37
|
+
* Useful before interacting with inputs, buttons, or other dynamic UI elements.
|
|
38
|
+
*
|
|
39
|
+
* @param locator - The Playwright Locator to wait for (e.g., input field, button).
|
|
40
|
+
* @param actionTimeout - Optional timeout (in ms). Default: 5000.
|
|
41
|
+
*
|
|
42
|
+
* @throws Error if the locator does not become enabled within the timeout.
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
export declare function waitForEnabled(locator: Locator, actionTimeout?: number): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Web: Wait for displayed -field: {param} -options: {param}
|
|
48
|
+
*
|
|
49
|
+
* Waits for an element to become visible on the page.
|
|
50
|
+
*
|
|
51
|
+
* @param page - Playwright Page instance
|
|
52
|
+
* @param field - The label, id, name, or selector of the element to wait for
|
|
53
|
+
* @param options - Optional JSON string or object:
|
|
54
|
+
* - actionTimeout: [number] Optional timeout in milliseconds. Default: Configured timeout.
|
|
55
|
+
* - pattern: [string] Optional pattern to refine element search.
|
|
56
|
+
* - fieldType: [string] Type of field (e.g., input, button, etc.)
|
|
57
|
+
* - screenshot: [boolean] Capture screenshot after waiting. Default: false.
|
|
58
|
+
* - screenshotText: [string] Description for screenshot.
|
|
59
|
+
* - screenshotFullPage: [boolean] Full page screenshot. Default: true.
|
|
60
|
+
*/
|
|
61
|
+
export declare function waitForDisplayed(page: Page, field: string | Locator, options?: string | Record<string, any>): Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
* Web: Wait for disappear -field: {param} -options: {param}
|
|
64
|
+
*
|
|
65
|
+
* Waits for an element to disappear (become hidden or removed) from the page.
|
|
66
|
+
*
|
|
67
|
+
* @param page - Playwright Page instance
|
|
68
|
+
* @param field - The label, id, name, or selector of the element to wait for
|
|
69
|
+
* @param options - Optional JSON string or object:
|
|
70
|
+
* - actionTimeout: [number] Optional timeout in milliseconds. Default: Configured timeout.
|
|
71
|
+
* - pattern: [string] Optional pattern to refine element search.
|
|
72
|
+
* - fieldType: [string] Type of field (e.g., input, button, etc.)
|
|
73
|
+
* - screenshot: [boolean] Capture screenshot after waiting. Default: false.
|
|
74
|
+
* - screenshotText: [string] Description for screenshot.
|
|
75
|
+
* - screenshotFullPage: [boolean] Full page screenshot. Default: true.
|
|
76
|
+
*/
|
|
77
|
+
export declare function waitForDisappear(page: Page, field: string | Locator, options?: string | Record<string, any>): Promise<void>;
|
|
78
|
+
/**
|
|
79
|
+
* Web: Wait for Text at Location -field: {param} -text: {param} -options: {param}
|
|
80
|
+
*
|
|
81
|
+
* Waits until the specified text appears at the given field/locator.
|
|
82
|
+
*
|
|
83
|
+
* @param page - Playwright Page instance
|
|
84
|
+
* @param field - The selector or Locator where the text should appear
|
|
85
|
+
* @param expectedText - The text to wait for
|
|
86
|
+
* @param options - Optional string or object:
|
|
87
|
+
* - actionTimeout: [number] Timeout in ms (default: 30000)
|
|
88
|
+
* - partialMatch: [boolean] If true, waits for substring match (default: false)
|
|
89
|
+
* - caseSensitive: [boolean] If true, match is case-sensitive (default: true)
|
|
90
|
+
* - screenshot: [boolean] Capture screenshot after waiting (default: false)
|
|
91
|
+
* - screenshotText: [string] Description for screenshot
|
|
92
|
+
* - screenshotFullPage: [boolean] Full page screenshot (default: true)
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* await waitForTextAtLocation(page, 'h1', 'Welcome', { actionTimeout: 10000, partialMatch: true });
|
|
96
|
+
*/
|
|
97
|
+
export declare function waitForTextAtLocation(page: Page, field: string | Locator, expectedText: string, options?: string | Record<string, any>): Promise<void>;
|
|
98
|
+
/**
|
|
99
|
+
* Web: Wait for Text to Disappear at Location -field: {param} -text: {param} -options: {param}
|
|
100
|
+
*
|
|
101
|
+
* Waits until the specified text disappears from the given field/locator.
|
|
102
|
+
*
|
|
103
|
+
* @param page - Playwright Page instance
|
|
104
|
+
* @param field - The selector or Locator where the text should disappear
|
|
105
|
+
* @param textToDisappear - The text to wait for disappearance
|
|
106
|
+
* @param options - Optional string or object:
|
|
107
|
+
* - actionTimeout: [number] Timeout in ms (default: 30000)
|
|
108
|
+
* - partialMatch: [boolean] If true, waits for substring match (default: false)
|
|
109
|
+
* - ignoreCase: [boolean] If true, match is case-insensitive (default: true)
|
|
110
|
+
* - screenshot: [boolean] Capture screenshot after waiting (default: false)
|
|
111
|
+
* - screenshotText: [string] Description for screenshot
|
|
112
|
+
* - screenshotFullPage: [boolean] Full page screenshot (default: true)
|
|
113
|
+
*/
|
|
114
|
+
export declare function waitForTextToDisappearAtLocation(page: Page, field: string | Locator, textToDisappear: string, options?: string | Record<string, any>): Promise<void>;
|
|
115
|
+
/**
|
|
116
|
+
* Web: Wait for Selector -field: {param} -options: {param}
|
|
117
|
+
*
|
|
118
|
+
* Waits for a selector or locator to reach a specific state.
|
|
119
|
+
*
|
|
120
|
+
* @param page - Playwright Page instance
|
|
121
|
+
* @param field - The selector string or Locator to wait for
|
|
122
|
+
* @param options - Optional string or object:
|
|
123
|
+
* - fieldType: [string] Type of field (e.g., 'button', 'input') for pattern resolution
|
|
124
|
+
* - state: [string] 'attached' | 'detached' | 'visible' | 'hidden' (default: 'visible')
|
|
125
|
+
* - actionTimeout: [number] Timeout in ms (default: 30000)
|
|
126
|
+
* - pattern: [string] Optional pattern for locator resolution
|
|
127
|
+
* - screenshot: [boolean] Capture screenshot after waiting (default: false)
|
|
128
|
+
* - screenshotText: [string] Description for screenshot
|
|
129
|
+
* - screenshotFullPage: [boolean] Full page screenshot (default: true)
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* await waitForSelector(page, 'img[alt="~"]', { state: 'hidden', actionTimeout: 10000 });
|
|
133
|
+
*/
|
|
134
|
+
export declare function waitForSelector(page: Page, field: string | Locator, options?: string | Record<string, any>): Promise<void>;
|
|
135
|
+
/**
|
|
136
|
+
* Web: Wait for Header -header: {param} -text: {param} -options: {param}
|
|
137
|
+
*
|
|
138
|
+
* Waits until a specific header element contains the expected text.
|
|
139
|
+
* The header parameter should be a locator or will use pattern resolution.
|
|
140
|
+
*
|
|
141
|
+
* @param page - Playwright Page instance
|
|
142
|
+
* @param header - The locator of the header element (e.g., "h1", "xpath=//h1[@class='title']", or Locator object)
|
|
143
|
+
* @param headerText - The expected header text to wait for (e.g., "Welcome", "Dashboard")
|
|
144
|
+
* @param options - Optional string or object:
|
|
145
|
+
* - actionTimeout: [number] Timeout in ms (default: 30000)
|
|
146
|
+
* - partialMatch: [boolean] If true, waits for substring match (default: false)
|
|
147
|
+
* - ignoreCase: [boolean] If true, case-insensitive match (default: true)
|
|
148
|
+
* - pattern: [string] Optional pattern to refine element search
|
|
149
|
+
* - screenshot: [boolean] Capture screenshot after waiting (default: false)
|
|
150
|
+
* - screenshotText: [string] Description for screenshot
|
|
151
|
+
* - screenshotFullPage: [boolean] Full page screenshot (default: true)
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* await waitForHeader(page, 'h1', 'Welcome Back!', {
|
|
155
|
+
* partialMatch: true,
|
|
156
|
+
* screenshot: true
|
|
157
|
+
* });
|
|
158
|
+
*/
|
|
159
|
+
export declare function waitForHeader(page: Page, header: string | Locator, headerText: string, options?: string | Record<string, any>): Promise<void>;
|
|
160
|
+
/**
|
|
161
|
+
* Web: Wait for Input -field: {param} -state: {param} (enabled or disabled) -options: {param}
|
|
162
|
+
*
|
|
163
|
+
* Waits for an input field to become 'enabled' or 'disabled'.
|
|
164
|
+
*
|
|
165
|
+
* @param page - Playwright Page instance
|
|
166
|
+
* @param field - Locator or label of the input field
|
|
167
|
+
* @param state - Desired state: 'enabled' or 'disabled'
|
|
168
|
+
* @param options - Optional string or object:
|
|
169
|
+
* - actionTimeout: [number] Optional timeout in milliseconds for waiting. Default: from [config] or 30000.
|
|
170
|
+
* - pattern: [string] Optional pattern to refine element search.
|
|
171
|
+
* - screenshot: [boolean] Capture a screenshot. Default: true.
|
|
172
|
+
* - screenshotText: [string] Description for the screenshot.
|
|
173
|
+
* - screenshotFullPage: [boolean] Capture full page screenshot. Default: true.
|
|
174
|
+
* - smartIQ_refreshLoc: optional override for locator refresh key
|
|
175
|
+
*/
|
|
176
|
+
export declare function waitForInputState(page: Page, field: string | Locator, state: "enabled" | "disabled", options?: string | Record<string, any>): Promise<void>;
|
|
177
|
+
/**
|
|
178
|
+
* Web: Wait for URL -url: {param} -options: {param}
|
|
179
|
+
*
|
|
180
|
+
* Waits until the current page URL matches or contains the specified string or regex.
|
|
181
|
+
*
|
|
182
|
+
* @param url - The expected URL or substring/regex to match (e.g., "/dashboard", "https://example.com/page").
|
|
183
|
+
* @param options - Optional JSON string or object:
|
|
184
|
+
* - actionTimeout: [number] Timeout in ms to wait for URL. Default: 30000.
|
|
185
|
+
* - match: [string] "exact" | "contains" . Default: "contains".
|
|
186
|
+
* - assert: [boolean] If false, logs the failure but does not throw. Default: true.
|
|
187
|
+
* - screenshot: [boolean] If true, captures screenshot. Default: false.
|
|
188
|
+
* - screenshotText: [string] Custom screenshot label.
|
|
189
|
+
* - screenshotFullPage: [boolean] Full page screenshot. Default: true.
|
|
190
|
+
*/
|
|
191
|
+
export declare function waitForUrl(page: Page, url: string, options?: string | Record<string, any>): Promise<void>;
|