@probolabs/playwright 0.1.1 → 0.1.4
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/dist/index.d.ts +57 -0
- package/dist/index.js +1177 -0
- package/dist/index.js.map +1 -0
- package/dist/types/actions.d.ts.map +1 -0
- package/dist/types/api-client.d.ts.map +1 -0
- package/dist/types/highlight.d.ts.map +1 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/utils.d.ts.map +1 -0
- package/package.json +17 -7
- package/dist/probo-playwright.esm.js +0 -63
- package/dist/probo-playwright.umd.js +0 -69
- package/dist/src/index.d.ts +0 -23
- package/dist/tsconfig.tsbuildinfo +0 -1
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Page } from 'playwright';
|
|
2
|
+
import { ElementTag } from '@probolabs/highlighter/src/constants';
|
|
3
|
+
export { ElementTag } from '@probolabs/highlighter/src/constants';
|
|
4
|
+
|
|
5
|
+
type ElementTagType = typeof ElementTag[keyof typeof ElementTag];
|
|
6
|
+
declare global {
|
|
7
|
+
var highlighterCode: string;
|
|
8
|
+
interface Window {
|
|
9
|
+
ProboLabs?: {
|
|
10
|
+
highlight: {
|
|
11
|
+
execute: (elementTypes: ElementTagType[]) => Promise<any>;
|
|
12
|
+
unexecute: () => Promise<any>;
|
|
13
|
+
};
|
|
14
|
+
highlightElements: (elements: Array<{
|
|
15
|
+
css_selector: string;
|
|
16
|
+
index: string;
|
|
17
|
+
}>) => void;
|
|
18
|
+
ElementTag: typeof ElementTag;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare enum ProboLogLevel {
|
|
24
|
+
DEBUG = "DEBUG",
|
|
25
|
+
INFO = "INFO",
|
|
26
|
+
LOG = "LOG",
|
|
27
|
+
WARN = "WARN",
|
|
28
|
+
ERROR = "ERROR"
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare const DEMO_TOKEN = "b31793f81a1f58b8a153c86a5fdf4df0e5179c51";
|
|
32
|
+
|
|
33
|
+
interface ProboConfig {
|
|
34
|
+
scenarioName: string;
|
|
35
|
+
token: string;
|
|
36
|
+
apiUrl: string;
|
|
37
|
+
enableConsoleLogs?: boolean;
|
|
38
|
+
debugLevel?: ProboLogLevel;
|
|
39
|
+
}
|
|
40
|
+
declare class Probo {
|
|
41
|
+
private highlighter;
|
|
42
|
+
private apiClient;
|
|
43
|
+
private readonly enableConsoleLogs;
|
|
44
|
+
private readonly scenarioName;
|
|
45
|
+
constructor({ scenarioName, token, apiUrl, enableConsoleLogs, debugLevel }: ProboConfig);
|
|
46
|
+
runStep(page: Page, stepPrompt: string, stepIdFromServer?: number | null, // Make optional
|
|
47
|
+
useCache?: boolean): Promise<boolean>;
|
|
48
|
+
private _handleStepCreation;
|
|
49
|
+
private setupConsoleLogs;
|
|
50
|
+
highlightElements(page: Page, elementTag: ElementTagType): Promise<any>;
|
|
51
|
+
unhighlightElements(page: Page): Promise<void>;
|
|
52
|
+
highlightElement(page: Page, element_css_selector: string, element_index: string): Promise<void>;
|
|
53
|
+
screenshot(page: Page): Promise<string>;
|
|
54
|
+
private _handlePerformAction;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export { DEMO_TOKEN, Probo, ProboLogLevel };
|