automation_model 1.0.471-dev → 1.0.471-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/lib/api.d.ts +42 -1
  2. package/lib/api.js +221 -47
  3. package/lib/api.js.map +1 -1
  4. package/lib/auto_page.js +38 -16
  5. package/lib/auto_page.js.map +1 -1
  6. package/lib/browser_manager.d.ts +5 -3
  7. package/lib/browser_manager.js +65 -18
  8. package/lib/browser_manager.js.map +1 -1
  9. package/lib/command_common.d.ts +6 -0
  10. package/lib/command_common.js +148 -0
  11. package/lib/command_common.js.map +1 -0
  12. package/lib/environment.js +5 -3
  13. package/lib/environment.js.map +1 -1
  14. package/lib/error-messages.d.ts +6 -0
  15. package/lib/error-messages.js +188 -0
  16. package/lib/error-messages.js.map +1 -0
  17. package/lib/index.d.ts +1 -0
  18. package/lib/index.js +1 -0
  19. package/lib/index.js.map +1 -1
  20. package/lib/init_browser.d.ts +1 -1
  21. package/lib/init_browser.js +31 -4
  22. package/lib/init_browser.js.map +1 -1
  23. package/lib/locate_element.js +5 -3
  24. package/lib/locate_element.js.map +1 -1
  25. package/lib/locator.d.ts +36 -0
  26. package/lib/locator.js +165 -0
  27. package/lib/locator.js.map +1 -1
  28. package/lib/network.d.ts +3 -0
  29. package/lib/network.js +144 -0
  30. package/lib/network.js.map +1 -0
  31. package/lib/stable_browser.d.ts +25 -19
  32. package/lib/stable_browser.js +633 -812
  33. package/lib/stable_browser.js.map +1 -1
  34. package/lib/table.d.ts +13 -0
  35. package/lib/table.js +187 -0
  36. package/lib/table.js.map +1 -0
  37. package/lib/test_context.d.ts +1 -0
  38. package/lib/test_context.js +12 -12
  39. package/lib/test_context.js.map +1 -1
  40. package/lib/utils.d.ts +3 -1
  41. package/lib/utils.js +68 -1
  42. package/lib/utils.js.map +1 -1
  43. package/package.json +5 -4
@@ -12,7 +12,9 @@ declare class StableBrowser {
12
12
  networkLogger: null;
13
13
  configuration: null;
14
14
  appName: string;
15
+ tags: null;
15
16
  constructor(browser: Browser, page: Page, logger?: any, context?: any, world?: any);
17
+ scrollPageToLoadLazyElements(): Promise<void>;
16
18
  registerEventListeners(context: any): void;
17
19
  switchApp(appName: any): Promise<void>;
18
20
  _copyContext(from: any, to: any): void;
@@ -20,7 +22,6 @@ declare class StableBrowser {
20
22
  registerConsoleLogListener(page: Page, context: any): void;
21
23
  registerRequestListener(page: Page, context: any, logFile: string): void;
22
24
  goto(url: string): Promise<void>;
23
- _validateSelectors(selectors: any): void;
24
25
  _fixUsingParams(text: any, _params: Params): any;
25
26
  _fixLocatorUsingParams(locator: any, _params: Params): any;
26
27
  _isObject(value: any): any;
@@ -32,22 +33,24 @@ declare class StableBrowser {
32
33
  closeUnexpectedPopups(info: any, _params: any): Promise<{
33
34
  rerun: boolean;
34
35
  }>;
35
- _locate(selectors: any, info: any, _params?: Params, timeout?: number): Promise<any>;
36
+ _locate(selectors: any, info: any, _params?: Params, timeout: any): Promise<any>;
37
+ _findFrameScope(selectors: any, timeout: number | undefined, info: any): Promise<any>;
38
+ _getDocumentBody(selectors: any, timeout: number | undefined, info: any): Promise<any>;
36
39
  _locate_internal(selectors: any, info: any, _params?: Params, timeout?: number): Promise<any>;
37
40
  _scanLocatorsGroup(locatorsGroup: any, scope: any, _params: any, info: any, visibleOnly: any): Promise<{
38
41
  foundElements: any[];
39
42
  }>;
40
43
  simpleClick(elementDescription: any, _params?: Params, options?: {}, world?: null): Promise<void>;
41
44
  simpleClickType(elementDescription: any, value: any, _params?: Params, options?: {}, world?: null): Promise<void>;
42
- click(selectors: any, _params?: Params, options?: {}, world?: null): Promise<{}>;
43
- setCheck(selectors: any, checked?: boolean, _params?: Params, options?: {}, world?: null): Promise<{}>;
44
- hover(selectors: any, _params?: Params, options?: {}, world?: null): Promise<{}>;
45
- selectOption(selectors: any, values: any, _params?: null, options?: {}, world?: null): Promise<{}>;
46
- type(_value: any, _params?: null, options?: {}, world?: null): Promise<{}>;
45
+ click(selectors: any, _params?: Params, options?: {}, world?: null): Promise<any>;
46
+ setCheck(selectors: any, checked?: boolean, _params?: Params, options?: {}, world?: null): Promise<any>;
47
+ hover(selectors: any, _params?: Params, options?: {}, world?: null): Promise<any>;
48
+ selectOption(selectors: any, values: any, _params?: null, options?: {}, world?: null): Promise<any>;
49
+ type(_value: any, _params?: null, options?: {}, world?: null): Promise<any>;
47
50
  setInputValue(selectors: any, value: any, _params?: null, options?: {}, world?: null): Promise<void>;
48
51
  setDateTime(selectors: any, value: any, format?: null, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<void>;
49
- clickType(selectors: any, _value: any, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<{}>;
50
- fill(selectors: any, value: any, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<{}>;
52
+ clickType(selectors: any, _value: any, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<any>;
53
+ fill(selectors: any, value: any, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<any>;
51
54
  getText(selectors: any, _params?: null, options?: {}, info?: {}, world?: null): Promise<{
52
55
  text: any;
53
56
  screenshotId: any;
@@ -74,8 +77,8 @@ declare class StableBrowser {
74
77
  value: any;
75
78
  element?: undefined;
76
79
  }>;
77
- containsPattern(selectors: any, pattern: any, text: any, _params?: null, options?: {}, world?: null): Promise<{}>;
78
- containsText(selectors: any, text: any, climb: any, _params?: null, options?: {}, world?: null): Promise<{}>;
80
+ containsPattern(selectors: any, pattern: any, text: any, _params?: null, options?: {}, world?: null): Promise<any>;
81
+ containsText(selectors: any, text: any, climb: any, _params?: null, options?: {}, world?: null): Promise<any>;
79
82
  _getDataFile(world?: null): string;
80
83
  waitForUserInput(message: any, world?: null): Promise<void>;
81
84
  setTestData(testData: any, world?: null): void;
@@ -90,28 +93,31 @@ declare class StableBrowser {
90
93
  getTestData(world?: null): {};
91
94
  _screenShot(options?: {}, world?: null, info?: null): Promise<{}>;
92
95
  takeScreenshot(screenshotPath: any): Promise<any>;
93
- verifyElementExistInPage(selectors: any, _params?: null, options?: {}, world?: null): Promise<{}>;
94
- extractAttribute(selectors: any, attribute: any, variable: any, _params?: null, options?: {}, world?: null): Promise<{}>;
96
+ verifyElementExistInPage(selectors: any, _params?: null, options?: {}, world?: null): Promise<any>;
97
+ extractAttribute(selectors: any, attribute: any, variable: any, _params?: null, options?: {}, world?: null): Promise<any>;
95
98
  extractEmailData(emailAddress: any, options: any, world: any): Promise<{
96
99
  emailUrl: any;
97
100
  emailCode: any;
98
101
  }>;
99
102
  _highlightElements(scope: any, css: any): Promise<void>;
100
103
  verifyPagePath(pathPart: any, options?: {}, world?: null): Promise<{} | undefined>;
101
- verifyTextExistInPage(text: any, options?: {}, world?: null): Promise<{}>;
104
+ verifyTextExistInPage(text: any, options?: {}, world?: null): Promise<any>;
105
+ waitForTextToDisappear(text: any, options?: {}, world?: null): Promise<any>;
102
106
  _getServerUrl(): string;
103
- visualVerification(text: any, options?: {}, world?: null): Promise<{}>;
107
+ visualVerification(text: any, options?: {}, world?: null): Promise<{} | undefined>;
104
108
  verifyTableData(selectors: any, data: any, _params?: null, options?: {}, world?: null): Promise<void>;
105
109
  getTableData(selectors: any, _params?: null, options?: {}, world?: null): Promise<any>;
106
- analyzeTable(selectors: any, query: any, operator: any, value: any, _params?: null, options?: {}, world?: null): Promise<{}>;
107
- _replaceWithLocalData(value: any, world: any, _decrypt?: boolean, totpWait?: boolean): Promise<any>;
110
+ analyzeTable(selectors: any, query: any, operator: any, value: any, _params?: null, options?: {}, world?: null): Promise<{} | undefined>;
111
+ _replaceWithLocalData(value: any, world: any, _decrypt?: boolean, totpWait?: boolean): Promise<string>;
108
112
  _getLoadTimeout(options: any): number;
109
113
  waitForPageLoad(options?: {}, world?: null): Promise<void>;
110
114
  closePage(options?: {}, world?: null): Promise<void>;
115
+ saveTestDataAsGlobal(options: any, world: any): void;
111
116
  setViewportSize(width: number, hight: number, options?: {}, world?: null): Promise<void>;
112
117
  reloadPage(options?: {}, world?: null): Promise<void>;
113
118
  scrollIfNeeded(element: any, info: any): Promise<void>;
114
- _reportToWorld(world: any, properties: JsonCommandReport): void;
119
+ beforeStep(world: any, step: any): Promise<void>;
120
+ afterStep(world: any, step: any): Promise<void>;
115
121
  }
116
122
  type JsonTimestamp = number;
117
123
  type JsonResultPassed = {
@@ -126,7 +132,7 @@ type JsonResultFailed = {
126
132
  message?: string;
127
133
  };
128
134
  type JsonCommandResult = JsonResultPassed | JsonResultFailed;
129
- type JsonCommandReport = {
135
+ export type JsonCommandReport = {
130
136
  type: string;
131
137
  value?: string;
132
138
  text: string;