automation_model 1.0.430-dev → 1.0.430
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.d.ts +43 -1
- package/lib/api.js +241 -41
- package/lib/api.js.map +1 -1
- package/lib/auto_page.d.ts +5 -2
- package/lib/auto_page.js +177 -46
- package/lib/auto_page.js.map +1 -1
- package/lib/browser_manager.d.ts +7 -3
- package/lib/browser_manager.js +161 -49
- package/lib/browser_manager.js.map +1 -1
- package/lib/bruno.d.ts +1 -0
- package/lib/bruno.js +301 -0
- package/lib/bruno.js.map +1 -0
- package/lib/command_common.d.ts +6 -0
- package/lib/command_common.js +198 -0
- package/lib/command_common.js.map +1 -0
- package/lib/environment.d.ts +3 -0
- package/lib/environment.js +5 -2
- 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/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 +2 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/init_browser.d.ts +5 -2
- package/lib/init_browser.js +124 -7
- package/lib/init_browser.js.map +1 -1
- package/lib/locate_element.d.ts +7 -0
- package/lib/locate_element.js +215 -0
- package/lib/locate_element.js.map +1 -0
- package/lib/locator.d.ts +36 -0
- package/lib/locator.js +165 -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 +3 -0
- package/lib/network.js +183 -0
- package/lib/network.js.map +1 -0
- package/lib/scripts/axe.mini.js +12 -0
- package/lib/stable_browser.d.ts +104 -36
- package/lib/stable_browser.js +1802 -1240
- package/lib/stable_browser.js.map +1 -1
- package/lib/table.d.ts +13 -0
- package/lib/table.js +187 -0
- package/lib/table.js.map +1 -0
- 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 +6 -0
- package/lib/test_context.js +14 -10
- package/lib/test_context.js.map +1 -1
- package/lib/utils.d.ts +22 -2
- package/lib/utils.js +664 -11
- package/lib/utils.js.map +1 -1
- package/package.json +14 -8
package/lib/stable_browser.d.ts
CHANGED
|
@@ -1,44 +1,91 @@
|
|
|
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
|
+
FILL: string;
|
|
8
|
+
EXECUTE: string;
|
|
9
|
+
OPEN: string;
|
|
10
|
+
COMPLETE: string;
|
|
11
|
+
ASK: string;
|
|
12
|
+
GET_PAGE_STATUS: string;
|
|
13
|
+
CLICK_ROW_ACTION: string;
|
|
14
|
+
VERIFY_ELEMENT_CONTAINS_TEXT: string;
|
|
15
|
+
VERIFY_PAGE_CONTAINS_TEXT: string;
|
|
16
|
+
VERIFY_PAGE_CONTAINS_NO_TEXT: string;
|
|
17
|
+
ANALYZE_TABLE: string;
|
|
18
|
+
SELECT: string;
|
|
19
|
+
VERIFY_PAGE_PATH: string;
|
|
20
|
+
TYPE_PRESS: string;
|
|
21
|
+
PRESS: string;
|
|
22
|
+
HOVER: string;
|
|
23
|
+
CHECK: string;
|
|
24
|
+
UNCHECK: string;
|
|
25
|
+
EXTRACT: string;
|
|
26
|
+
CLOSE_PAGE: string;
|
|
27
|
+
TABLE_OPERATION: string;
|
|
28
|
+
SET_DATE_TIME: string;
|
|
29
|
+
SET_VIEWPORT: string;
|
|
30
|
+
VERIFY_VISUAL: string;
|
|
31
|
+
LOAD_DATA: string;
|
|
32
|
+
SET_INPUT: string;
|
|
33
|
+
WAIT_FOR_TEXT_TO_DISAPPEAR: string;
|
|
34
|
+
VERIFY_ATTRIBUTE: string;
|
|
35
|
+
VERIFY_TEXT_WITH_RELATION: string;
|
|
36
|
+
BRUNO: string;
|
|
37
|
+
};
|
|
38
|
+
export declare const apps: {};
|
|
3
39
|
declare class StableBrowser {
|
|
4
40
|
browser: Browser;
|
|
5
41
|
page: Page;
|
|
6
42
|
logger: any;
|
|
7
43
|
context: any;
|
|
44
|
+
world?: any;
|
|
8
45
|
project_path: null;
|
|
9
46
|
webLogFile: null;
|
|
47
|
+
networkLogger: null;
|
|
10
48
|
configuration: null;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
49
|
+
appName: string;
|
|
50
|
+
tags: null;
|
|
51
|
+
isRecording: boolean;
|
|
52
|
+
initSnapshotTaken: boolean;
|
|
53
|
+
constructor(browser: Browser, page: Page, logger?: any, context?: any, world?: any);
|
|
54
|
+
registerEventListeners(context: any): void;
|
|
55
|
+
switchApp(appName: any): Promise<void>;
|
|
56
|
+
switchTab(tabTitleOrIndex: number | string): Promise<void>;
|
|
57
|
+
registerConsoleLogListener(page: Page, context: any): void;
|
|
58
|
+
registerRequestListener(page: Page, context: any, logFile: string): void;
|
|
59
|
+
goto(url: string, world?: null): Promise<void>;
|
|
60
|
+
_getLocator(locator: any, scope: any, _params: any): Promise<any>;
|
|
22
61
|
_locateElmentByTextClimbCss(scope: any, text: any, climb: any, css: any, _params: Params): Promise<string | undefined>;
|
|
23
|
-
_locateElementByText(scope: any, text1: any, tag1: any, regex1: boolean | undefined, partial1: any, _params: Params): Promise<
|
|
24
|
-
|
|
62
|
+
_locateElementByText(scope: any, text1: any, tag1: any, regex1: boolean | undefined, partial1: any, ignoreCase: boolean | undefined, _params: Params): Promise<{
|
|
63
|
+
elementCount: number;
|
|
64
|
+
randomToken: string;
|
|
65
|
+
}>;
|
|
66
|
+
_collectLocatorInformation(selectorHierarchy: any, index: number | undefined, scope: any, foundLocators: any, _params: Params, info: any, visibleOnly?: boolean, allowDisabled?: boolean | undefined, element_name?: null): Promise<void>;
|
|
25
67
|
closeUnexpectedPopups(info: any, _params: any): Promise<{
|
|
26
68
|
rerun: boolean;
|
|
27
69
|
}>;
|
|
28
|
-
_locate(selectors: any, info: any, _params?: Params, timeout?:
|
|
29
|
-
|
|
30
|
-
|
|
70
|
+
_locate(selectors: any, info: any, _params?: Params, timeout: any, allowDisabled?: boolean | undefined): Promise<any>;
|
|
71
|
+
_findFrameScope(selectors: any, timeout: number | undefined, info: any): Promise<any>;
|
|
72
|
+
_getDocumentBody(selectors: any, timeout: number | undefined, info: any): Promise<any>;
|
|
73
|
+
_locate_internal(selectors: any, info: any, _params?: Params, timeout?: number, allowDisabled?: boolean | undefined): Promise<any>;
|
|
74
|
+
_scanLocatorsGroup(locatorsGroup: any, scope: any, _params: any, info: any, visibleOnly: any, allowDisabled?: boolean | undefined, element_name: any): Promise<{
|
|
31
75
|
foundElements: any[];
|
|
32
76
|
}>;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
77
|
+
simpleClick(elementDescription: any, _params?: Params, options?: {}, world?: null): Promise<void>;
|
|
78
|
+
simpleClickType(elementDescription: any, value: any, _params?: Params, options?: {}, world?: null): Promise<void>;
|
|
79
|
+
click(selectors: any, _params?: Params, options?: {}, world?: null): Promise<any>;
|
|
80
|
+
waitForElement(selectors: any, _params?: Params, options?: {}, world?: null): Promise<boolean>;
|
|
81
|
+
setCheck(selectors: any, checked?: boolean, _params?: Params, options?: {}, world?: null): Promise<any>;
|
|
82
|
+
hover(selectors: any, _params?: Params, options?: {}, world?: null): Promise<any>;
|
|
83
|
+
selectOption(selectors: any, values: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
84
|
+
type(_value: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
38
85
|
setInputValue(selectors: any, value: any, _params?: null, options?: {}, world?: null): Promise<void>;
|
|
39
86
|
setDateTime(selectors: any, value: any, format?: null, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<void>;
|
|
40
|
-
clickType(selectors: any, _value: any, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<
|
|
41
|
-
fill(selectors: any, value: any, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<
|
|
87
|
+
clickType(selectors: any, _value: any, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
88
|
+
fill(selectors: any, value: any, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
42
89
|
getText(selectors: any, _params?: null, options?: {}, info?: {}, world?: null): Promise<{
|
|
43
90
|
text: any;
|
|
44
91
|
screenshotId: any;
|
|
@@ -65,10 +112,11 @@ declare class StableBrowser {
|
|
|
65
112
|
value: any;
|
|
66
113
|
element?: undefined;
|
|
67
114
|
}>;
|
|
68
|
-
containsPattern(selectors: any, pattern: any, text: any, _params?: null, options?: {}, world?: null): Promise<
|
|
69
|
-
containsText(selectors: any, text: any, climb: any, _params?: null, options?: {}, world?: null): Promise<
|
|
70
|
-
|
|
115
|
+
containsPattern(selectors: any, pattern: any, text: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
116
|
+
containsText(selectors: any, text: any, climb: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
117
|
+
waitForUserInput(message: any, world?: null): Promise<void>;
|
|
71
118
|
setTestData(testData: any, world?: null): void;
|
|
119
|
+
overwriteTestData(testData: any, world?: null): void;
|
|
72
120
|
_getDataFilePath(fileName: any): string;
|
|
73
121
|
_parseCSVSync(filePath: any): Promise<unknown>;
|
|
74
122
|
loadTestData(type: string, dataSelector: string, world?: null): {
|
|
@@ -80,28 +128,48 @@ declare class StableBrowser {
|
|
|
80
128
|
getTestData(world?: null): {};
|
|
81
129
|
_screenShot(options?: {}, world?: null, info?: null): Promise<{}>;
|
|
82
130
|
takeScreenshot(screenshotPath: any): Promise<any>;
|
|
83
|
-
verifyElementExistInPage(selectors: any, _params?: null, options?: {}, world?: null): Promise<
|
|
84
|
-
extractAttribute(selectors: any, attribute: any, variable: any, _params?: null, options?: {}, world?: null): Promise<
|
|
131
|
+
verifyElementExistInPage(selectors: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
132
|
+
extractAttribute(selectors: any, attribute: any, variable: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
133
|
+
verifyAttribute(selectors: any, attribute: any, value: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
85
134
|
extractEmailData(emailAddress: any, options: any, world: any): Promise<{
|
|
86
135
|
emailUrl: any;
|
|
87
136
|
emailCode: any;
|
|
88
137
|
}>;
|
|
89
138
|
_highlightElements(scope: any, css: any): Promise<void>;
|
|
90
139
|
verifyPagePath(pathPart: any, options?: {}, world?: null): Promise<{} | undefined>;
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
140
|
+
verifyPageTitle(title: any, options?: {}, world?: null): Promise<{} | undefined>;
|
|
141
|
+
findTextInAllFrames(dateAlternatives: any, numberAlternatives: any, text: any, state: any, partial?: boolean, ignoreCase?: boolean): Promise<{
|
|
142
|
+
elementCount: number;
|
|
143
|
+
randomToken: string;
|
|
144
|
+
}[]>;
|
|
145
|
+
verifyTextExistInPage(text: any, options?: {}, world?: null): Promise<any>;
|
|
146
|
+
waitForTextToDisappear(text: any, options?: {}, world?: null): Promise<any>;
|
|
147
|
+
verifyTextRelatedToText(textAnchor: string, climb: number, textToVerify: string, options?: {}, world?: any): Promise<any>;
|
|
148
|
+
findRelatedTextInAllFrames(textAnchor: string, climb: number, textToVerify: string, params?: Params, options?: {}, world?: any): Promise<{
|
|
149
|
+
elementCount: number;
|
|
150
|
+
randomToken: string;
|
|
151
|
+
}[]>;
|
|
152
|
+
visualVerification(text: any, options?: {}, world?: null): Promise<{} | undefined>;
|
|
94
153
|
verifyTableData(selectors: any, data: any, _params?: null, options?: {}, world?: null): Promise<void>;
|
|
95
154
|
getTableData(selectors: any, _params?: null, options?: {}, world?: null): Promise<any>;
|
|
96
|
-
analyzeTable(selectors: any, query: any, operator: any, value: any, _params?: null, options?: {}, world?: null): Promise<{}>;
|
|
97
|
-
_replaceWithLocalData(value: any, world: any, _decrypt?: boolean, totpWait?: boolean): Promise<
|
|
155
|
+
analyzeTable(selectors: any, query: any, operator: any, value: any, _params?: null, options?: {}, world?: null): Promise<{} | undefined>;
|
|
156
|
+
_replaceWithLocalData(value: any, world: any, _decrypt?: boolean, totpWait?: boolean): Promise<string>;
|
|
98
157
|
_getLoadTimeout(options: any): number;
|
|
158
|
+
_getFindElementTimeout(options: any): any;
|
|
159
|
+
saveStoreState(path?: string | null, world?: any): Promise<void>;
|
|
160
|
+
restoreSaveState(path?: string | null, world?: any): Promise<void>;
|
|
99
161
|
waitForPageLoad(options?: {}, world?: null): Promise<void>;
|
|
100
162
|
closePage(options?: {}, world?: null): Promise<void>;
|
|
163
|
+
tableCellOperation(headerText: string, rowText: string, options: any, _params: Params, world?: null): Promise<void>;
|
|
164
|
+
saveTestDataAsGlobal(options: any, world: any): void;
|
|
101
165
|
setViewportSize(width: number, hight: number, options?: {}, world?: null): Promise<void>;
|
|
102
166
|
reloadPage(options?: {}, world?: null): Promise<void>;
|
|
103
167
|
scrollIfNeeded(element: any, info: any): Promise<void>;
|
|
104
|
-
|
|
168
|
+
beforeScenario(world: any, scenario: any): Promise<void>;
|
|
169
|
+
afterScenario(world: any, scenario: any): Promise<void>;
|
|
170
|
+
beforeStep(world: any, step: any): Promise<void>;
|
|
171
|
+
getAriaSnapshot(): Promise<string | null>;
|
|
172
|
+
afterStep(world: any, step: any): Promise<void>;
|
|
105
173
|
}
|
|
106
174
|
type JsonTimestamp = number;
|
|
107
175
|
type JsonResultPassed = {
|
|
@@ -116,7 +184,7 @@ type JsonResultFailed = {
|
|
|
116
184
|
message?: string;
|
|
117
185
|
};
|
|
118
186
|
type JsonCommandResult = JsonResultPassed | JsonResultFailed;
|
|
119
|
-
type JsonCommandReport = {
|
|
187
|
+
export type JsonCommandReport = {
|
|
120
188
|
type: string;
|
|
121
189
|
value?: string;
|
|
122
190
|
text: string;
|