automation_model 1.0.60 → 1.0.61

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.
@@ -0,0 +1,3 @@
1
+ export function initContext(path: any, doNavigate?: boolean, headless?: boolean): Promise<any>;
2
+ export function navigate(path?: string): Promise<void>;
3
+ export function closeContext(): Promise<void>;
@@ -0,0 +1,16 @@
1
+ export const browserManager: BrowserManager;
2
+ declare class BrowserManager {
3
+ browsers: any[];
4
+ closeAll(): Promise<void>;
5
+ closeBrowser(browser: any): Promise<void>;
6
+ createBrowser(headless?: boolean): Promise<Browser>;
7
+ getBrowser(headless?: boolean): Promise<any>;
8
+ }
9
+ declare class Browser {
10
+ browser: import("playwright-core").Browser | null;
11
+ context: import("playwright-core").BrowserContext | null;
12
+ page: import("playwright-core").Page | null;
13
+ init(headless?: boolean): Promise<void>;
14
+ close(): Promise<void>;
15
+ }
16
+ export {};
@@ -0,0 +1,4 @@
1
+ export class Environment {
2
+ baseUrl: any;
3
+ setBaseUrl(url: any): void;
4
+ }
package/bin/index.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ export * from "./auto_page.js";
2
+ export * from "./init_browser.js";
3
+ export * from "./stable_browser.js";
4
+ export * from "./environment.js";
5
+ export * from "./auto_page.js";
6
+ export * from "./browser_manager.js";
@@ -0,0 +1,3 @@
1
+ export function getContext(environment?: null, headless?: boolean, logger?: null): Promise<TestContext>;
2
+ export function closeBrowser(browser: any): Promise<void>;
3
+ import { TestContext } from "./test_context.js";
@@ -0,0 +1,21 @@
1
+ declare function processTableQuary(table: any, quary: any): {
2
+ cells: any[];
3
+ error?: undefined;
4
+ rect?: undefined;
5
+ } | {
6
+ error: string;
7
+ cells?: undefined;
8
+ rect?: undefined;
9
+ } | {
10
+ cells: any[];
11
+ rect: any;
12
+ error?: undefined;
13
+ };
14
+ declare const selectors: null;
15
+ declare const tableSelector: null;
16
+ declare function merge(rec1: any, rec2: any): {
17
+ x: number;
18
+ y: number;
19
+ width: number;
20
+ height: number;
21
+ };
@@ -0,0 +1,60 @@
1
+ export class StableBrowser {
2
+ constructor(browser: any, page: any, logger: any);
3
+ browser: any;
4
+ page: any;
5
+ logger: any;
6
+ goto(url: any): Promise<void>;
7
+ _fixUsingParams(text: any, _params: any): any;
8
+ _getLocator(locator: any, scope: any, _params: any): any;
9
+ _locateElementByText(scope: any, text1: any, tag1: any, regex?: boolean, _params?: null): Promise<any>;
10
+ _collectLocatorInformation(selectorHierarchy: any, index: number | undefined, scope: any, foundLocators: any, _params: any): Promise<void>;
11
+ _locate(selectors: any, info: any, _params: any, timeout?: number): Promise<any>;
12
+ click(selector: any, _params?: null, options?: {}): Promise<{
13
+ log: any[];
14
+ operation: string;
15
+ selector: any;
16
+ }>;
17
+ selectOption(selector: any, values: any, _params?: null, options?: {}): Promise<{
18
+ log: any[];
19
+ operation: string;
20
+ selector: any;
21
+ }>;
22
+ fill(selector: any, value: any, enter?: boolean, _params?: null, options?: {}): Promise<{
23
+ log: any[];
24
+ operation: string;
25
+ selector: any;
26
+ value: any;
27
+ }>;
28
+ getText(selector: any, _params?: null, options?: {}, info?: {}): Promise<any>;
29
+ containsPattern(selector: any, pattern: any, text: any, _params?: null, options?: {}): Promise<{
30
+ log: any[];
31
+ operation: string;
32
+ selector: any;
33
+ value: any;
34
+ pattern: any;
35
+ foundText: any;
36
+ }>;
37
+ containsText(selector: any, text: any, _params?: null, options?: {}): Promise<{
38
+ log: any[];
39
+ operation: string;
40
+ selector: any;
41
+ value: any;
42
+ foundText: any;
43
+ }>;
44
+ _screenShot(options?: {}): Promise<void>;
45
+ verifyElementExistInPage(selector: any, _params?: null, options?: {}): Promise<{
46
+ log: any[];
47
+ operation: string;
48
+ selector: any;
49
+ }>;
50
+ analyzeTable(selector: any, query: any, operator: any, value: any, _params?: null, options?: {}): Promise<{
51
+ log: any[];
52
+ operation: string;
53
+ selector: any;
54
+ query: any;
55
+ query_fixed: any;
56
+ operator: any;
57
+ value: any;
58
+ }>;
59
+ waitForPageLoad(options?: {}): Promise<void>;
60
+ }
@@ -0,0 +1 @@
1
+ export function getTableCells(page: any, element: any, tableSelector: any, info?: {}): Promise<any>;
@@ -0,0 +1,6 @@
1
+ export class TestContext {
2
+ browser: any;
3
+ playContext: any;
4
+ page: any;
5
+ environment: any;
6
+ }
package/package.json CHANGED
@@ -1,17 +1,19 @@
1
1
  {
2
2
  "name": "automation_model",
3
- "version": "1.0.60",
3
+ "version": "1.0.61",
4
4
  "description": "An automation infrastructure module to be use for generative AI automation projects.",
5
5
  "main": "bin/index.js",
6
6
  "type": "module",
7
+ "types": "bin/index.d.ts",
7
8
  "directories": {
8
9
  "lib": "lib"
9
10
  },
10
11
  "scripts": {
11
- "pack": "mkdir build && mkdir build/bin && cp ./src/auto_page.js ./build/bin/auto_page.js && cp ./src/environment.js ./build/bin/environment.js && cp ./src/browser_manager.js ./build/bin/browser_manager.js && cp ./src/test_context.js ./build/bin/test_context.js && cp ./src/init_browser.js ./build/bin/init_browser.js && cp ./src/stable_browser.js ./build/bin/stable_browser.js && cp ./src/index.js ./build/bin/index.js && cp ./package.json ./build/package.json && cp ./src/table_analyze.js ./build/bin/table_analyze.js && cp ./src/locator.js ./build/bin/locator.js",
12
- "clean": "rm -rf ./build",
12
+ "pack": "npm run types && mkdir build && mkdir build/bin && cp ./src/auto_page.js ./build/bin/auto_page.js && cp ./src/environment.js ./build/bin/environment.js && cp ./src/browser_manager.js ./build/bin/browser_manager.js && cp ./src/test_context.js ./build/bin/test_context.js && cp ./src/init_browser.js ./build/bin/init_browser.js && cp ./src/stable_browser.js ./build/bin/stable_browser.js && cp ./src/index.js ./build/bin/index.js && cp ./package.json ./build/package.json && cp ./src/table_analyze.js ./build/bin/table_analyze.js && cp ./src/locator.js ./build/bin/locator.js && cp ./types/src/*.ts ./build/bin",
13
+ "clean": "rm -rf ./build && rm -rf ./types",
13
14
  "build": "npm run clean && npm run pack",
14
- "test": "node ./tests/launch_page.js"
15
+ "test": "node ./tests/launch_page.js",
16
+ "types": "npx tsc --declaration --allowJs --emitDeclarationOnly --outDir types"
15
17
  },
16
18
  "author": "",
17
19
  "license": "ISC",
@@ -19,5 +21,8 @@
19
21
  "@playwright/test": "^1.35.0",
20
22
  "playwright": "^1.33.0",
21
23
  "regex-parser": "^2.2.11"
24
+ },
25
+ "devDependencies": {
26
+ "typescript": "^5.2.2"
22
27
  }
23
28
  }