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.
- package/bin/auto_page.d.ts +3 -0
- package/bin/browser_manager.d.ts +16 -0
- package/bin/environment.d.ts +4 -0
- package/bin/index.d.ts +6 -0
- package/bin/init_browser.d.ts +3 -0
- package/bin/locator.d.ts +21 -0
- package/bin/stable_browser.d.ts +60 -0
- package/bin/table_analyze.d.ts +1 -0
- package/bin/test_context.d.ts +6 -0
- package/package.json +9 -4
|
@@ -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 {};
|
package/bin/index.d.ts
ADDED
package/bin/locator.d.ts
ADDED
|
@@ -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>;
|
package/package.json
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "automation_model",
|
|
3
|
-
"version": "1.0.
|
|
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
|
}
|