automation_model 1.0.441-dev → 1.0.441

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.
Files changed (66) hide show
  1. package/README.md +130 -0
  2. package/lib/api.d.ts +43 -1
  3. package/lib/api.js +241 -43
  4. package/lib/api.js.map +1 -1
  5. package/lib/auto_page.d.ts +5 -2
  6. package/lib/auto_page.js +215 -49
  7. package/lib/auto_page.js.map +1 -1
  8. package/lib/browser_manager.d.ts +7 -3
  9. package/lib/browser_manager.js +169 -48
  10. package/lib/browser_manager.js.map +1 -1
  11. package/lib/bruno.d.ts +2 -0
  12. package/lib/bruno.js +381 -0
  13. package/lib/bruno.js.map +1 -0
  14. package/lib/command_common.d.ts +6 -0
  15. package/lib/command_common.js +198 -0
  16. package/lib/command_common.js.map +1 -0
  17. package/lib/environment.d.ts +4 -0
  18. package/lib/environment.js +6 -2
  19. package/lib/environment.js.map +1 -1
  20. package/lib/error-messages.d.ts +6 -0
  21. package/lib/error-messages.js +206 -0
  22. package/lib/error-messages.js.map +1 -0
  23. package/lib/file_checker.d.ts +1 -0
  24. package/lib/file_checker.js +61 -0
  25. package/lib/file_checker.js.map +1 -0
  26. package/lib/generation_scripts.d.ts +4 -0
  27. package/lib/generation_scripts.js +2 -0
  28. package/lib/generation_scripts.js.map +1 -0
  29. package/lib/index.d.ts +3 -0
  30. package/lib/index.js +3 -0
  31. package/lib/index.js.map +1 -1
  32. package/lib/init_browser.d.ts +5 -2
  33. package/lib/init_browser.js +128 -11
  34. package/lib/init_browser.js.map +1 -1
  35. package/lib/locate_element.d.ts +7 -0
  36. package/lib/locate_element.js +215 -0
  37. package/lib/locate_element.js.map +1 -0
  38. package/lib/locator.d.ts +36 -0
  39. package/lib/locator.js +165 -0
  40. package/lib/locator.js.map +1 -1
  41. package/lib/locator_log.d.ts +26 -0
  42. package/lib/locator_log.js +69 -0
  43. package/lib/locator_log.js.map +1 -0
  44. package/lib/network.d.ts +3 -0
  45. package/lib/network.js +183 -0
  46. package/lib/network.js.map +1 -0
  47. package/lib/scripts/axe.mini.js +12 -0
  48. package/lib/snapshot_validation.d.ts +37 -0
  49. package/lib/snapshot_validation.js +280 -0
  50. package/lib/snapshot_validation.js.map +1 -0
  51. package/lib/stable_browser.d.ts +108 -36
  52. package/lib/stable_browser.js +1948 -1239
  53. package/lib/stable_browser.js.map +1 -1
  54. package/lib/table.d.ts +13 -0
  55. package/lib/table.js +187 -0
  56. package/lib/table.js.map +1 -0
  57. package/lib/table_helper.d.ts +19 -0
  58. package/lib/table_helper.js +116 -0
  59. package/lib/table_helper.js.map +1 -0
  60. package/lib/test_context.d.ts +7 -0
  61. package/lib/test_context.js +15 -10
  62. package/lib/test_context.js.map +1 -1
  63. package/lib/utils.d.ts +22 -2
  64. package/lib/utils.js +672 -11
  65. package/lib/utils.js.map +1 -1
  66. package/package.json +15 -12
@@ -0,0 +1,37 @@
1
+ export declare function highlightSnapshot(snapshot: any, scope: any): Promise<void>;
2
+ /**
3
+ * One flattened line of an ARIA snapshot
4
+ */
5
+ interface SnapshotLine {
6
+ /** original 0-based line number in the file that was parsed */
7
+ line: number;
8
+ /** the ARIA role / node name: “text”, “button”, “listitem”… */
9
+ key: string;
10
+ /** the textual value after the role, or null */
11
+ value: string | null;
12
+ /** indentation depth (0 = root, 1 = child of the previous level, …) */
13
+ level: number;
14
+ /** validation / parsing flags */
15
+ error: string | null;
16
+ /** interpret `value` as a RegExp instead of literal text */
17
+ regex: boolean;
18
+ /** the original line text */
19
+ line_text: string;
20
+ }
21
+ export declare function fromLinesToSnapshotLines(lines: string[]): SnapshotLine[];
22
+ /**
23
+ * Successful-/error-report returned by `matchSnapshot`.
24
+ *
25
+ * ─ matchingLines … full-snapshot **original** line numbers that correspond
26
+ * to every line in the sub-snapshot (same order & length).
27
+ * ─ errorLine ….. first sub-snapshot index that could **not** be matched,
28
+ * or -1 when the whole sub-snapshot was found.
29
+ */
30
+ export interface MatchResult {
31
+ matchingLines: number[];
32
+ errorLine: number;
33
+ errorLineText: string | null;
34
+ }
35
+ export declare function snapshotValidation(snapshot: string, referanceSnapshot: string, snapshotName: string): MatchResult;
36
+ export declare function matchSnapshot(full: SnapshotLine[], sub: SnapshotLine[], snapshotName: string): MatchResult;
37
+ export {};
@@ -0,0 +1,280 @@
1
+ export async function highlightSnapshot(snapshot, scope) { }
2
+ /*
3
+ - banner:
4
+ - heading "Shop NOW" [level=6]
5
+ - text: Log In Username
6
+ - textbox "Username"
7
+ - text: Password
8
+ - textbox "Password"
9
+ - button "Login"
10
+ - paragraph: "Accepted usernames are:"
11
+ - list:
12
+ - listitem:
13
+ - paragraph: blinq_user
14
+ - listitem:
15
+ - paragraph: blinq_admin
16
+ - paragraph: "Password for all users:"
17
+ - paragraph: let_me_in
18
+ */
19
+ class SnapshotNode {
20
+ key;
21
+ value;
22
+ role;
23
+ name;
24
+ children = [];
25
+ parent = null;
26
+ constructor(key, value) {
27
+ this.key = key;
28
+ this.value = value;
29
+ if (!key) {
30
+ throw new Error("Key cannot be null or undefined");
31
+ }
32
+ this.role = key.split(" ")[0];
33
+ if (this.value) {
34
+ this.name = this.value;
35
+ }
36
+ else {
37
+ // the value will be from the first " to the last "
38
+ const start = key.indexOf('"') + 1;
39
+ const end = key.lastIndexOf('"');
40
+ if (start > -1 && end > -1 && start < end) {
41
+ this.name = key.substring(start, end);
42
+ }
43
+ else {
44
+ this.name = null;
45
+ }
46
+ }
47
+ }
48
+ generateNodeLocator() {
49
+ let locator = `internal:role=${this.role}`;
50
+ switch (this.role) {
51
+ case "paragraph":
52
+ // internal:role=paragraph >> internal:text='blinq_user'"
53
+ return `internal:role=${this.role} >> internal:text='${this.name}'`;
54
+ default:
55
+ // "internal:role=textbox[name=\"Password\"]"
56
+ if (this.name) {
57
+ locator += `[name="${this.name}"]`;
58
+ }
59
+ return locator;
60
+ }
61
+ }
62
+ getFullLocator() {
63
+ // create an array of all the parents and current node locators
64
+ const locators = [];
65
+ let currentNode = this;
66
+ while (currentNode) {
67
+ locators.unshift(currentNode.generateNodeLocator());
68
+ currentNode = currentNode.parent;
69
+ }
70
+ // join the locators with " >> "
71
+ return locators.join(" >> ");
72
+ }
73
+ }
74
+ export function fromLinesToSnapshotLines(lines) {
75
+ // the input is yaml text split into lines, 2 spaces is 1 level
76
+ const nodes = [];
77
+ // identify the space count for tabulation
78
+ let previouseLineSpaceCount = -1;
79
+ let foundTabulationCount = -1;
80
+ // look for 2 consecutive lines that have different space counts, the absolute difference is the space count for tabulation
81
+ for (let i = 0; i < lines.length; i++) {
82
+ const line = lines[i];
83
+ const trimmedLine = line.trim();
84
+ if (trimmedLine.length === 0) {
85
+ continue;
86
+ }
87
+ // count the number of leading spaces
88
+ const match = line.match(/^ */); // Matches spaces at the beginning
89
+ const count = match ? match[0].length : 0;
90
+ if (previouseLineSpaceCount !== -1 && previouseLineSpaceCount !== count) {
91
+ foundTabulationCount = Math.abs(previouseLineSpaceCount - count);
92
+ break;
93
+ }
94
+ previouseLineSpaceCount = count;
95
+ }
96
+ if (foundTabulationCount === -1) {
97
+ foundTabulationCount = 2;
98
+ }
99
+ for (let i = 0; i < lines.length; i++) {
100
+ const line = lines[i];
101
+ const trimmedLine = line.trim();
102
+ if (trimmedLine.length === 0) {
103
+ continue;
104
+ }
105
+ // count the number of leading spaces
106
+ let level = 0;
107
+ const match = line.match(/^ */); // Matches spaces at the beginning
108
+ const count = match ? match[0].length : 0;
109
+ level = count / foundTabulationCount; // 2 spaces is 1 level
110
+ // find the start of the line: - and space
111
+ const start = line.indexOf("- ") + 2;
112
+ if (start === -1) {
113
+ // no - found, set it to error
114
+ nodes.push({
115
+ line: i,
116
+ line_text: line,
117
+ key: line,
118
+ value: null,
119
+ level,
120
+ error: "No - found",
121
+ regex: false,
122
+ });
123
+ continue;
124
+ }
125
+ // first we need to extract the role, we should find the first space or : after the start
126
+ const end = line.indexOf(" ", start);
127
+ const end2 = line.indexOf(":", start);
128
+ if (end === -1 && end2 === -1) {
129
+ // no space or : found, set it to error
130
+ nodes.push({
131
+ line: i,
132
+ line_text: line,
133
+ key: line,
134
+ value: null,
135
+ level,
136
+ error: "No space or : found",
137
+ regex: false,
138
+ });
139
+ continue;
140
+ }
141
+ const endIndex = end === -1 ? end2 : end2 === -1 ? end : Math.min(end, end2);
142
+ const key = line.substring(start, endIndex).trim();
143
+ // define value is string or null
144
+ let value = line.substring(endIndex + 1).trim();
145
+ if (value.startsWith('"')) {
146
+ const lastQuote = value.lastIndexOf('"');
147
+ if (lastQuote !== -1) {
148
+ value = value.substring(0, lastQuote + 1);
149
+ }
150
+ }
151
+ // improved regex detection
152
+ const rawValue = value.endsWith(":") ? value.slice(0, -1) : value;
153
+ const regex = rawValue.startsWith("/") && /\/[a-z]*$/.test(rawValue);
154
+ nodes.push({
155
+ line: i,
156
+ line_text: line,
157
+ key,
158
+ value: value.length > 0 ? value : null,
159
+ level,
160
+ error: null,
161
+ regex,
162
+ });
163
+ }
164
+ return nodes;
165
+ }
166
+ /**
167
+ * Turn a “/pattern/flags” string into a real RegExp.
168
+ */
169
+ function toRegExp(raw) {
170
+ // Remove trailing colon from YAML-style key: /pattern/: → /pattern/
171
+ const sanitized = raw.endsWith(":") ? raw.slice(0, -1) : raw;
172
+ if (!sanitized.startsWith("/"))
173
+ return new RegExp(sanitized);
174
+ const lastSlash = sanitized.lastIndexOf("/");
175
+ const pattern = sanitized.slice(1, lastSlash);
176
+ const flags = sanitized.slice(lastSlash + 1); // i, g, etc.
177
+ return new RegExp(pattern, flags);
178
+ }
179
+ /**
180
+ * Single-line comparison with fixed regex handling.
181
+ */
182
+ function lineMatches(full, sub) {
183
+ let status = { status: false };
184
+ if (full.key !== sub.key)
185
+ return status;
186
+ // We handle level offset outside this function
187
+ if (sub.value === null) {
188
+ status.status = true;
189
+ return status;
190
+ }
191
+ if (sub.regex) {
192
+ status.status = toRegExp(sub.value).test(full.value ?? "");
193
+ }
194
+ else if (full.regex) {
195
+ status.status = toRegExp(full.value).test(sub.value ?? "");
196
+ }
197
+ else {
198
+ status.status = full.value === sub.value;
199
+ }
200
+ return status;
201
+ }
202
+ export function snapshotValidation(snapshot, referanceSnapshot, snapshotName) {
203
+ const lines = snapshot.split("\n");
204
+ const nodes = fromLinesToSnapshotLines(lines);
205
+ const subLines = referanceSnapshot.split("\n");
206
+ const subNodes = fromLinesToSnapshotLines(subLines);
207
+ return matchSnapshot(nodes, subNodes, snapshotName);
208
+ }
209
+ export function matchSnapshot(full, sub, snapshotName) {
210
+ const parentIdx = sub.map((_, i) => {
211
+ for (let j = i - 1; j >= 0; j--)
212
+ if (sub[j].level < sub[i].level)
213
+ return j;
214
+ return -1;
215
+ });
216
+ const fullIdx = new Array(sub.length);
217
+ const mapping = new Array(sub.length);
218
+ let failureAt = -1;
219
+ function dfs(s, fFrom, baseLevelOffset) {
220
+ if (s === sub.length)
221
+ return true;
222
+ for (let f = fFrom; f < full.length; f++) {
223
+ let levelMatch = true;
224
+ if (baseLevelOffset !== null) {
225
+ // Must match levels relative to initial offset
226
+ if (full[f].level !== sub[s].level + baseLevelOffset)
227
+ continue;
228
+ }
229
+ const status = lineMatches(full[f], sub[s]);
230
+ if (!status.status)
231
+ continue;
232
+ // For first match, set level offset
233
+ const nextBaseOffset = baseLevelOffset !== null ? baseLevelOffset : full[f].level - sub[s].level;
234
+ const pSub = parentIdx[s];
235
+ if (pSub !== -1) {
236
+ let pFull = f - 1;
237
+ while (pFull >= 0 && full[pFull].level >= full[f].level)
238
+ pFull--;
239
+ if (pFull < 0 || pFull !== fullIdx[pSub])
240
+ continue;
241
+ }
242
+ fullIdx[s] = f;
243
+ mapping[s] = full[f].line;
244
+ if (dfs(s + 1, f + 1, nextBaseOffset))
245
+ return true;
246
+ }
247
+ if (failureAt === -1)
248
+ failureAt = s;
249
+ return false;
250
+ }
251
+ const found = dfs(0, 0, null);
252
+ let error = null;
253
+ if (!found) {
254
+ error = `Snapshot file: ${snapshotName}\nLine no.: ${sub[failureAt].line}\nLine: ${sub[failureAt].line_text}`;
255
+ }
256
+ return {
257
+ matchingLines: found ? mapping : mapping.slice(0, failureAt),
258
+ errorLine: found ? -1 : failureAt,
259
+ errorLineText: error,
260
+ };
261
+ }
262
+ // let ttt = `- banner:
263
+ // - heading "Shop NOW" [level=6]
264
+ // - text: Log In Username
265
+ // - textbox "Username"
266
+ // - text: Password
267
+ // - textbox "Password"
268
+ // - button "Login"
269
+ // - paragraph: "Accepted usernames are:"
270
+ // - list:
271
+ // - listitem:
272
+ // - paragraph: blinq_user
273
+ // - listitem:
274
+ // - paragraph: blinq_admin
275
+ // - paragraph: "Password for all users:"
276
+ // - paragraph: let_me_in`;
277
+ // const lines = ttt.split("\n");
278
+ // const nodes = fromLinesToSnapshotLines(lines);
279
+ // console.log("nodes", nodes);
280
+ //# sourceMappingURL=snapshot_validation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshot_validation.js","sourceRoot":"","sources":["../../src/snapshot_validation.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,QAAa,EAAE,KAAU,IAAG,CAAC;AAErE;;;;;;;;;;;;;;;;EAgBE;AACF,MAAM,YAAY;IAMP;IACA;IANF,IAAI,CAAS;IACb,IAAI,CAAgB;IACpB,QAAQ,GAAmB,EAAE,CAAC;IAC9B,MAAM,GAAwB,IAAI,CAAC;IAC1C,YACS,GAAW,EACX,KAAa;QADb,QAAG,GAAH,GAAG,CAAQ;QACX,UAAK,GAAL,KAAK,CAAQ;QAEpB,IAAI,CAAC,GAAG,EAAE;YACR,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;SACpD;QACD,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;SACxB;aAAM;YACL,mDAAmD;YACnD,MAAM,KAAK,GAAG,GAAG,C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AAC,CAAC;QACpC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,KAAK,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;IAC9B,IAAI,KAAK,GAAG,IAAI,CAAC;IACjB,IAAI,CAAC,KAAK,EAAE;QACV,KAAK,GAAG,kBAAkB,YAAY,eAAe,GAAG,CAAC,SAAS,CAAC,CAAC,IAAI,WAAW,GAAG,CAAC,SAAS,CAAC,CAAC,SAAS,EAAE,CAAC;KAC/G;IAED,OAAO;QACL,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC;QAC5D,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;QACjC,aAAa,EAAE,KAAK;KACrB,CAAC;AACJ,CAAC;AACD,uBAAuB;AACvB,mCAAmC;AACnC,0BAA0B;AAC1B,uBAAuB;AACvB,mBAAmB;AACnB,uBAAuB;AACvB,mBAAmB;AACnB,yCAAyC;AACzC,UAAU;AACV,gBAAgB;AAChB,8BAA8B;AAC9B,gBAAgB;AAChB,+BAA+B;AAC/B,yCAAyC;AACzC,2BAA2B;AAC3B,iCAAiC;AACjC,iDAAiD;AACjD,+BAA+B"}
@@ -1,44 +1,95 @@
1
1
  import type { Browser, Page } from "playwright";
2
- type Params = Record<string, string>;
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
+ VERIFY_FILE_EXISTS: string;
38
+ SET_INPUT_FILES: string;
39
+ SNAPSHOT_VALIDATION: string;
40
+ };
41
+ export declare const apps: {};
3
42
  declare class StableBrowser {
4
43
  browser: Browser;
5
44
  page: Page;
6
45
  logger: any;
7
46
  context: any;
47
+ world?: any;
8
48
  project_path: null;
9
49
  webLogFile: null;
50
+ networkLogger: null;
10
51
  configuration: null;
11
- constructor(browser: Browser, page: Page, logger?: any, context?: any);
12
- getWebLogFile(logFolder: string): string;
13
- registerConsoleLogListener(page: Page, context: any, logFile: string): void;
14
- registerRequestListener(): void;
15
- goto(url: string): Promise<void>;
16
- _validateSelectors(selectors: any): void;
17
- _fixUsingParams(text: any, _params: Params): any;
18
- _fixLocatorUsingParams(locator: any, _params: Params): any;
19
- _isObject(value: any): any;
20
- scanAndManipulate(currentObj: any, _params: Params): void;
21
- _getLocator(locator: any, scope: any, _params: any): any;
52
+ appName: string;
53
+ tags: null;
54
+ isRecording: boolean;
55
+ initSnapshotTaken: boolean;
56
+ constructor(browser: Browser, page: Page, logger?: any, context?: any, world?: any);
57
+ registerEventListeners(context: any): void;
58
+ switchApp(appName: any): Promise<void>;
59
+ switchTab(tabTitleOrIndex: number | string): Promise<void>;
60
+ registerConsoleLogListener(page: Page, context: any): void;
61
+ registerRequestListener(page: Page, context: any, logFile: string): void;
62
+ goto(url: string, world?: null): Promise<void>;
63
+ _getLocator(locator: any, scope: any, _params: any): Promise<any>;
22
64
  _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<any>;
24
- _collectLocatorInformation(selectorHierarchy: any, index: number | undefined, scope: any, foundLocators: any, _params: Params, info: any, visibleOnly?: boolean): Promise<void>;
65
+ _locateElementByText(scope: any, text1: any, tag1: any, regex1: boolean | undefined, partial1: any, ignoreCase: boolean | undefined, _params: Params): Promise<{
66
+ elementCount: number;
67
+ randomToken: string;
68
+ }>;
69
+ _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>;
25
70
  closeUnexpectedPopups(info: any, _params: any): Promise<{
26
71
  rerun: boolean;
27
72
  }>;
28
- _locate(selectors: any, info: any, _params?: Params, timeout?: number): Promise<any>;
29
- _locate_internal(selectors: any, info: any, _params?: Params, timeout?: number): Promise<any>;
30
- _scanLocatorsGroup(locatorsGroup: any, scope: any, _params: any, info: any, visibleOnly: any): Promise<{
73
+ _locate(selectors: any, info: any, _params?: Params, timeout: any, allowDisabled?: boolean | undefined): Promise<any>;
74
+ _findFrameScope(selectors: any, timeout: number | undefined, info: any): Promise<any>;
75
+ _getDocumentBody(selectors: any, timeout: number | undefined, info: any): Promise<any>;
76
+ _locate_internal(selectors: any, info: any, _params?: Params, timeout?: number, allowDisabled?: boolean | undefined): Promise<any>;
77
+ _scanLocatorsGroup(locatorsGroup: any, scope: any, _params: any, info: any, visibleOnly: any, allowDisabled?: boolean | undefined, element_name: any, logErrors?: boolean | undefined): Promise<{
31
78
  foundElements: any[];
32
79
  }>;
33
- click(selectors: any, _params?: Params, options?: {}, world?: null): Promise<{}>;
34
- setCheck(selectors: any, checked?: boolean, _params?: Params, options?: {}, world?: null): Promise<{}>;
35
- hover(selectors: any, _params?: Params, options?: {}, world?: null): Promise<{}>;
36
- selectOption(selectors: any, values: any, _params?: null, options?: {}, world?: null): Promise<{}>;
37
- type(_value: any, _params?: null, options?: {}, world?: null): Promise<{}>;
80
+ simpleClick(elementDescription: any, _params?: Params, options?: {}, world?: null): Promise<void>;
81
+ simpleClickType(elementDescription: any, value: any, _params?: Params, options?: {}, world?: null): Promise<void>;
82
+ click(selectors: any, _params?: Params, options?: {}, world?: null): Promise<any>;
83
+ waitForElement(selectors: any, _params?: Params, options?: {}, world?: null): Promise<boolean>;
84
+ setCheck(selectors: any, checked?: boolean, _params?: Params, options?: {}, world?: null): Promise<any>;
85
+ hover(selectors: any, _params?: Params, options?: {}, world?: null): Promise<any>;
86
+ selectOption(selectors: any, values: any, _params?: null, options?: {}, world?: null): Promise<any>;
87
+ type(_value: any, _params?: null, options?: {}, world?: null): Promise<any>;
38
88
  setInputValue(selectors: any, value: any, _params?: null, options?: {}, world?: null): Promise<void>;
39
89
  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<{}>;
90
+ clickType(selectors: any, _value: any, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<any>;
91
+ fill(selectors: any, value: any, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<any>;
92
+ setInputFiles(selectors: any, files: any, _params?: null, options?: {}, world?: null): Promise<any>;
42
93
  getText(selectors: any, _params?: null, options?: {}, info?: {}, world?: null): Promise<{
43
94
  text: any;
44
95
  screenshotId: any;
@@ -65,11 +116,12 @@ declare class StableBrowser {
65
116
  value: any;
66
117
  element?: undefined;
67
118
  }>;
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
- _getDataFile(world?: null): string;
119
+ containsPattern(selectors: any, pattern: any, text: any, _params?: null, options?: {}, world?: null): Promise<any>;
120
+ containsText(selectors: any, text: any, climb: any, _params?: null, options?: {}, world?: null): Promise<any>;
121
+ snapshotValidation(frameSelectors: any, referanceSnapshot: any, _params?: null, options?: {}, world?: null): Promise<any>;
71
122
  waitForUserInput(message: any, world?: null): Promise<void>;
72
123
  setTestData(testData: any, world?: null): void;
124
+ overwriteTestData(testData: any, world?: null): void;
73
125
  _getDataFilePath(fileName: any): string;
74
126
  _parseCSVSync(filePath: any): Promise<unknown>;
75
127
  loadTestData(type: string, dataSelector: string, world?: null): {
@@ -81,28 +133,48 @@ declare class StableBrowser {
81
133
  getTestData(world?: null): {};
82
134
  _screenShot(options?: {}, world?: null, info?: null): Promise<{}>;
83
135
  takeScreenshot(screenshotPath: any): Promise<any>;
84
- verifyElementExistInPage(selectors: any, _params?: null, options?: {}, world?: null): Promise<{}>;
85
- extractAttribute(selectors: any, attribute: any, variable: any, _params?: null, options?: {}, world?: null): Promise<{}>;
136
+ verifyElementExistInPage(selectors: any, _params?: null, options?: {}, world?: null): Promise<any>;
137
+ extractAttribute(selectors: any, attribute: any, variable: any, _params?: null, options?: {}, world?: null): Promise<any>;
138
+ verifyAttribute(selectors: any, attribute: any, value: any, _params?: null, options?: {}, world?: null): Promise<any>;
86
139
  extractEmailData(emailAddress: any, options: any, world: any): Promise<{
87
140
  emailUrl: any;
88
141
  emailCode: any;
89
142
  }>;
90
143
  _highlightElements(scope: any, css: any): Promise<void>;
91
144
  verifyPagePath(pathPart: any, options?: {}, world?: null): Promise<{} | undefined>;
92
- verifyTextExistInPage(text: any, options?: {}, world?: null): Promise<{}>;
93
- _getServerUrl(): string;
94
- visualVerification(text: any, options?: {}, world?: null): Promise<{}>;
145
+ verifyPageTitle(title: any, options?: {}, world?: null): Promise<{} | undefined>;
146
+ findTextInAllFrames(dateAlternatives: any, numberAlternatives: any, text: any, state: any, partial?: boolean, ignoreCase?: boolean): Promise<{
147
+ elementCount: number;
148
+ randomToken: string;
149
+ }[]>;
150
+ verifyTextExistInPage(text: any, options?: {}, world?: null): Promise<any>;
151
+ waitForTextToDisappear(text: any, options?: {}, world?: null): Promise<any>;
152
+ verifyTextRelatedToText(textAnchor: string, climb: number, textToVerify: string, options?: {}, world?: any): Promise<any>;
153
+ findRelatedTextInAllFrames(textAnchor: string, climb: number, textToVerify: string, params?: Params, options?: {}, world?: any): Promise<{
154
+ elementCount: number;
155
+ randomToken: string;
156
+ }[]>;
157
+ visualVerification(text: any, options?: {}, world?: null): Promise<{} | undefined>;
95
158
  verifyTableData(selectors: any, data: any, _params?: null, options?: {}, world?: null): Promise<void>;
96
159
  getTableData(selectors: any, _params?: null, options?: {}, world?: null): Promise<any>;
97
- analyzeTable(selectors: any, query: any, operator: any, value: any, _params?: null, options?: {}, world?: null): Promise<{}>;
98
- _replaceWithLocalData(value: any, world: any, _decrypt?: boolean, totpWait?: boolean): Promise<any>;
160
+ analyzeTable(selectors: any, query: any, operator: any, value: any, _params?: null, options?: {}, world?: null): Promise<{} | undefined>;
161
+ _replaceWithLocalData(value: any, world: any, _decrypt?: boolean, totpWait?: boolean): Promise<string>;
99
162
  _getLoadTimeout(options: any): number;
163
+ _getFindElementTimeout(options: any): any;
164
+ saveStoreState(path?: string | null, world?: any): Promise<void>;
165
+ restoreSaveState(path?: string | null, world?: any): Promise<void>;
100
166
  waitForPageLoad(options?: {}, world?: null): Promise<void>;
101
167
  closePage(options?: {}, world?: null): Promise<void>;
168
+ tableCellOperation(headerText: string, rowText: string, options: any, _params: Params, world?: null): Promise<void>;
169
+ saveTestDataAsGlobal(options: any, world: any): void;
102
170
  setViewportSize(width: number, hight: number, options?: {}, world?: null): Promise<void>;
103
171
  reloadPage(options?: {}, world?: null): Promise<void>;
104
172
  scrollIfNeeded(element: any, info: any): Promise<void>;
105
- _reportToWorld(world: any, properties: JsonCommandReport): void;
173
+ beforeScenario(world: any, scenario: any): Promise<void>;
174
+ afterScenario(world: any, scenario: any): Promise<void>;
175
+ beforeStep(world: any, step: any): Promise<void>;
176
+ getAriaSnapshot(): Promise<string | null>;
177
+ afterStep(world: any, step: any): Promise<void>;
106
178
  }
107
179
  type JsonTimestamp = number;
108
180
  type JsonResultPassed = {
@@ -117,7 +189,7 @@ type JsonResultFailed = {
117
189
  message?: string;
118
190
  };
119
191
  type JsonCommandResult = JsonResultPassed | JsonResultFailed;
120
- type JsonCommandReport = {
192
+ export type JsonCommandReport = {
121
193
  type: string;
122
194
  value?: string;
123
195
  text: string;