automation_model 1.0.463-dev → 1.0.463-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 (45) hide show
  1. package/lib/api.d.ts +42 -1
  2. package/lib/api.js +181 -7
  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/axe/axe.mini.js +12 -0
  7. package/lib/browser_manager.d.ts +5 -3
  8. package/lib/browser_manager.js +44 -19
  9. package/lib/browser_manager.js.map +1 -1
  10. package/lib/command_common.d.ts +6 -0
  11. package/lib/command_common.js +138 -0
  12. package/lib/command_common.js.map +1 -0
  13. package/lib/environment.js +5 -3
  14. package/lib/environment.js.map +1 -1
  15. package/lib/error-messages.d.ts +6 -0
  16. package/lib/error-messages.js +182 -0
  17. package/lib/error-messages.js.map +1 -0
  18. package/lib/index.d.ts +1 -0
  19. package/lib/index.js +1 -0
  20. package/lib/index.js.map +1 -1
  21. package/lib/init_browser.d.ts +1 -1
  22. package/lib/init_browser.js +18 -3
  23. package/lib/init_browser.js.map +1 -1
  24. package/lib/locate_element.d.ts +7 -0
  25. package/lib/locate_element.js +213 -0
  26. package/lib/locate_element.js.map +1 -0
  27. package/lib/locator.d.ts +36 -0
  28. package/lib/locator.js +165 -0
  29. package/lib/locator.js.map +1 -1
  30. package/lib/network.d.ts +3 -0
  31. package/lib/network.js +144 -0
  32. package/lib/network.js.map +1 -0
  33. package/lib/stable_browser.d.ts +26 -19
  34. package/lib/stable_browser.js +632 -773
  35. package/lib/stable_browser.js.map +1 -1
  36. package/lib/table.d.ts +13 -0
  37. package/lib/table.js +187 -0
  38. package/lib/table.js.map +1 -0
  39. package/lib/test_context.d.ts +1 -0
  40. package/lib/test_context.js +12 -12
  41. package/lib/test_context.js.map +1 -1
  42. package/lib/utils.d.ts +3 -1
  43. package/lib/utils.js +68 -1
  44. package/lib/utils.js.map +1 -1
  45. package/package.json +4 -5
package/lib/network.js ADDED
@@ -0,0 +1,144 @@
1
+ import path from "path";
2
+ import fs from "fs";
3
+ function _getNetworkFile(world = null, stable = null, context = null) {
4
+ let networkFile = null;
5
+ if (world && world.reportFolder) {
6
+ networkFile = path.join(world.reportFolder, "network.json");
7
+ }
8
+ else if (stable.reportFolder) {
9
+ networkFile = path.join(stable.reportFolder, "network.json");
10
+ }
11
+ else if (context && context.reportFolder) {
12
+ networkFile = path.join(context.reportFolder, "network.json");
13
+ }
14
+ else {
15
+ networkFile = "network.json";
16
+ }
17
+ return networkFile;
18
+ }
19
+ function registerDownloadEvent(page, world, context) {
20
+ if (page) {
21
+ let downloadPath = "./downloads";
22
+ if (world && world.downloadsPath) {
23
+ downloadPath = world.downloadsPath;
24
+ }
25
+ else if (context && context.downloadsPath) {
26
+ downloadPath = context.downloadsPath;
27
+ }
28
+ if (!fs.existsSync(downloadPath)) {
29
+ fs.mkdirSync(downloadPath);
30
+ }
31
+ page.on("download", async (download) => {
32
+ const suggestedFilename = download.suggestedFilename(); // Get the original file name
33
+ const filePath = `${downloadPath}/${suggestedFilename}`;
34
+ // Save the download with the original name
35
+ await download.saveAs(filePath);
36
+ console.log(`Downloaded file saved as: ${filePath}`);
37
+ });
38
+ }
39
+ }
40
+ function registerNetworkEvents(world, stable, context, page) {
41
+ const networkFile = _getNetworkFile(world, stable, context);
42
+ function saveNetworkData() {
43
+ if (context && context.networkData) {
44
+ fs.writeFileSync(networkFile, JSON.stringify(context.networkData, null, 2), "utf8");
45
+ }
46
+ }
47
+ if (!context) {
48
+ console.error("No context found to register network events");
49
+ return;
50
+ }
51
+ // Map to hold request start times and IDs
52
+ const requestTimes = new Map();
53
+ let requestIdCounter = 0;
54
+ if (page) {
55
+ if (!context.networkData) {
56
+ context.networkData = [];
57
+ const networkData = context.networkData;
58
+ // Event listener for when a request is made
59
+ page.on("request", (request) => {
60
+ const requestId = requestIdCounter++;
61
+ request.requestId = requestId; // Assign a unique ID to the request
62
+ const startTime = Date.now();
63
+ requestTimes.set(requestId, startTime);
64
+ // Initialize data for this request
65
+ networkData.push({
66
+ requestId,
67
+ requestStart: startTime,
68
+ requestUrl: request.url(),
69
+ method: request.method(),
70
+ status: "Pending",
71
+ responseTime: null,
72
+ responseReceived: null,
73
+ responseEnd: null,
74
+ size: null,
75
+ });
76
+ saveNetworkData();
77
+ });
78
+ // Event listener for when a response is received
79
+ page.on("response", async (response) => {
80
+ const request = response.request();
81
+ const requestId = request.requestId;
82
+ const receivedTime = Date.now();
83
+ // Find the corresponding data object
84
+ const data = networkData.find((item) => item.requestId === requestId);
85
+ if (data) {
86
+ data.status = response.status();
87
+ data.responseReceived = receivedTime;
88
+ saveNetworkData();
89
+ }
90
+ else {
91
+ console.error("No data found for request ID", requestId);
92
+ }
93
+ });
94
+ // Event listener for when a request is finished
95
+ page.on("requestfinished", async (request) => {
96
+ const requestId = request.requestId;
97
+ const endTime = Date.now();
98
+ const startTime = requestTimes.get(requestId);
99
+ const response = await request.response();
100
+ // Find the corresponding data object
101
+ const data = networkData.find((item) => item.requestId === requestId);
102
+ if (data) {
103
+ data.responseEnd = endTime;
104
+ data.responseTime = endTime - startTime;
105
+ // Get response size
106
+ try {
107
+ const body = await response.body();
108
+ data.size = body.length;
109
+ }
110
+ catch (e) {
111
+ data.size = 0;
112
+ }
113
+ saveNetworkData();
114
+ }
115
+ else {
116
+ console.error("No data found for request ID", requestId);
117
+ }
118
+ });
119
+ // Event listener for when a request fails
120
+ page.on("requestfailed", (request) => {
121
+ const requestId = request.requestId;
122
+ const endTime = Date.now();
123
+ const startTime = requestTimes.get(requestId);
124
+ // Find the corresponding data object
125
+ const data = networkData.find((item) => item.requestId === requestId);
126
+ if (data) {
127
+ data.responseEnd = endTime;
128
+ data.responseTime = endTime - startTime;
129
+ data.status = "Failed";
130
+ data.size = 0;
131
+ saveNetworkData();
132
+ }
133
+ else {
134
+ console.error("No data found for request ID", requestId);
135
+ }
136
+ });
137
+ }
138
+ }
139
+ else {
140
+ console.error("No page found to register network events");
141
+ }
142
+ }
143
+ export { registerNetworkEvents, registerDownloadEvent };
144
+ //# sourceMappingURL=network.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network.js","sourceRoot":"","sources":["../../src/network.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,SAAS,eAAe,CAAC,QAAa,IAAI,EAAE,SAAc,IAAI,EAAE,UAAe,IAAI;IACjF,IAAI,WAAW,GAAG,IAAI,CAAC;IACvB,IAAI,KAAK,IAAI,KAAK,CAAC,YAAY,EAAE;QAC/B,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;KAC7D;SAAM,IAAI,MAAM,CAAC,YAAY,EAAE;QAC9B,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;KAC9D;SAAM,IAAI,OAAO,IAAI,OAAO,CAAC,YAAY,EAAE;QAC1C,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;KAC/D;SAAM;QACL,WAAW,GAAG,cAAc,CAAC;KAC9B;IACD,OAAO,WAAW,CAAC;AACrB,CAAC;AACD,SAAS,qBAAqB,CAAC,IAAS,EAAE,KAAU,EAAE,OAAY;IAChE,IAAI,IAAI,EAAE;QACR,IAAI,YAAY,GAAG,aAAa,CAAC;QACjC,IAAI,KAAK,IAAI,KAAK,CAAC,aAAa,EAAE;YAChC,YAAY,GAAG,KAAK,CAAC,aAAa,CAAC;SACpC;aAAM,IAAI,OAAO,IAAI,OAAO,CAAC,aAAa,EAAE;YAC3C,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC;SACtC;QACD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE;YAChC,EAAE,CAAC,SAAS,CAAC,YAAY,CAAC,CA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AAW,CAAC,IAAI,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC;gBAE3E,IAAI,IAAI,EAAE;oBACR,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC;oBAC3B,IAAI,CAAC,YAAY,GAAG,OAAO,GAAG,SAAS,CAAC;oBACxC,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC;oBACvB,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;oBACd,eAAe,EAAE,CAAC;iBACnB;qBAAM;oBACL,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,SAAS,CAAC,CAAC;iBAC1D;YACH,CAAC,CAAC,CAAC;SACJ;KACF;SAAM;QACL,OAAO,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;KAC3D;AACH,CAAC;AACD,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,CAAC"}
@@ -12,6 +12,7 @@ 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);
16
17
  registerEventListeners(context: any): void;
17
18
  switchApp(appName: any): Promise<void>;
@@ -20,7 +21,6 @@ declare class StableBrowser {
20
21
  registerConsoleLogListener(page: Page, context: any): void;
21
22
  registerRequestListener(page: Page, context: any, logFile: string): void;
22
23
  goto(url: string): Promise<void>;
23
- _validateSelectors(selectors: any): void;
24
24
  _fixUsingParams(text: any, _params: Params): any;
25
25
  _fixLocatorUsingParams(locator: any, _params: Params): any;
26
26
  _isObject(value: any): any;
@@ -32,20 +32,24 @@ declare class StableBrowser {
32
32
  closeUnexpectedPopups(info: any, _params: any): Promise<{
33
33
  rerun: boolean;
34
34
  }>;
35
- _locate(selectors: any, info: any, _params?: Params, timeout?: number): Promise<any>;
35
+ _locate(selectors: any, info: any, _params?: Params, timeout: any): Promise<any>;
36
+ _findFrameScope(selectors: any, timeout: number | undefined, info: any): Promise<any>;
37
+ _getDocumentBody(selectors: any, timeout: number | undefined, info: any): Promise<any>;
36
38
  _locate_internal(selectors: any, info: any, _params?: Params, timeout?: number): Promise<any>;
37
39
  _scanLocatorsGroup(locatorsGroup: any, scope: any, _params: any, info: any, visibleOnly: any): Promise<{
38
40
  foundElements: any[];
39
41
  }>;
40
- click(selectors: any, _params?: Params, options?: {}, world?: null): Promise<{}>;
41
- setCheck(selectors: any, checked?: boolean, _params?: Params, options?: {}, world?: null): Promise<{}>;
42
- hover(selectors: any, _params?: Params, options?: {}, world?: null): Promise<{}>;
43
- selectOption(selectors: any, values: any, _params?: null, options?: {}, world?: null): Promise<{}>;
44
- type(_value: any, _params?: null, options?: {}, world?: null): Promise<{}>;
42
+ simpleClick(elementDescription: any, _params?: Params, options?: {}, world?: null): Promise<void>;
43
+ simpleClickType(elementDescription: any, value: any, _params?: Params, options?: {}, world?: null): Promise<void>;
44
+ click(selectors: any, _params?: Params, options?: {}, world?: null): Promise<any>;
45
+ setCheck(selectors: any, checked?: boolean, _params?: Params, options?: {}, world?: null): Promise<any>;
46
+ hover(selectors: any, _params?: Params, options?: {}, world?: null): Promise<any>;
47
+ selectOption(selectors: any, values: any, _params?: null, options?: {}, world?: null): Promise<any>;
48
+ type(_value: any, _params?: null, options?: {}, world?: null): Promise<any>;
45
49
  setInputValue(selectors: any, value: any, _params?: null, options?: {}, world?: null): Promise<void>;
46
50
  setDateTime(selectors: any, value: any, format?: null, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<void>;
47
- clickType(selectors: any, _value: any, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<{}>;
48
- fill(selectors: any, value: any, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<{}>;
51
+ clickType(selectors: any, _value: any, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<any>;
52
+ fill(selectors: any, value: any, enter?: boolean, _params?: null, options?: {}, world?: null): Promise<any>;
49
53
  getText(selectors: any, _params?: null, options?: {}, info?: {}, world?: null): Promise<{
50
54
  text: any;
51
55
  screenshotId: any;
@@ -72,8 +76,8 @@ declare class StableBrowser {
72
76
  value: any;
73
77
  element?: undefined;
74
78
  }>;
75
- containsPattern(selectors: any, pattern: any, text: any, _params?: null, options?: {}, world?: null): Promise<{}>;
76
- containsText(selectors: any, text: any, climb: any, _params?: null, options?: {}, world?: null): Promise<{}>;
79
+ containsPattern(selectors: any, pattern: any, text: any, _params?: null, options?: {}, world?: null): Promise<any>;
80
+ containsText(selectors: any, text: any, climb: any, _params?: null, options?: {}, world?: null): Promise<any>;
77
81
  _getDataFile(world?: null): string;
78
82
  waitForUserInput(message: any, world?: null): Promise<void>;
79
83
  setTestData(testData: any, world?: null): void;
@@ -88,28 +92,31 @@ declare class StableBrowser {
88
92
  getTestData(world?: null): {};
89
93
  _screenShot(options?: {}, world?: null, info?: null): Promise<{}>;
90
94
  takeScreenshot(screenshotPath: any): Promise<any>;
91
- verifyElementExistInPage(selectors: any, _params?: null, options?: {}, world?: null): Promise<{}>;
92
- extractAttribute(selectors: any, attribute: any, variable: any, _params?: null, options?: {}, world?: null): Promise<{}>;
95
+ verifyElementExistInPage(selectors: any, _params?: null, options?: {}, world?: null): Promise<any>;
96
+ extractAttribute(selectors: any, attribute: any, variable: any, _params?: null, options?: {}, world?: null): Promise<any>;
93
97
  extractEmailData(emailAddress: any, options: any, world: any): Promise<{
94
98
  emailUrl: any;
95
99
  emailCode: any;
96
100
  }>;
97
101
  _highlightElements(scope: any, css: any): Promise<void>;
98
102
  verifyPagePath(pathPart: any, options?: {}, world?: null): Promise<{} | undefined>;
99
- verifyTextExistInPage(text: any, options?: {}, world?: null): Promise<{}>;
103
+ verifyTextExistInPage(text: any, options?: {}, world?: null): Promise<any>;
104
+ waitForTextToDisappear(text: any, options?: {}, world?: null): Promise<any>;
100
105
  _getServerUrl(): string;
101
- visualVerification(text: any, options?: {}, world?: null): Promise<{}>;
106
+ visualVerification(text: any, options?: {}, world?: null): Promise<{} | undefined>;
102
107
  verifyTableData(selectors: any, data: any, _params?: null, options?: {}, world?: null): Promise<void>;
103
108
  getTableData(selectors: any, _params?: null, options?: {}, world?: null): Promise<any>;
104
- analyzeTable(selectors: any, query: any, operator: any, value: any, _params?: null, options?: {}, world?: null): Promise<{}>;
105
- _replaceWithLocalData(value: any, world: any, _decrypt?: boolean, totpWait?: boolean): Promise<any>;
109
+ analyzeTable(selectors: any, query: any, operator: any, value: any, _params?: null, options?: {}, world?: null): Promise<{} | undefined>;
110
+ _replaceWithLocalData(value: any, world: any, _decrypt?: boolean, totpWait?: boolean): Promise<string>;
106
111
  _getLoadTimeout(options: any): number;
107
112
  waitForPageLoad(options?: {}, world?: null): Promise<void>;
108
113
  closePage(options?: {}, world?: null): Promise<void>;
114
+ saveTestDataAsGlobal(options: any, world: any): void;
109
115
  setViewportSize(width: number, hight: number, options?: {}, world?: null): Promise<void>;
110
116
  reloadPage(options?: {}, world?: null): Promise<void>;
111
117
  scrollIfNeeded(element: any, info: any): Promise<void>;
112
- _reportToWorld(world: any, properties: JsonCommandReport): void;
118
+ beforeStep(world: any, step: any): Promise<void>;
119
+ afterStep(world: any, step: any): Promise<void>;
113
120
  }
114
121
  type JsonTimestamp = number;
115
122
  type JsonResultPassed = {
@@ -124,7 +131,7 @@ type JsonResultFailed = {
124
131
  message?: string;
125
132
  };
126
133
  type JsonCommandResult = JsonResultPassed | JsonResultFailed;
127
- type JsonCommandReport = {
134
+ export type JsonCommandReport = {
128
135
  type: string;
129
136
  value?: string;
130
137
  text: string;