automation_model 1.0.604-dev → 1.0.604-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 +102 -40
  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 +20 -1
  32. package/lib/stable_browser.js +645 -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 +214 -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,8 @@ 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;
34
38
  };
35
39
  export declare const apps: {};
36
40
  declare class StableBrowser {
@@ -46,9 +50,11 @@ declare class StableBrowser {
46
50
  appName: string;
47
51
  tags: null;
48
52
  isRecording: boolean;
53
+ initSnapshotTaken: boolean;
49
54
  constructor(browser: Browser, page: Page, logger?: any, context?: any, world?: any);
50
55
  registerEventListeners(context: any): void;
51
56
  switchApp(appName: any): Promise<void>;
57
+ switchTab(tabTitleOrIndex: number | string): Promise<void>;
52
58
  registerConsoleLogListener(page: Page, context: any): void;
53
59
  registerRequestListener(page: Page, context: any, logFile: string): void;
54
60
  goto(url: string, world?: null): Promise<void>;
@@ -72,6 +78,7 @@ declare class StableBrowser {
72
78
  simpleClick(elementDescription: any, _params?: Params, options?: {}, world?: null): Promise<void>;
73
79
  simpleClickType(elementDescription: any, value: any, _params?: Params, options?: {}, world?: null): Promise<void>;
74
80
  click(selectors: any, _params?: Params, options?: {}, world?: null): Promise<any>;
81
+ waitForElement(selectors: any, _params?: Params, options?: {}, world?: null): Promise<boolean>;
75
82
  setCheck(selectors: any, checked?: boolean, _params?: Params, options?: {}, world?: null): Promise<any>;
76
83
  hover(selectors: any, _params?: Params, options?: {}, world?: null): Promise<any>;
77
84
  selectOption(selectors: any, values: any, _params?: null, options?: {}, world?: null): Promise<any>;
@@ -110,6 +117,7 @@ declare class StableBrowser {
110
117
  containsText(selectors: any, text: any, climb: any, _params?: null, options?: {}, world?: null): Promise<any>;
111
118
  waitForUserInput(message: any, world?: null): Promise<void>;
112
119
  setTestData(testData: any, world?: null): void;
120
+ overwriteTestData(testData: any, world?: null): void;
113
121
  _getDataFilePath(fileName: any): string;
114
122
  _parseCSVSync(filePath: any): Promise<unknown>;
115
123
  loadTestData(type: string, dataSelector: string, world?: null): {
@@ -130,27 +138,38 @@ declare class StableBrowser {
130
138
  }>;
131
139
  _highlightElements(scope: any, css: any): Promise<void>;
132
140
  verifyPagePath(pathPart: any, options?: {}, world?: null): Promise<{} | undefined>;
133
- findTextInAllFrames(dateAlternatives: any, numberAlternatives: any, text: any, state: any): Promise<{
141
+ verifyPageTitle(title: any, options?: {}, world?: null): Promise<{} | undefined>;
142
+ findTextInAllFrames(dateAlternatives: any, numberAlternatives: any, text: any, state: any, partial?: boolean, ignoreCase?: boolean): Promise<{
134
143
  elementCount: number;
135
144
  randomToken: string;
136
145
  }[]>;
137
146
  verifyTextExistInPage(text: any, options?: {}, world?: null): Promise<any>;
138
147
  waitForTextToDisappear(text: any, options?: {}, world?: null): Promise<any>;
139
148
  verifyTextRelatedToText(textAnchor: string, climb: number, textToVerify: string, options?: {}, world?: any): Promise<any>;
149
+ findRelatedTextInAllFrames(textAnchor: string, climb: number, textToVerify: string, params?: Params, options?: {}, world?: any): Promise<{
150
+ elementCount: number;
151
+ randomToken: string;
152
+ }[]>;
140
153
  visualVerification(text: any, options?: {}, world?: null): Promise<{} | undefined>;
141
154
  verifyTableData(selectors: any, data: any, _params?: null, options?: {}, world?: null): Promise<void>;
142
155
  getTableData(selectors: any, _params?: null, options?: {}, world?: null): Promise<any>;
143
156
  analyzeTable(selectors: any, query: any, operator: any, value: any, _params?: null, options?: {}, world?: null): Promise<{} | undefined>;
144
157
  _replaceWithLocalData(value: any, world: any, _decrypt?: boolean, totpWait?: boolean): Promise<string>;
145
158
  _getLoadTimeout(options: any): number;
159
+ _getFindElementTimeout(options: any): any;
146
160
  saveStoreState(path?: string | null, world?: any): Promise<void>;
161
+ restoreSaveState(path?: string | null, world?: any): Promise<void>;
147
162
  waitForPageLoad(options?: {}, world?: null): Promise<void>;
148
163
  closePage(options?: {}, world?: null): Promise<void>;
164
+ tableCellOperation(headerText: string, rowText: string, options: any, _params: Params, world?: null): Promise<void>;
149
165
  saveTestDataAsGlobal(options: any, world: any): void;
150
166
  setViewportSize(width: number, hight: number, options?: {}, world?: null): Promise<void>;
151
167
  reloadPage(options?: {}, world?: null): Promise<void>;
152
168
  scrollIfNeeded(element: any, info: any): Promise<void>;
169
+ beforeScenario(world: any, scenario: any): Promise<void>;
170
+ afterScenario(world: any, scenario: any): Promise<void>;
153
171
  beforeStep(world: any, step: any): Promise<void>;
172
+ getAriaSnapshot(): Promise<string | null>;
154
173
  afterStep(world: any, step: any): Promise<void>;
155
174
  }
156
175
  type JsonTimestamp = number;