automation_model 1.0.606-dev → 1.0.606-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 (43) hide show
  1. package/README.md +130 -0
  2. package/lib/api.js +35 -21
  3. package/lib/api.js.map +1 -1
  4. package/lib/auto_page.d.ts +3 -1
  5. package/lib/auto_page.js +78 -18
  6. package/lib/auto_page.js.map +1 -1
  7. package/lib/browser_manager.js +53 -16
  8. package/lib/browser_manager.js.map +1 -1
  9. package/lib/bruno.d.ts +2 -0
  10. package/lib/bruno.js +381 -0
  11. package/lib/bruno.js.map +1 -0
  12. package/lib/command_common.d.ts +4 -4
  13. package/lib/command_common.js +34 -16
  14. package/lib/command_common.js.map +1 -1
  15. package/lib/error-messages.js +6 -0
  16. package/lib/error-messages.js.map +1 -1
  17. package/lib/file_checker.d.ts +1 -0
  18. package/lib/file_checker.js +61 -0
  19. package/lib/file_checker.js.map +1 -0
  20. package/lib/index.d.ts +2 -0
  21. package/lib/index.js +2 -0
  22. package/lib/index.js.map +1 -1
  23. package/lib/init_browser.d.ts +3 -2
  24. package/lib/init_browser.js +52 -12
  25. package/lib/init_browser.js.map +1 -1
  26. package/lib/locate_element.js +2 -2
  27. package/lib/locate_element.js.map +1 -1
  28. package/lib/network.d.ts +1 -1
  29. package/lib/network.js +5 -5
  30. package/lib/network.js.map +1 -1
  31. package/lib/stable_browser.d.ts +22 -1
  32. package/lib/stable_browser.js +680 -197
  33. package/lib/stable_browser.js.map +1 -1
  34. package/lib/table_helper.d.ts +19 -0
  35. package/lib/table_helper.js +116 -0
  36. package/lib/table_helper.js.map +1 -0
  37. package/lib/test_context.d.ts +3 -0
  38. package/lib/test_context.js +2 -0
  39. package/lib/test_context.js.map +1 -1
  40. package/lib/utils.d.ts +8 -4
  41. package/lib/utils.js +217 -19
  42. package/lib/utils.js.map +1 -1
  43. package/package.json +9 -8
@@ -2,6 +2,7 @@ import type { Browser, Page } from "playwright";
2
2
  import { Params } from "./utils.js";
3
3
  export declare const Types: {
4
4
  CLICK: string;
5
+ WAIT_ELEMENT: string;
5
6
  NAVIGATE: string;
6
7
  FILL: string;
7
8
  EXECUTE: string;
@@ -23,6 +24,7 @@ export declare const Types: {
23
24
  UNCHECK: string;
24
25
  EXTRACT: string;
25
26
  CLOSE_PAGE: string;
27
+ TABLE_OPERATION: string;
26
28
  SET_DATE_TIME: string;
27
29
  SET_VIEWPORT: string;
28
30
  VERIFY_VISUAL: string;
@@ -31,6 +33,9 @@ export declare const Types: {
31
33
  WAIT_FOR_TEXT_TO_DISAPPEAR: string;
32
34
  VERIFY_ATTRIBUTE: string;
33
35
  VERIFY_TEXT_WITH_RELATION: string;
36
+ BRUNO: string;
37
+ VERIFY_FILE_EXISTS: string;
38
+ SET_INPUT_FILES: string;
34
39
  };
35
40
  export declare const apps: {};
36
41
  declare class StableBrowser {
@@ -46,9 +51,11 @@ declare class StableBrowser {
46
51
  appName: string;
47
52
  tags: null;
48
53
  isRecording: boolean;
54
+ initSnapshotTaken: boolean;
49
55
  constructor(browser: Browser, page: Page, logger?: any, context?: any, world?: any);
50
56
  registerEventListeners(context: any): void;
51
57
  switchApp(appName: any): Promise<void>;
58
+ switchTab(tabTitleOrIndex: number | string): Promise<void>;
52
59
  registerConsoleLogListener(page: Page, context: any): void;
53
60
  registerRequestListener(page: Page, context: any, logFile: string): void;
54
61
  goto(url: string, world?: null): Promise<void>;
@@ -72,6 +79,7 @@ declare class StableBrowser {
72
79
  simpleClick(elementDescription: any, _params?: Params, options?: {}, world?: null): Promise<void>;
73
80
  simpleClickType(elementDescription: any, value: any, _params?: Params, options?: {}, world?: null): Promise<void>;
74
81
  click(selectors: any, _params?: Params, options?: {}, world?: null): Promise<any>;
82
+ waitForElement(selectors: any, _params?: Params, options?: {}, world?: null): Promise<boolean>;
75
83
  setCheck(selectors: any, checked?: boolean, _params?: Params, options?: {}, world?: null): Promise<any>;
76
84
  hover(selectors: any, _params?: Params, options?: {}, world?: null): Promise<any>;
77
85
  selectOption(selectors: any, values: any, _params?: null, options?: {}, world?: null): Promise<any>;
@@ -80,6 +88,7 @@ declare class StableBrowser {
80
88
  setDateTime(selectors: any, value: any, format?: null, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<void>;
81
89
  clickType(selectors: any, _value: any, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<any>;
82
90
  fill(selectors: any, value: any, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<any>;
91
+ setInputFiles(selectors: any, files: any, _params?: null, options?: {}, world?: null): Promise<any>;
83
92
  getText(selectors: any, _params?: null, options?: {}, info?: {}, world?: null): Promise<{
84
93
  text: any;
85
94
  screenshotId: any;
@@ -110,6 +119,7 @@ declare class StableBrowser {
110
119
  containsText(selectors: any, text: any, climb: any, _params?: null, options?: {}, world?: null): Promise<any>;
111
120
  waitForUserInput(message: any, world?: null): Promise<void>;
112
121
  setTestData(testData: any, world?: null): void;
122
+ overwriteTestData(testData: any, world?: null): void;
113
123
  _getDataFilePath(fileName: any): string;
114
124
  _parseCSVSync(filePath: any): Promise<unknown>;
115
125
  loadTestData(type: string, dataSelector: string, world?: null): {
@@ -130,27 +140,38 @@ declare class StableBrowser {
130
140
  }>;
131
141
  _highlightElements(scope: any, css: any): Promise<void>;
132
142
  verifyPagePath(pathPart: any, options?: {}, world?: null): Promise<{} | undefined>;
133
- findTextInAllFrames(dateAlternatives: any, numberAlternatives: any, text: any, state: any): Promise<{
143
+ verifyPageTitle(title: any, options?: {}, world?: null): Promise<{} | undefined>;
144
+ findTextInAllFrames(dateAlternatives: any, numberAlternatives: any, text: any, state: any, partial?: boolean, ignoreCase?: boolean): Promise<{
134
145
  elementCount: number;
135
146
  randomToken: string;
136
147
  }[]>;
137
148
  verifyTextExistInPage(text: any, options?: {}, world?: null): Promise<any>;
138
149
  waitForTextToDisappear(text: any, options?: {}, world?: null): Promise<any>;
139
150
  verifyTextRelatedToText(textAnchor: string, climb: number, textToVerify: string, options?: {}, world?: any): Promise<any>;
151
+ findRelatedTextInAllFrames(textAnchor: string, climb: number, textToVerify: string, params?: Params, options?: {}, world?: any): Promise<{
152
+ elementCount: number;
153
+ randomToken: string;
154
+ }[]>;
140
155
  visualVerification(text: any, options?: {}, world?: null): Promise<{} | undefined>;
141
156
  verifyTableData(selectors: any, data: any, _params?: null, options?: {}, world?: null): Promise<void>;
142
157
  getTableData(selectors: any, _params?: null, options?: {}, world?: null): Promise<any>;
143
158
  analyzeTable(selectors: any, query: any, operator: any, value: any, _params?: null, options?: {}, world?: null): Promise<{} | undefined>;
144
159
  _replaceWithLocalData(value: any, world: any, _decrypt?: boolean, totpWait?: boolean): Promise<string>;
145
160
  _getLoadTimeout(options: any): number;
161
+ _getFindElementTimeout(options: any): any;
146
162
  saveStoreState(path?: string | null, world?: any): Promise<void>;
163
+ restoreSaveState(path?: string | null, world?: any): Promise<void>;
147
164
  waitForPageLoad(options?: {}, world?: null): Promise<void>;
148
165
  closePage(options?: {}, world?: null): Promise<void>;
166
+ tableCellOperation(headerText: string, rowText: string, options: any, _params: Params, world?: null): Promise<void>;
149
167
  saveTestDataAsGlobal(options: any, world: any): void;
150
168
  setViewportSize(width: number, hight: number, options?: {}, world?: null): Promise<void>;
151
169
  reloadPage(options?: {}, world?: null): Promise<void>;
152
170
  scrollIfNeeded(element: any, info: any): Promise<void>;
171
+ beforeScenario(world: any, scenario: any): Promise<void>;
172
+ afterScenario(world: any, scenario: any): Promise<void>;
153
173
  beforeStep(world: any, step: any): Promise<void>;
174
+ getAriaSnapshot(): Promise<string | null>;
154
175
  afterStep(world: any, step: any): Promise<void>;
155
176
  }
156
177
  type JsonTimestamp = number;