automation_model 1.0.636-dev → 1.0.636-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 +31 -24
  45. package/lib/stable_browser.js +547 -176
  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 +1 -1
  50. package/lib/table_helper.js +26 -5
  51. package/lib/table_helper.js.map +1 -1
  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
@@ -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
- 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<{
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 };