automation_model 1.0.0-amdocs

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 (75) hide show
  1. package/README.md +130 -0
  2. package/lib/analyze_helper.d.ts +9 -0
  3. package/lib/analyze_helper.js +161 -0
  4. package/lib/analyze_helper.js.map +1 -0
  5. package/lib/api.d.ts +55 -0
  6. package/lib/api.js +349 -0
  7. package/lib/api.js.map +1 -0
  8. package/lib/auto_page.d.ts +7 -0
  9. package/lib/auto_page.js +199 -0
  10. package/lib/auto_page.js.map +1 -0
  11. package/lib/browser_manager.d.ts +32 -0
  12. package/lib/browser_manager.js +257 -0
  13. package/lib/browser_manager.js.map +1 -0
  14. package/lib/command_common.d.ts +6 -0
  15. package/lib/command_common.js +182 -0
  16. package/lib/command_common.js.map +1 -0
  17. package/lib/date_time.d.ts +10 -0
  18. package/lib/date_time.js +45 -0
  19. package/lib/date_time.js.map +1 -0
  20. package/lib/drawRect.d.ts +2 -0
  21. package/lib/drawRect.js +25 -0
  22. package/lib/drawRect.js.map +1 -0
  23. package/lib/environment.d.ts +27 -0
  24. package/lib/environment.js +15 -0
  25. package/lib/environment.js.map +1 -0
  26. package/lib/error-messages.d.ts +6 -0
  27. package/lib/error-messages.js +206 -0
  28. package/lib/error-messages.js.map +1 -0
  29. package/lib/find_function.d.ts +2 -0
  30. package/lib/find_function.js +51 -0
  31. package/lib/find_function.js.map +1 -0
  32. package/lib/generation_scripts.d.ts +4 -0
  33. package/lib/generation_scripts.js +2 -0
  34. package/lib/generation_scripts.js.map +1 -0
  35. package/lib/index.d.ts +10 -0
  36. package/lib/index.js +11 -0
  37. package/lib/index.js.map +1 -0
  38. package/lib/init_browser.d.ts +10 -0
  39. package/lib/init_browser.js +216 -0
  40. package/lib/init_browser.js.map +1 -0
  41. package/lib/locate_element.d.ts +7 -0
  42. package/lib/locate_element.js +215 -0
  43. package/lib/locate_element.js.map +1 -0
  44. package/lib/locator.d.ts +70 -0
  45. package/lib/locator.js +392 -0
  46. package/lib/locator.js.map +1 -0
  47. package/lib/locator_log.d.ts +26 -0
  48. package/lib/locator_log.js +69 -0
  49. package/lib/locator_log.js.map +1 -0
  50. package/lib/network.d.ts +3 -0
  51. package/lib/network.js +183 -0
  52. package/lib/network.js.map +1 -0
  53. package/lib/popups.d.ts +0 -0
  54. package/lib/popups.js +36 -0
  55. package/lib/popups.js.map +1 -0
  56. package/lib/scripts/axe.mini.js +12 -0
  57. package/lib/stable_browser.d.ts +188 -0
  58. package/lib/stable_browser.js +3322 -0
  59. package/lib/stable_browser.js.map +1 -0
  60. package/lib/table.d.ts +13 -0
  61. package/lib/table.js +187 -0
  62. package/lib/table.js.map +1 -0
  63. package/lib/table_analyze.d.ts +4 -0
  64. package/lib/table_analyze.js +95 -0
  65. package/lib/table_analyze.js.map +1 -0
  66. package/lib/table_helper.d.ts +19 -0
  67. package/lib/table_helper.js +101 -0
  68. package/lib/table_helper.js.map +1 -0
  69. package/lib/test_context.d.ts +21 -0
  70. package/lib/test_context.js +17 -0
  71. package/lib/test_context.js.map +1 -0
  72. package/lib/utils.d.ts +21 -0
  73. package/lib/utils.js +601 -0
  74. package/lib/utils.js.map +1 -0
  75. package/package.json +56 -0
@@ -0,0 +1,188 @@
1
+ import type { Browser, Page } from "playwright";
2
+ import { Params } from "./utils.js";
3
+ export declare const Types: {
4
+ CLICK: string;
5
+ WAIT_ELEMENT: string;
6
+ NAVIGATE: string;
7
+ FILL: string;
8
+ EXECUTE: string;
9
+ OPEN: string;
10
+ COMPLETE: string;
11
+ ASK: string;
12
+ GET_PAGE_STATUS: string;
13
+ CLICK_ROW_ACTION: string;
14
+ VERIFY_ELEMENT_CONTAINS_TEXT: string;
15
+ VERIFY_PAGE_CONTAINS_TEXT: string;
16
+ VERIFY_PAGE_CONTAINS_NO_TEXT: string;
17
+ ANALYZE_TABLE: string;
18
+ SELECT: string;
19
+ VERIFY_PAGE_PATH: string;
20
+ TYPE_PRESS: string;
21
+ PRESS: string;
22
+ HOVER: string;
23
+ CHECK: string;
24
+ UNCHECK: string;
25
+ EXTRACT: string;
26
+ CLOSE_PAGE: string;
27
+ TABLE_OPERATION: string;
28
+ SET_DATE_TIME: string;
29
+ SET_VIEWPORT: string;
30
+ VERIFY_VISUAL: string;
31
+ LOAD_DATA: string;
32
+ SET_INPUT: string;
33
+ WAIT_FOR_TEXT_TO_DISAPPEAR: string;
34
+ VERIFY_ATTRIBUTE: string;
35
+ VERIFY_TEXT_WITH_RELATION: string;
36
+ };
37
+ export declare const apps: {};
38
+ declare class StableBrowser {
39
+ browser: Browser;
40
+ page: Page;
41
+ logger: any;
42
+ context: any;
43
+ world?: any;
44
+ project_path: null;
45
+ webLogFile: null;
46
+ networkLogger: null;
47
+ configuration: null;
48
+ appName: string;
49
+ tags: null;
50
+ isRecording: boolean;
51
+ initSnapshotTaken: boolean;
52
+ constructor(browser: Browser, page: Page, logger?: any, context?: any, world?: any);
53
+ registerEventListeners(context: any): void;
54
+ switchApp(appName: any): Promise<void>;
55
+ registerConsoleLogListener(page: Page, context: any): void;
56
+ registerRequestListener(page: Page, context: any, logFile: string): void;
57
+ goto(url: string, world?: null): Promise<void>;
58
+ _getLocator(locator: any, scope: any, _params: any): Promise<any>;
59
+ _locateElmentByTextClimbCss(scope: any, text: any, climb: any, css: any, _params: Params): Promise<string | undefined>;
60
+ _locateElementByText(scope: any, text1: any, tag1: any, regex1: boolean | undefined, partial1: any, ignoreCase: boolean | undefined, _params: Params): Promise<{
61
+ elementCount: number;
62
+ randomToken: string;
63
+ }>;
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>;
65
+ closeUnexpectedPopups(info: any, _params: any): Promise<{
66
+ rerun: boolean;
67
+ }>;
68
+ _locate(selectors: any, info: any, _params?: Params, timeout: any, allowDisabled?: boolean | undefined): Promise<any>;
69
+ _findFrameScope(selectors: any, timeout: number | undefined, info: any): Promise<any>;
70
+ _getDocumentBody(selectors: any, timeout: number | undefined, info: any): Promise<any>;
71
+ _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<{
73
+ foundElements: any[];
74
+ }>;
75
+ simpleClick(elementDescription: any, _params?: Params, options?: {}, world?: null): Promise<void>;
76
+ simpleClickType(elementDescription: any, value: any, _params?: Params, options?: {}, world?: null): Promise<void>;
77
+ click(selectors: any, _params?: Params, options?: {}, world?: null): Promise<any>;
78
+ waitForElement(selectors: any, _params?: Params, options?: {}, world?: null): Promise<boolean>;
79
+ setCheck(selectors: any, checked?: boolean, _params?: Params, options?: {}, world?: null): Promise<any>;
80
+ hover(selectors: any, _params?: Params, options?: {}, world?: null): Promise<any>;
81
+ selectOption(selectors: any, values: any, _params?: null, options?: {}, world?: null): Promise<any>;
82
+ type(_value: any, _params?: null, options?: {}, world?: null): Promise<any>;
83
+ setInputValue(selectors: any, value: any, _params?: null, options?: {}, world?: null): Promise<void>;
84
+ setDateTime(selectors: any, value: any, format?: null, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<void>;
85
+ clickType(selectors: any, _value: any, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<any>;
86
+ fill(selectors: any, value: any, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<any>;
87
+ getText(selectors: any, _params?: null, options?: {}, info?: {}, world?: null): Promise<{
88
+ text: any;
89
+ screenshotId: any;
90
+ screenshotPath: any;
91
+ value: any;
92
+ element: any;
93
+ } | {
94
+ text: any;
95
+ screenshotId: any;
96
+ screenshotPath: any;
97
+ value: any;
98
+ element?: undefined;
99
+ }>;
100
+ _getText(selectors: any, climb: any, _params?: null, options?: {}, info?: {}, world?: null): Promise<{
101
+ text: any;
102
+ screenshotId: any;
103
+ screenshotPath: any;
104
+ value: any;
105
+ element: any;
106
+ } | {
107
+ text: any;
108
+ screenshotId: any;
109
+ screenshotPath: any;
110
+ value: any;
111
+ element?: undefined;
112
+ }>;
113
+ containsPattern(selectors: any, pattern: any, text: any, _params?: null, options?: {}, world?: null): Promise<any>;
114
+ containsText(selectors: any, text: any, climb: any, _params?: null, options?: {}, world?: null): Promise<any>;
115
+ waitForUserInput(message: any, world?: null): Promise<void>;
116
+ setTestData(testData: any, world?: null): void;
117
+ _getDataFilePath(fileName: any): string;
118
+ _parseCSVSync(filePath: any): Promise<unknown>;
119
+ loadTestData(type: string, dataSelector: string, world?: null): {
120
+ username: any;
121
+ password: string;
122
+ totp: string | null;
123
+ };
124
+ loadTestDataAsync(type: string, dataSelector: string, world?: null): Promise<any>;
125
+ getTestData(world?: null): {};
126
+ _screenShot(options?: {}, world?: null, info?: null): Promise<{}>;
127
+ takeScreenshot(screenshotPath: any): Promise<any>;
128
+ verifyElementExistInPage(selectors: any, _params?: null, options?: {}, world?: null): Promise<any>;
129
+ extractAttribute(selectors: any, attribute: any, variable: any, _params?: null, options?: {}, world?: null): Promise<any>;
130
+ verifyAttribute(selectors: any, attribute: any, value: any, _params?: null, options?: {}, world?: null): Promise<any>;
131
+ extractEmailData(emailAddress: any, options: any, world: any): Promise<{
132
+ emailUrl: any;
133
+ emailCode: any;
134
+ }>;
135
+ _highlightElements(scope: any, css: any): Promise<void>;
136
+ verifyPagePath(pathPart: any, options?: {}, world?: null): Promise<{} | undefined>;
137
+ findTextInAllFrames(dateAlternatives: any, numberAlternatives: any, text: any, state: any, partial?: boolean, ignoreCase?: boolean): Promise<{
138
+ elementCount: number;
139
+ randomToken: string;
140
+ }[]>;
141
+ verifyTextExistInPage(text: any, options?: {}, world?: null): Promise<any>;
142
+ waitForTextToDisappear(text: any, options?: {}, world?: null): Promise<any>;
143
+ verifyTextRelatedToText(textAnchor: string, climb: number, textToVerify: string, options?: {}, world?: any): Promise<any>;
144
+ findRelatedTextInAllFrames(textAnchor: string, climb: number, textToVerify: string, params?: Params, options?: {}, world?: any): Promise<{
145
+ elementCount: number;
146
+ randomToken: string;
147
+ }[]>;
148
+ visualVerification(text: any, options?: {}, world?: null): Promise<{} | undefined>;
149
+ verifyTableData(selectors: any, data: any, _params?: null, options?: {}, world?: null): Promise<void>;
150
+ getTableData(selectors: any, _params?: null, options?: {}, world?: null): Promise<any>;
151
+ analyzeTable(selectors: any, query: any, operator: any, value: any, _params?: null, options?: {}, world?: null): Promise<{} | undefined>;
152
+ _replaceWithLocalData(value: any, world: any, _decrypt?: boolean, totpWait?: boolean): Promise<string>;
153
+ _getLoadTimeout(options: any): number;
154
+ _getFindElementTimeout(options: any): any;
155
+ saveStoreState(path?: string | null, world?: any): Promise<void>;
156
+ restoreSaveState(path?: string | null, world?: any): Promise<void>;
157
+ waitForPageLoad(options?: {}, world?: null): Promise<void>;
158
+ closePage(options?: {}, world?: null): Promise<void>;
159
+ tableCellOperation(headerText: string, rowText: string, options: any, _params: Params, world?: null): Promise<void>;
160
+ saveTestDataAsGlobal(options: any, world: any): void;
161
+ setViewportSize(width: number, hight: number, options?: {}, world?: null): Promise<void>;
162
+ reloadPage(options?: {}, world?: null): Promise<void>;
163
+ scrollIfNeeded(element: any, info: any): Promise<void>;
164
+ beforeStep(world: any, step: any): Promise<void>;
165
+ getAriaSnapshot(): Promise<string | null>;
166
+ afterStep(world: any, step: any): Promise<void>;
167
+ }
168
+ type JsonTimestamp = number;
169
+ type JsonResultPassed = {
170
+ status: "PASSED";
171
+ startTime: JsonTimestamp;
172
+ endTime: JsonTimestamp;
173
+ };
174
+ type JsonResultFailed = {
175
+ status: "FAILED";
176
+ startTime: JsonTimestamp;
177
+ endTime: JsonTimestamp;
178
+ message?: string;
179
+ };
180
+ type JsonCommandResult = JsonResultPassed | JsonResultFailed;
181
+ export type JsonCommandReport = {
182
+ type: string;
183
+ value?: string;
184
+ text: string;
185
+ screenshotId?: string;
186
+ result: JsonCommandResult;
187
+ };
188
+ export { StableBrowser };