automation_model 1.0.632-dev → 1.0.632-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 +16 -16
- package/lib/analyze_helper.js.map +1 -1
- package/lib/api.d.ts +0 -1
- package/lib/api.js +35 -21
- package/lib/api.js.map +1 -1
- package/lib/auto_page.d.ts +1 -1
- package/lib/auto_page.js +99 -28
- package/lib/auto_page.js.map +1 -1
- package/lib/browser_manager.js +38 -9
- 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 +36 -16
- 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.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/find_function.js.map +1 -1
- 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/locator.js +1 -1
- package/lib/locator.js.map +1 -1
- package/lib/locator_log.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/snapshot_validation.d.ts +37 -0
- package/lib/snapshot_validation.js +357 -0
- package/lib/snapshot_validation.js.map +1 -0
- package/lib/stable_browser.d.ts +31 -23
- package/lib/stable_browser.js +614 -167
- package/lib/stable_browser.js.map +1 -1
- package/lib/table.js.map +1 -1
- package/lib/table_analyze.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 +221 -21
- package/lib/utils.js.map +1 -1
- package/package.json +11 -6
package/lib/stable_browser.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export declare const Types: {
|
|
|
24
24
|
UNCHECK: string;
|
|
25
25
|
EXTRACT: string;
|
|
26
26
|
CLOSE_PAGE: string;
|
|
27
|
+
TABLE_OPERATION: string;
|
|
27
28
|
SET_DATE_TIME: string;
|
|
28
29
|
SET_VIEWPORT: string;
|
|
29
30
|
VERIFY_VISUAL: string;
|
|
@@ -32,6 +33,11 @@ export declare const Types: {
|
|
|
32
33
|
WAIT_FOR_TEXT_TO_DISAPPEAR: string;
|
|
33
34
|
VERIFY_ATTRIBUTE: string;
|
|
34
35
|
VERIFY_TEXT_WITH_RELATION: string;
|
|
36
|
+
BRUNO: string;
|
|
37
|
+
VERIFY_FILE_EXISTS: string;
|
|
38
|
+
SET_INPUT_FILES: string;
|
|
39
|
+
SNAPSHOT_VALIDATION: string;
|
|
40
|
+
REPORT_COMMAND: string;
|
|
35
41
|
};
|
|
36
42
|
export declare const apps: {};
|
|
37
43
|
declare class StableBrowser {
|
|
@@ -51,6 +57,7 @@ declare class StableBrowser {
|
|
|
51
57
|
constructor(browser: Browser, page: Page, logger?: any, context?: any, world?: any);
|
|
52
58
|
registerEventListeners(context: any): void;
|
|
53
59
|
switchApp(appName: any): Promise<void>;
|
|
60
|
+
switchTab(tabTitleOrIndex: number | string): Promise<void>;
|
|
54
61
|
registerConsoleLogListener(page: Page, context: any): void;
|
|
55
62
|
registerRequestListener(page: Page, context: any, logFile: string): void;
|
|
56
63
|
goto(url: string, world?: null): Promise<void>;
|
|
@@ -60,7 +67,7 @@ declare class StableBrowser {
|
|
|
60
67
|
elementCount: number;
|
|
61
68
|
randomToken: string;
|
|
62
69
|
}>;
|
|
63
|
-
_collectLocatorInformation(selectorHierarchy: any, index: number | undefined, scope: any, foundLocators: any, _params: Params, info: any, visibleOnly?: boolean, allowDisabled?: boolean | undefined, element_name?: null): Promise<void>;
|
|
70
|
+
_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>;
|
|
64
71
|
closeUnexpectedPopups(info: any, _params: any): Promise<{
|
|
65
72
|
rerun: boolean;
|
|
66
73
|
}>;
|
|
@@ -68,7 +75,7 @@ declare class StableBrowser {
|
|
|
68
75
|
_findFrameScope(selectors: any, timeout: number | undefined, info: any): Promise<any>;
|
|
69
76
|
_getDocumentBody(selectors: any, timeout: number | undefined, info: any): Promise<any>;
|
|
70
77
|
_locate_internal(selectors: any, info: any, _params?: Params, timeout?: number, allowDisabled?: boolean | undefined): Promise<any>;
|
|
71
|
-
_scanLocatorsGroup(locatorsGroup: any, scope: any, _params: any, info: any, visibleOnly: any, allowDisabled?: boolean | undefined, element_name: any): Promise<{
|
|
78
|
+
_scanLocatorsGroup(locatorsGroup: any, scope: any, _params: any, info: any, visibleOnly: any, allowDisabled?: boolean | undefined, element_name: any, logErrors?: boolean | undefined): Promise<{
|
|
72
79
|
foundElements: any[];
|
|
73
80
|
}>;
|
|
74
81
|
simpleClick(elementDescription: any, _params?: Params, options?: {}, world?: null): Promise<void>;
|
|
@@ -83,6 +90,7 @@ declare class StableBrowser {
|
|
|
83
90
|
setDateTime(selectors: any, value: any, format?: null, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<void>;
|
|
84
91
|
clickType(selectors: any, _value: any, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
85
92
|
fill(selectors: any, value: any, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
93
|
+
setInputFiles(selectors: any, files: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
86
94
|
getText(selectors: any, _params?: null, options?: {}, info?: {}, world?: null): Promise<{
|
|
87
95
|
text: any;
|
|
88
96
|
screenshotId: any;
|
|
@@ -111,8 +119,10 @@ declare class StableBrowser {
|
|
|
111
119
|
}>;
|
|
112
120
|
containsPattern(selectors: any, pattern: any, text: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
113
121
|
containsText(selectors: any, text: any, climb: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
122
|
+
snapshotValidation(frameSelectors: any, referanceSnapshot: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
114
123
|
waitForUserInput(message: any, world?: null): Promise<void>;
|
|
115
124
|
setTestData(testData: any, world?: null): void;
|
|
125
|
+
overwriteTestData(testData: any, world?: null): void;
|
|
116
126
|
_getDataFilePath(fileName: any): string;
|
|
117
127
|
_parseCSVSync(filePath: any): Promise<unknown>;
|
|
118
128
|
loadTestData(type: string, dataSelector: string, world?: null): {
|
|
@@ -133,13 +143,18 @@ declare class StableBrowser {
|
|
|
133
143
|
}>;
|
|
134
144
|
_highlightElements(scope: any, css: any): Promise<void>;
|
|
135
145
|
verifyPagePath(pathPart: any, options?: {}, world?: null): Promise<{} | undefined>;
|
|
136
|
-
|
|
146
|
+
verifyPageTitle(title: any, options?: {}, world?: null): Promise<{} | undefined>;
|
|
147
|
+
findTextInAllFrames(dateAlternatives: any, numberAlternatives: any, text: any, state: any, partial?: boolean, ignoreCase?: boolean): Promise<{
|
|
137
148
|
elementCount: number;
|
|
138
149
|
randomToken: string;
|
|
139
150
|
}[]>;
|
|
140
151
|
verifyTextExistInPage(text: any, options?: {}, world?: null): Promise<any>;
|
|
141
152
|
waitForTextToDisappear(text: any, options?: {}, world?: null): Promise<any>;
|
|
142
153
|
verifyTextRelatedToText(textAnchor: string, climb: number, textToVerify: string, options?: {}, world?: any): Promise<any>;
|
|
154
|
+
findRelatedTextInAllFrames(textAnchor: string, climb: number, textToVerify: string, params?: Params, options?: {}, world?: any): Promise<{
|
|
155
|
+
elementCount: number;
|
|
156
|
+
randomToken: string;
|
|
157
|
+
}[]>;
|
|
143
158
|
visualVerification(text: any, options?: {}, world?: null): Promise<{} | undefined>;
|
|
144
159
|
verifyTableData(selectors: any, data: any, _params?: null, options?: {}, world?: null): Promise<void>;
|
|
145
160
|
getTableData(selectors: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
@@ -151,32 +166,25 @@ declare class StableBrowser {
|
|
|
151
166
|
restoreSaveState(path?: string | null, world?: any): Promise<void>;
|
|
152
167
|
waitForPageLoad(options?: {}, world?: null): Promise<void>;
|
|
153
168
|
closePage(options?: {}, world?: null): Promise<void>;
|
|
169
|
+
tableCellOperation(headerText: string, rowText: string, options: any, _params: Params, world?: null): Promise<void>;
|
|
154
170
|
saveTestDataAsGlobal(options: any, world: any): void;
|
|
155
171
|
setViewportSize(width: number, hight: number, options?: {}, world?: null): Promise<void>;
|
|
156
172
|
reloadPage(options?: {}, world?: null): Promise<void>;
|
|
157
173
|
scrollIfNeeded(element: any, info: any): Promise<void>;
|
|
174
|
+
beforeScenario(world: any, scenario: any): Promise<void>;
|
|
175
|
+
afterScenario(world: any, scenario: any): Promise<void>;
|
|
158
176
|
beforeStep(world: any, step: any): Promise<void>;
|
|
159
177
|
getAriaSnapshot(): Promise<string | null>;
|
|
178
|
+
/**
|
|
179
|
+
* Sends command with custom payload to report.
|
|
180
|
+
* @param commandText - Title of the command to be shown in the report.
|
|
181
|
+
* @param commandStatus - Status of the command (e.g. "PASSED", "FAILED").
|
|
182
|
+
* @param content - Content of the command to be shown in the report.
|
|
183
|
+
* @param options - Options for the command. Example: { type: "json", screenshot: true }
|
|
184
|
+
* @param world - Optional world context.
|
|
185
|
+
* @public
|
|
186
|
+
*/
|
|
187
|
+
addCommandToReport(commandText: string, commandStatus: "PASSED" | "FAILED", content: string, options?: any, world?: any): Promise<void>;
|
|
160
188
|
afterStep(world: any, step: any): Promise<void>;
|
|
161
189
|
}
|
|
162
|
-
type JsonTimestamp = number;
|
|
163
|
-
type JsonResultPassed = {
|
|
164
|
-
status: "PASSED";
|
|
165
|
-
startTime: JsonTimestamp;
|
|
166
|
-
endTime: JsonTimestamp;
|
|
167
|
-
};
|
|
168
|
-
type JsonResultFailed = {
|
|
169
|
-
status: "FAILED";
|
|
170
|
-
startTime: JsonTimestamp;
|
|
171
|
-
endTime: JsonTimestamp;
|
|
172
|
-
message?: string;
|
|
173
|
-
};
|
|
174
|
-
type JsonCommandResult = JsonResultPassed | JsonResultFailed;
|
|
175
|
-
export type JsonCommandReport = {
|
|
176
|
-
type: string;
|
|
177
|
-
value?: string;
|
|
178
|
-
text: string;
|
|
179
|
-
screenshotId?: string;
|
|
180
|
-
result: JsonCommandResult;
|
|
181
|
-
};
|
|
182
190
|
export { StableBrowser };
|