automation_model 1.0.634-dev → 1.0.634-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.
Files changed (58) hide show
  1. package/README.md +16 -16
  2. package/lib/analyze_helper.js.map +1 -1
  3. package/lib/api.d.ts +0 -1
  4. package/lib/api.js +35 -21
  5. package/lib/api.js.map +1 -1
  6. package/lib/auto_page.d.ts +1 -1
  7. package/lib/auto_page.js +99 -28
  8. package/lib/auto_page.js.map +1 -1
  9. package/lib/browser_manager.js +38 -9
  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 +4 -4
  15. package/lib/command_common.js +36 -16
  16. package/lib/command_common.js.map +1 -1
  17. package/lib/date_time.js.map +1 -1
  18. package/lib/drawRect.js.map +1 -1
  19. package/lib/environment.d.ts +1 -0
  20. package/lib/environment.js +1 -0
  21. package/lib/environment.js.map +1 -1
  22. package/lib/error-messages.js.map +1 -1
  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/find_function.js.map +1 -1
  27. package/lib/index.d.ts +2 -0
  28. package/lib/index.js +2 -0
  29. package/lib/index.js.map +1 -1
  30. package/lib/init_browser.d.ts +2 -2
  31. package/lib/init_browser.js +33 -27
  32. package/lib/init_browser.js.map +1 -1
  33. package/lib/locate_element.js +2 -2
  34. package/lib/locate_element.js.map +1 -1
  35. package/lib/locator.js +1 -1
  36. package/lib/locator.js.map +1 -1
  37. package/lib/locator_log.js.map +1 -1
  38. package/lib/network.d.ts +1 -1
  39. package/lib/network.js +5 -5
  40. package/lib/network.js.map +1 -1
  41. package/lib/snapshot_validation.d.ts +37 -0
  42. package/lib/snapshot_validation.js +357 -0
  43. package/lib/snapshot_validation.js.map +1 -0
  44. package/lib/stable_browser.d.ts +32 -23
  45. package/lib/stable_browser.js +633 -167
  46. package/lib/stable_browser.js.map +1 -1
  47. package/lib/table.js.map +1 -1
  48. package/lib/table_analyze.js.map +1 -1
  49. package/lib/table_helper.d.ts +19 -0
  50. package/lib/table_helper.js +116 -0
  51. package/lib/table_helper.js.map +1 -0
  52. package/lib/test_context.d.ts +2 -0
  53. package/lib/test_context.js +2 -0
  54. package/lib/test_context.js.map +1 -1
  55. package/lib/utils.d.ts +7 -4
  56. package/lib/utils.js +205 -20
  57. package/lib/utils.js.map +1 -1
  58. package/package.json +11 -6
@@ -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,12 @@ 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;
41
+ STEP_COMPLETE: string;
35
42
  };
36
43
  export declare const apps: {};
37
44
  declare class StableBrowser {
@@ -51,6 +58,7 @@ declare class StableBrowser {
51
58
  constructor(browser: Browser, page: Page, logger?: any, context?: any, world?: any);
52
59
  registerEventListeners(context: any): void;
53
60
  switchApp(appName: any): Promise<void>;
61
+ switchTab(tabTitleOrIndex: number | string): Promise<void>;
54
62
  registerConsoleLogListener(page: Page, context: any): void;
55
63
  registerRequestListener(page: Page, context: any, logFile: string): void;
56
64
  goto(url: string, world?: null): Promise<void>;
@@ -60,7 +68,7 @@ declare class StableBrowser {
60
68
  elementCount: number;
61
69
  randomToken: string;
62
70
  }>;
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>;
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>;
64
72
  closeUnexpectedPopups(info: any, _params: any): Promise<{
65
73
  rerun: boolean;
66
74
  }>;
@@ -68,7 +76,7 @@ declare class StableBrowser {
68
76
  _findFrameScope(selectors: any, timeout: number | undefined, info: any): Promise<any>;
69
77
  _getDocumentBody(selectors: any, timeout: number | undefined, info: any): Promise<any>;
70
78
  _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<{
79
+ _scanLocatorsGroup(locatorsGroup: any, scope: any, _params: any, info: any, visibleOnly: any, allowDisabled?: boolean | undefined, element_name: any, logErrors?: boolean | undefined): Promise<{
72
80
  foundElements: any[];
73
81
  }>;
74
82
  simpleClick(elementDescription: any, _params?: Params, options?: {}, world?: null): Promise<void>;
@@ -83,6 +91,7 @@ declare class StableBrowser {
83
91
  setDateTime(selectors: any, value: any, format?: null, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<void>;
84
92
  clickType(selectors: any, _value: any, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<any>;
85
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>;
86
95
  getText(selectors: any, _params?: null, options?: {}, info?: {}, world?: null): Promise<{
87
96
  text: any;
88
97
  screenshotId: any;
@@ -111,8 +120,10 @@ declare class StableBrowser {
111
120
  }>;
112
121
  containsPattern(selectors: any, pattern: any, text: any, _params?: null, options?: {}, world?: null): Promise<any>;
113
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>;
114
124
  waitForUserInput(message: any, world?: null): Promise<void>;
115
125
  setTestData(testData: any, world?: null): void;
126
+ overwriteTestData(testData: any, world?: null): void;
116
127
  _getDataFilePath(fileName: any): string;
117
128
  _parseCSVSync(filePath: any): Promise<unknown>;
118
129
  loadTestData(type: string, dataSelector: string, world?: null): {
@@ -133,13 +144,18 @@ declare class StableBrowser {
133
144
  }>;
134
145
  _highlightElements(scope: any, css: any): Promise<void>;
135
146
  verifyPagePath(pathPart: any, options?: {}, world?: null): Promise<{} | undefined>;
136
- findTextInAllFrames(dateAlternatives: any, numberAlternatives: any, text: any, state: any): Promise<{
147
+ verifyPageTitle(title: any, options?: {}, world?: null): Promise<{} | undefined>;
148
+ findTextInAllFrames(dateAlternatives: any, numberAlternatives: any, text: any, state: any, partial?: boolean, ignoreCase?: boolean): Promise<{
137
149
  elementCount: number;
138
150
  randomToken: string;
139
151
  }[]>;
140
152
  verifyTextExistInPage(text: any, options?: {}, world?: null): Promise<any>;
141
153
  waitForTextToDisappear(text: any, options?: {}, world?: null): Promise<any>;
142
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
+ }[]>;
143
159
  visualVerification(text: any, options?: {}, world?: null): Promise<{} | undefined>;
144
160
  verifyTableData(selectors: any, data: any, _params?: null, options?: {}, world?: null): Promise<void>;
145
161
  getTableData(selectors: any, _params?: null, options?: {}, world?: null): Promise<any>;
@@ -151,32 +167,25 @@ declare class StableBrowser {
151
167
  restoreSaveState(path?: string | null, world?: any): Promise<void>;
152
168
  waitForPageLoad(options?: {}, world?: null): Promise<void>;
153
169
  closePage(options?: {}, world?: null): Promise<void>;
170
+ tableCellOperation(headerText: string, rowText: string, options: any, _params: Params, world?: null): Promise<void>;
154
171
  saveTestDataAsGlobal(options: any, world: any): void;
155
172
  setViewportSize(width: number, hight: number, options?: {}, world?: null): Promise<void>;
156
173
  reloadPage(options?: {}, world?: null): Promise<void>;
157
174
  scrollIfNeeded(element: any, info: any): Promise<void>;
175
+ beforeScenario(world: any, scenario: any): Promise<void>;
176
+ afterScenario(world: any, scenario: any): Promise<void>;
158
177
  beforeStep(world: any, step: any): Promise<void>;
159
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>;
160
189
  afterStep(world: any, step: any): Promise<void>;
161
190
  }
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
191
  export { StableBrowser };