automation_model 1.0.488-dev → 1.0.488
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 +133 -0
- package/lib/analyze_helper.js.map +1 -1
- package/lib/api.d.ts +2 -2
- package/lib/api.js +151 -120
- package/lib/api.js.map +1 -1
- package/lib/auto_page.d.ts +7 -2
- package/lib/auto_page.js +309 -29
- package/lib/auto_page.js.map +1 -1
- package/lib/browser_manager.d.ts +6 -3
- package/lib/browser_manager.js +194 -46
- package/lib/browser_manager.js.map +1 -1
- package/lib/bruno.d.ts +2 -0
- package/lib/bruno.js +381 -0
- package/lib/bruno.js.map +1 -0
- package/lib/check_performance.d.ts +1 -0
- package/lib/check_performance.js +57 -0
- package/lib/check_performance.js.map +1 -0
- package/lib/command_common.d.ts +5 -4
- package/lib/command_common.js +126 -21
- package/lib/command_common.js.map +1 -1
- package/lib/date_time.js.map +1 -1
- package/lib/drawRect.js.map +1 -1
- package/lib/environment.d.ts +1 -0
- package/lib/environment.js +1 -0
- package/lib/environment.js.map +1 -1
- package/lib/error-messages.d.ts +6 -0
- package/lib/error-messages.js +206 -0
- package/lib/error-messages.js.map +1 -0
- package/lib/file_checker.d.ts +1 -0
- package/lib/file_checker.js +172 -0
- package/lib/file_checker.js.map +1 -0
- package/lib/find_function.js.map +1 -1
- package/lib/generation_scripts.d.ts +4 -0
- package/lib/generation_scripts.js +2 -0
- package/lib/generation_scripts.js.map +1 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +4 -0
- package/lib/index.js.map +1 -1
- package/lib/init_browser.d.ts +4 -3
- package/lib/init_browser.js +160 -83
- package/lib/init_browser.js.map +1 -1
- package/lib/locate_element.js +16 -14
- package/lib/locate_element.js.map +1 -1
- package/lib/locator.d.ts +37 -0
- package/lib/locator.js +172 -0
- package/lib/locator.js.map +1 -1
- package/lib/locator_log.d.ts +26 -0
- package/lib/locator_log.js +69 -0
- package/lib/locator_log.js.map +1 -0
- package/lib/network.d.ts +5 -0
- package/lib/network.js +494 -0
- package/lib/network.js.map +1 -0
- package/lib/route.d.ts +83 -0
- package/lib/route.js +691 -0
- package/lib/route.js.map +1 -0
- package/lib/scripts/axe.mini.js +24005 -0
- package/lib/snapshot_validation.d.ts +37 -0
- package/lib/snapshot_validation.js +360 -0
- package/lib/snapshot_validation.js.map +1 -0
- package/lib/stable_browser.d.ts +147 -47
- package/lib/stable_browser.js +2587 -828
- package/lib/stable_browser.js.map +1 -1
- package/lib/table.d.ts +15 -0
- package/lib/table.js +257 -0
- package/lib/table.js.map +1 -0
- package/lib/table_analyze.js.map +1 -1
- package/lib/table_helper.d.ts +19 -0
- package/lib/table_helper.js +130 -0
- package/lib/table_helper.js.map +1 -0
- package/lib/test_context.d.ts +6 -0
- package/lib/test_context.js +5 -0
- package/lib/test_context.js.map +1 -1
- package/lib/utils.d.ts +38 -3
- package/lib/utils.js +748 -36
- package/lib/utils.js.map +1 -1
- package/package.json +31 -13
- package/lib/axe/axe.mini.js +0 -12
package/lib/stable_browser.d.ts
CHANGED
|
@@ -1,5 +1,52 @@
|
|
|
1
1
|
import type { Browser, Page } from "playwright";
|
|
2
|
-
|
|
2
|
+
import { Params } from "./utils.js";
|
|
3
|
+
export declare const Types: {
|
|
4
|
+
CLICK: string;
|
|
5
|
+
WAIT_ELEMENT: string;
|
|
6
|
+
NAVIGATE: string;
|
|
7
|
+
GO_BACK: string;
|
|
8
|
+
GO_FORWARD: string;
|
|
9
|
+
FILL: string;
|
|
10
|
+
EXECUTE: string;
|
|
11
|
+
OPEN: string;
|
|
12
|
+
COMPLETE: string;
|
|
13
|
+
ASK: string;
|
|
14
|
+
GET_PAGE_STATUS: string;
|
|
15
|
+
CLICK_ROW_ACTION: string;
|
|
16
|
+
VERIFY_ELEMENT_CONTAINS_TEXT: string;
|
|
17
|
+
VERIFY_PAGE_CONTAINS_TEXT: string;
|
|
18
|
+
VERIFY_PAGE_CONTAINS_NO_TEXT: string;
|
|
19
|
+
ANALYZE_TABLE: string;
|
|
20
|
+
SELECT: string;
|
|
21
|
+
VERIFY_PROPERTY: string;
|
|
22
|
+
VERIFY_PAGE_PATH: string;
|
|
23
|
+
VERIFY_PAGE_TITLE: string;
|
|
24
|
+
TYPE_PRESS: string;
|
|
25
|
+
PRESS: string;
|
|
26
|
+
HOVER: string;
|
|
27
|
+
CHECK: string;
|
|
28
|
+
UNCHECK: string;
|
|
29
|
+
EXTRACT: string;
|
|
30
|
+
EXTRACT_PROPERTY: string;
|
|
31
|
+
CLOSE_PAGE: string;
|
|
32
|
+
TABLE_OPERATION: string;
|
|
33
|
+
SET_DATE_TIME: string;
|
|
34
|
+
SET_VIEWPORT: string;
|
|
35
|
+
VERIFY_VISUAL: string;
|
|
36
|
+
LOAD_DATA: string;
|
|
37
|
+
SET_INPUT: string;
|
|
38
|
+
WAIT_FOR_TEXT_TO_DISAPPEAR: string;
|
|
39
|
+
VERIFY_ATTRIBUTE: string;
|
|
40
|
+
VERIFY_TEXT_WITH_RELATION: string;
|
|
41
|
+
BRUNO: string;
|
|
42
|
+
VERIFY_FILE_EXISTS: string;
|
|
43
|
+
SET_INPUT_FILES: string;
|
|
44
|
+
SNAPSHOT_VALIDATION: string;
|
|
45
|
+
REPORT_COMMAND: string;
|
|
46
|
+
STEP_COMPLETE: string;
|
|
47
|
+
SLEEP: string;
|
|
48
|
+
CONDITIONAL_WAIT: string;
|
|
49
|
+
};
|
|
3
50
|
export declare const apps: {};
|
|
4
51
|
declare class StableBrowser {
|
|
5
52
|
browser: Browser;
|
|
@@ -7,40 +54,50 @@ declare class StableBrowser {
|
|
|
7
54
|
logger: any;
|
|
8
55
|
context: any;
|
|
9
56
|
world?: any;
|
|
57
|
+
fastMode: boolean;
|
|
58
|
+
stepTags: string[];
|
|
10
59
|
project_path: null;
|
|
11
60
|
webLogFile: null;
|
|
12
61
|
networkLogger: null;
|
|
13
62
|
configuration: null;
|
|
14
63
|
appName: string;
|
|
15
|
-
|
|
64
|
+
tags: null;
|
|
65
|
+
isRecording: boolean;
|
|
66
|
+
initSnapshotTaken: boolean;
|
|
67
|
+
onlyFailuresScreenshot: boolean;
|
|
68
|
+
inStepReport: boolean;
|
|
69
|
+
constructor(browser: Browser, page: Page, logger?: any, context?: any, world?: any, fastMode?: boolean, stepTags?: string[]);
|
|
16
70
|
registerEventListeners(context: any): void;
|
|
17
71
|
switchApp(appName: any): Promise<void>;
|
|
18
|
-
|
|
19
|
-
getWebLogFile(logFolder: string): string;
|
|
72
|
+
switchTab(tabTitleOrIndex: number | string): Promise<void>;
|
|
20
73
|
registerConsoleLogListener(page: Page, context: any): void;
|
|
21
74
|
registerRequestListener(page: Page, context: any, logFile: string): void;
|
|
22
|
-
goto(url: string): Promise<void>;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
scanAndManipulate(currentObj: any, _params: Params): void;
|
|
27
|
-
_getLocator(locator: any, scope: any, _params: any): any;
|
|
75
|
+
goto(url: string, world?: null, options?: {}): Promise<void>;
|
|
76
|
+
goBack(options: any, world?: null): Promise<void>;
|
|
77
|
+
goForward(options: any, world?: null): Promise<void>;
|
|
78
|
+
_getLocator(locator: any, scope: any, _params: any): Promise<any>;
|
|
28
79
|
_locateElmentByTextClimbCss(scope: any, text: any, climb: any, css: any, _params: Params): Promise<string | undefined>;
|
|
29
|
-
_locateElementByText(scope: any, text1: any, tag1: any, regex1: boolean | undefined, partial1: any, _params: Params): Promise<
|
|
30
|
-
|
|
80
|
+
_locateElementByText(scope: any, text1: any, tag1: any, regex1: boolean | undefined, partial1: any, ignoreCase: boolean | undefined, _params: Params): Promise<{
|
|
81
|
+
elementCount: number;
|
|
82
|
+
randomToken: string;
|
|
83
|
+
}>;
|
|
84
|
+
_collectLocatorInformation(selectorHierarchy: any, index: number | undefined, scope: any, foundLocators: any, _params: Params, info: any, visibleOnly?: boolean, allowDisabled?: boolean | undefined, element_name?: null, logErrors?: boolean | undefined): Promise<void>;
|
|
31
85
|
closeUnexpectedPopups(info: any, _params: any): Promise<{
|
|
32
86
|
rerun: boolean;
|
|
33
87
|
}>;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
88
|
+
getFilePath(): string | null;
|
|
89
|
+
getFullElementLocators(selectors: any, filePath: any): any;
|
|
90
|
+
_locate(selectors: any, info: any, _params?: Params, timeout: any, allowDisabled?: boolean | undefined): Promise<any>;
|
|
91
|
+
_findFrameScope(selectors: any, timeout: number | undefined, info: any): Promise<any>;
|
|
92
|
+
_getDocumentBody(selectors: any, timeout: number | undefined, info: any): Promise<any>;
|
|
93
|
+
_locate_internal(selectors: any, info: any, _params?: Params, timeout?: number, allowDisabled?: boolean | undefined): Promise<any>;
|
|
94
|
+
_scanLocatorsGroup(locatorsGroup: any, scope: any, _params: any, info: any, visibleOnly: any, allowDisabled?: boolean | undefined, element_name: any, logErrors?: boolean | undefined): Promise<{
|
|
39
95
|
foundElements: any[];
|
|
40
96
|
}>;
|
|
41
97
|
simpleClick(elementDescription: any, _params?: Params, options?: {}, world?: null): Promise<void>;
|
|
42
98
|
simpleClickType(elementDescription: any, value: any, _params?: Params, options?: {}, world?: null): Promise<void>;
|
|
43
99
|
click(selectors: any, _params?: Params, options?: {}, world?: null): Promise<any>;
|
|
100
|
+
waitForElement(selectors: any, _params?: Params, options?: {}, world?: null): Promise<boolean>;
|
|
44
101
|
setCheck(selectors: any, checked?: boolean, _params?: Params, options?: {}, world?: null): Promise<any>;
|
|
45
102
|
hover(selectors: any, _params?: Params, options?: {}, world?: null): Promise<any>;
|
|
46
103
|
selectOption(selectors: any, values: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
@@ -49,6 +106,7 @@ declare class StableBrowser {
|
|
|
49
106
|
setDateTime(selectors: any, value: any, format?: null, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<void>;
|
|
50
107
|
clickType(selectors: any, _value: any, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
51
108
|
fill(selectors: any, value: any, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
109
|
+
setInputFiles(selectors: any, files: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
52
110
|
getText(selectors: any, _params?: null, options?: {}, info?: {}, world?: null): Promise<{
|
|
53
111
|
text: any;
|
|
54
112
|
screenshotId: any;
|
|
@@ -77,9 +135,10 @@ declare class StableBrowser {
|
|
|
77
135
|
}>;
|
|
78
136
|
containsPattern(selectors: any, pattern: any, text: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
79
137
|
containsText(selectors: any, text: any, climb: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
80
|
-
|
|
138
|
+
snapshotValidation(frameSelectors: any, referanceSnapshot: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
81
139
|
waitForUserInput(message: any, world?: null): Promise<void>;
|
|
82
140
|
setTestData(testData: any, world?: null): void;
|
|
141
|
+
overwriteTestData(testData: any, world?: null): void;
|
|
83
142
|
_getDataFilePath(fileName: any): string;
|
|
84
143
|
_parseCSVSync(filePath: any): Promise<unknown>;
|
|
85
144
|
loadTestData(type: string, dataSelector: string, world?: null): {
|
|
@@ -88,50 +147,91 @@ declare class StableBrowser {
|
|
|
88
147
|
totp: string | null;
|
|
89
148
|
};
|
|
90
149
|
loadTestDataAsync(type: string, dataSelector: string, world?: null): Promise<any>;
|
|
91
|
-
getTestData(world?: null):
|
|
150
|
+
getTestData(world?: null): any;
|
|
92
151
|
_screenShot(options?: {}, world?: null, info?: null): Promise<{}>;
|
|
93
|
-
takeScreenshot(screenshotPath: any): Promise<any>;
|
|
152
|
+
takeScreenshot(screenshotPath: any, fullPage?: boolean): Promise<any>;
|
|
94
153
|
verifyElementExistInPage(selectors: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
95
|
-
extractAttribute(selectors: any, attribute: any, variable: any, _params?: null, options?: {}, world?: null): Promise<
|
|
154
|
+
extractAttribute(selectors: any, attribute: any, variable: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
155
|
+
extractProperty(selectors: any, property: any, variable: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
156
|
+
verifyAttribute(selectors: any, attribute: any, value: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
157
|
+
verifyProperty(selectors: any, property: any, value: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
158
|
+
conditionalWait(selectors: any, condition: any, timeout?: number, _params?: null, options?: {}, world?: null): Promise<{}>;
|
|
96
159
|
extractEmailData(emailAddress: any, options: any, world: any): Promise<{
|
|
97
160
|
emailUrl: any;
|
|
98
161
|
emailCode: any;
|
|
99
162
|
}>;
|
|
100
163
|
_highlightElements(scope: any, css: any): Promise<void>;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
164
|
+
_matcher(text: any): {
|
|
165
|
+
matcher: any;
|
|
166
|
+
queryText: any;
|
|
167
|
+
};
|
|
168
|
+
_getDomain(url: string): string;
|
|
169
|
+
/**
|
|
170
|
+
* Verify the page path matches the given path.
|
|
171
|
+
* @param {string} pathPart - The path to verify.
|
|
172
|
+
* @param {object} options - Options for verification.
|
|
173
|
+
* @param {object} world - The world context.
|
|
174
|
+
* @returns {Promise<object>} - The state info after verification.
|
|
175
|
+
*/
|
|
176
|
+
verifyPagePath(pathPart: string, options?: object, world?: object): Promise<object>;
|
|
177
|
+
/**
|
|
178
|
+
* Verify the page title matches the given title.
|
|
179
|
+
* @param {string} title - The title to verify.
|
|
180
|
+
* @param {object} options - Options for verification.
|
|
181
|
+
* @param {object} world - The world context.
|
|
182
|
+
* @returns {Promise<object>} - The state info after verification.
|
|
183
|
+
*/
|
|
184
|
+
verifyPageTitle(title: string, options?: object, world?: object): Promise<object>;
|
|
185
|
+
findTextInAllFrames(dateAlternatives: any, numberAlternatives: any, text: any, state: any, partial?: boolean, ignoreCase?: boolean): Promise<{
|
|
186
|
+
elementCount: number;
|
|
187
|
+
randomToken: string;
|
|
188
|
+
}[]>;
|
|
189
|
+
verifyTextExistInPage(text: any, options?: {}, world?: null): Promise<any>;
|
|
190
|
+
waitForTextToDisappear(text: any, options?: {}, world?: null): Promise<any>;
|
|
191
|
+
verifyTextRelatedToText(textAnchor: string, climb: number, textToVerify: string, options?: {}, world?: any): Promise<any>;
|
|
192
|
+
findRelatedTextInAllFrames(textAnchor: string, climb: number, textToVerify: string, params?: Params, options?: {}, world?: any): Promise<{
|
|
193
|
+
elementCount: number;
|
|
194
|
+
randomToken: string;
|
|
195
|
+
}[]>;
|
|
196
|
+
visualVerification(text: any, options?: {}, world?: null): Promise<{} | undefined>;
|
|
105
197
|
verifyTableData(selectors: any, data: any, _params?: null, options?: {}, world?: null): Promise<void>;
|
|
106
198
|
getTableData(selectors: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
107
|
-
analyzeTable(selectors: any, query: any, operator: any, value: any, _params?: null, options?: {}, world?: null): Promise<{}>;
|
|
199
|
+
analyzeTable(selectors: any, query: any, operator: any, value: any, _params?: null, options?: {}, world?: null): Promise<{} | undefined>;
|
|
200
|
+
/**
|
|
201
|
+
* Explicit wait/sleep function that pauses execution for a specified duration
|
|
202
|
+
* @param duration - Duration to sleep in milliseconds (default: 1000ms)
|
|
203
|
+
* @param options - Optional configuration object
|
|
204
|
+
* @param world - Optional world context
|
|
205
|
+
* @returns Promise that resolves after the specified duration
|
|
206
|
+
*/
|
|
207
|
+
sleep(duration?: number, options?: {}, world?: null): Promise<any>;
|
|
108
208
|
_replaceWithLocalData(value: any, world: any, _decrypt?: boolean, totpWait?: boolean): Promise<string>;
|
|
109
209
|
_getLoadTimeout(options: any): number;
|
|
210
|
+
_getFindElementTimeout(options: any): any;
|
|
211
|
+
saveStoreState(path?: string | null, world?: any): Promise<void>;
|
|
212
|
+
restoreSaveState(path?: string | null, world?: any): Promise<void>;
|
|
110
213
|
waitForPageLoad(options?: {}, world?: null): Promise<void>;
|
|
111
214
|
closePage(options?: {}, world?: null): Promise<void>;
|
|
215
|
+
tableCellOperation(headerText: string, rowText: string, options: any, _params: Params, world?: null): Promise<void>;
|
|
216
|
+
saveTestDataAsGlobal(options: any, world: any): void;
|
|
112
217
|
setViewportSize(width: number, hight: number, options?: {}, world?: null): Promise<void>;
|
|
113
218
|
reloadPage(options?: {}, world?: null): Promise<void>;
|
|
114
219
|
scrollIfNeeded(element: any, info: any): Promise<void>;
|
|
115
|
-
|
|
220
|
+
beforeScenario(world: any, scenario: any): Promise<void>;
|
|
221
|
+
afterScenario(world: any, scenario: any): Promise<void>;
|
|
222
|
+
beforeStep(world: any, step: any): Promise<void>;
|
|
223
|
+
setStepTags(tags: string[]): void;
|
|
224
|
+
getAriaSnapshot(): Promise<string | null>;
|
|
225
|
+
/**
|
|
226
|
+
* Sends command with custom payload to report.
|
|
227
|
+
* @param commandText - Title of the command to be shown in the report.
|
|
228
|
+
* @param commandStatus - Status of the command (e.g. "PASSED", "FAILED").
|
|
229
|
+
* @param content - Content of the command to be shown in the report.
|
|
230
|
+
* @param options - Options for the command. Example: { type: "json", screenshot: true }
|
|
231
|
+
* @param world - Optional world context.
|
|
232
|
+
* @public
|
|
233
|
+
*/
|
|
234
|
+
addCommandToReport(commandText: string, commandStatus: "PASSED" | "FAILED", content: string, options?: any, world?: any): Promise<void>;
|
|
235
|
+
afterStep(world: any, step: any, result: any): Promise<void>;
|
|
116
236
|
}
|
|
117
|
-
type JsonTimestamp = number;
|
|
118
|
-
type JsonResultPassed = {
|
|
119
|
-
status: "PASSED";
|
|
120
|
-
startTime: JsonTimestamp;
|
|
121
|
-
endTime: JsonTimestamp;
|
|
122
|
-
};
|
|
123
|
-
type JsonResultFailed = {
|
|
124
|
-
status: "FAILED";
|
|
125
|
-
startTime: JsonTimestamp;
|
|
126
|
-
endTime: JsonTimestamp;
|
|
127
|
-
message?: string;
|
|
128
|
-
};
|
|
129
|
-
type JsonCommandResult = JsonResultPassed | JsonResultFailed;
|
|
130
|
-
type JsonCommandReport = {
|
|
131
|
-
type: string;
|
|
132
|
-
value?: string;
|
|
133
|
-
text: string;
|
|
134
|
-
screenshotId?: string;
|
|
135
|
-
result: JsonCommandResult;
|
|
136
|
-
};
|
|
137
237
|
export { StableBrowser };
|