automation_model 1.0.616-dev → 1.0.616-stage
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 +130 -0
- package/lib/api.js +35 -21
- package/lib/api.js.map +1 -1
- package/lib/auto_page.d.ts +2 -1
- package/lib/auto_page.js +107 -26
- package/lib/auto_page.js.map +1 -1
- package/lib/browser_manager.js +70 -22
- 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/command_common.d.ts +4 -4
- package/lib/command_common.js +34 -16
- package/lib/command_common.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/file_checker.d.ts +1 -0
- package/lib/file_checker.js +61 -0
- package/lib/file_checker.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/init_browser.d.ts +2 -2
- package/lib/init_browser.js +33 -27
- package/lib/init_browser.js.map +1 -1
- package/lib/locate_element.js +2 -2
- package/lib/locate_element.js.map +1 -1
- package/lib/network.d.ts +1 -1
- package/lib/network.js +5 -5
- package/lib/network.js.map +1 -1
- package/lib/stable_browser.d.ts +22 -1
- package/lib/stable_browser.js +655 -123
- package/lib/stable_browser.js.map +1 -1
- package/lib/table_helper.d.ts +19 -0
- package/lib/table_helper.js +116 -0
- package/lib/table_helper.js.map +1 -0
- package/lib/test_context.d.ts +2 -0
- package/lib/test_context.js +2 -0
- package/lib/test_context.js.map +1 -1
- package/lib/utils.d.ts +8 -4
- package/lib/utils.js +220 -19
- package/lib/utils.js.map +1 -1
- package/package.json +9 -8
package/lib/stable_browser.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { Browser, Page } from "playwright";
|
|
|
2
2
|
import { Params } from "./utils.js";
|
|
3
3
|
export declare const Types: {
|
|
4
4
|
CLICK: string;
|
|
5
|
+
WAIT_ELEMENT: string;
|
|
5
6
|
NAVIGATE: string;
|
|
6
7
|
FILL: string;
|
|
7
8
|
EXECUTE: string;
|
|
@@ -23,6 +24,7 @@ export declare const Types: {
|
|
|
23
24
|
UNCHECK: string;
|
|
24
25
|
EXTRACT: string;
|
|
25
26
|
CLOSE_PAGE: string;
|
|
27
|
+
TABLE_OPERATION: string;
|
|
26
28
|
SET_DATE_TIME: string;
|
|
27
29
|
SET_VIEWPORT: string;
|
|
28
30
|
VERIFY_VISUAL: string;
|
|
@@ -31,6 +33,9 @@ export declare const Types: {
|
|
|
31
33
|
WAIT_FOR_TEXT_TO_DISAPPEAR: string;
|
|
32
34
|
VERIFY_ATTRIBUTE: string;
|
|
33
35
|
VERIFY_TEXT_WITH_RELATION: string;
|
|
36
|
+
BRUNO: string;
|
|
37
|
+
VERIFY_FILE_EXISTS: string;
|
|
38
|
+
SET_INPUT_FILES: string;
|
|
34
39
|
};
|
|
35
40
|
export declare const apps: {};
|
|
36
41
|
declare class StableBrowser {
|
|
@@ -46,9 +51,11 @@ declare class StableBrowser {
|
|
|
46
51
|
appName: string;
|
|
47
52
|
tags: null;
|
|
48
53
|
isRecording: boolean;
|
|
54
|
+
initSnapshotTaken: boolean;
|
|
49
55
|
constructor(browser: Browser, page: Page, logger?: any, context?: any, world?: any);
|
|
50
56
|
registerEventListeners(context: any): void;
|
|
51
57
|
switchApp(appName: any): Promise<void>;
|
|
58
|
+
switchTab(tabTitleOrIndex: number | string): Promise<void>;
|
|
52
59
|
registerConsoleLogListener(page: Page, context: any): void;
|
|
53
60
|
registerRequestListener(page: Page, context: any, logFile: string): void;
|
|
54
61
|
goto(url: string, world?: null): Promise<void>;
|
|
@@ -72,6 +79,7 @@ declare class StableBrowser {
|
|
|
72
79
|
simpleClick(elementDescription: any, _params?: Params, options?: {}, world?: null): Promise<void>;
|
|
73
80
|
simpleClickType(elementDescription: any, value: any, _params?: Params, options?: {}, world?: null): Promise<void>;
|
|
74
81
|
click(selectors: any, _params?: Params, options?: {}, world?: null): Promise<any>;
|
|
82
|
+
waitForElement(selectors: any, _params?: Params, options?: {}, world?: null): Promise<boolean>;
|
|
75
83
|
setCheck(selectors: any, checked?: boolean, _params?: Params, options?: {}, world?: null): Promise<any>;
|
|
76
84
|
hover(selectors: any, _params?: Params, options?: {}, world?: null): Promise<any>;
|
|
77
85
|
selectOption(selectors: any, values: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
@@ -80,6 +88,7 @@ declare class StableBrowser {
|
|
|
80
88
|
setDateTime(selectors: any, value: any, format?: null, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<void>;
|
|
81
89
|
clickType(selectors: any, _value: any, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
82
90
|
fill(selectors: any, value: any, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
91
|
+
setInputFiles(selectors: any, files: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
83
92
|
getText(selectors: any, _params?: null, options?: {}, info?: {}, world?: null): Promise<{
|
|
84
93
|
text: any;
|
|
85
94
|
screenshotId: any;
|
|
@@ -108,8 +117,10 @@ declare class StableBrowser {
|
|
|
108
117
|
}>;
|
|
109
118
|
containsPattern(selectors: any, pattern: any, text: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
110
119
|
containsText(selectors: any, text: any, climb: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
120
|
+
snapshotValidation(frameSelectors: any, referanceSnapshot: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
111
121
|
waitForUserInput(message: any, world?: null): Promise<void>;
|
|
112
122
|
setTestData(testData: any, world?: null): void;
|
|
123
|
+
overwriteTestData(testData: any, world?: null): void;
|
|
113
124
|
_getDataFilePath(fileName: any): string;
|
|
114
125
|
_parseCSVSync(filePath: any): Promise<unknown>;
|
|
115
126
|
loadTestData(type: string, dataSelector: string, world?: null): {
|
|
@@ -130,28 +141,38 @@ declare class StableBrowser {
|
|
|
130
141
|
}>;
|
|
131
142
|
_highlightElements(scope: any, css: any): Promise<void>;
|
|
132
143
|
verifyPagePath(pathPart: any, options?: {}, world?: null): Promise<{} | undefined>;
|
|
133
|
-
|
|
144
|
+
verifyPageTitle(title: any, options?: {}, world?: null): Promise<{} | undefined>;
|
|
145
|
+
findTextInAllFrames(dateAlternatives: any, numberAlternatives: any, text: any, state: any, partial?: boolean, ignoreCase?: boolean): Promise<{
|
|
134
146
|
elementCount: number;
|
|
135
147
|
randomToken: string;
|
|
136
148
|
}[]>;
|
|
137
149
|
verifyTextExistInPage(text: any, options?: {}, world?: null): Promise<any>;
|
|
138
150
|
waitForTextToDisappear(text: any, options?: {}, world?: null): Promise<any>;
|
|
139
151
|
verifyTextRelatedToText(textAnchor: string, climb: number, textToVerify: string, options?: {}, world?: any): Promise<any>;
|
|
152
|
+
findRelatedTextInAllFrames(textAnchor: string, climb: number, textToVerify: string, params?: Params, options?: {}, world?: any): Promise<{
|
|
153
|
+
elementCount: number;
|
|
154
|
+
randomToken: string;
|
|
155
|
+
}[]>;
|
|
140
156
|
visualVerification(text: any, options?: {}, world?: null): Promise<{} | undefined>;
|
|
141
157
|
verifyTableData(selectors: any, data: any, _params?: null, options?: {}, world?: null): Promise<void>;
|
|
142
158
|
getTableData(selectors: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
143
159
|
analyzeTable(selectors: any, query: any, operator: any, value: any, _params?: null, options?: {}, world?: null): Promise<{} | undefined>;
|
|
144
160
|
_replaceWithLocalData(value: any, world: any, _decrypt?: boolean, totpWait?: boolean): Promise<string>;
|
|
145
161
|
_getLoadTimeout(options: any): number;
|
|
162
|
+
_getFindElementTimeout(options: any): any;
|
|
146
163
|
saveStoreState(path?: string | null, world?: any): Promise<void>;
|
|
147
164
|
restoreSaveState(path?: string | null, world?: any): Promise<void>;
|
|
148
165
|
waitForPageLoad(options?: {}, world?: null): Promise<void>;
|
|
149
166
|
closePage(options?: {}, world?: null): Promise<void>;
|
|
167
|
+
tableCellOperation(headerText: string, rowText: string, options: any, _params: Params, world?: null): Promise<void>;
|
|
150
168
|
saveTestDataAsGlobal(options: any, world: any): void;
|
|
151
169
|
setViewportSize(width: number, hight: number, options?: {}, world?: null): Promise<void>;
|
|
152
170
|
reloadPage(options?: {}, world?: null): Promise<void>;
|
|
153
171
|
scrollIfNeeded(element: any, info: any): Promise<void>;
|
|
172
|
+
beforeScenario(world: any, scenario: any): Promise<void>;
|
|
173
|
+
afterScenario(world: any, scenario: any): Promise<void>;
|
|
154
174
|
beforeStep(world: any, step: any): Promise<void>;
|
|
175
|
+
getAriaSnapshot(): Promise<string | null>;
|
|
155
176
|
afterStep(world: any, step: any): Promise<void>;
|
|
156
177
|
}
|
|
157
178
|
type JsonTimestamp = number;
|