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