browsertime 20.0.0 → 21.0.0
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/CHANGELOG.md +23 -0
- package/README.md +2 -2
- package/bin/browsertime.js +9 -3
- package/browserscripts/pageinfo/interactionToNextPaintInfo.js +170 -143
- package/browserscripts/timings/interactionToNextPaint.js +49 -137
- package/lib/chrome/webdriver/setupChromiumOptions.js +0 -9
- package/lib/core/engine/collector.js +11 -0
- package/lib/core/engine/command/actions.js +52 -0
- package/lib/core/engine/command/addText.js +48 -30
- package/lib/core/engine/command/android.js +43 -4
- package/lib/core/engine/command/cache.js +39 -2
- package/lib/core/engine/command/chromeDevToolsProtocol.js +51 -1
- package/lib/core/engine/command/chromeTrace.js +34 -0
- package/lib/core/engine/command/click.js +102 -52
- package/lib/core/engine/command/debug.js +19 -2
- package/lib/core/engine/command/element.js +66 -0
- package/lib/core/engine/command/geckoProfiler.js +41 -1
- package/lib/core/engine/command/javaScript.js +43 -20
- package/lib/core/engine/command/measure.js +147 -15
- package/lib/core/engine/command/meta.js +17 -0
- package/lib/core/engine/command/mouse/clickAndHold.js +56 -29
- package/lib/core/engine/command/mouse/contextClick.js +30 -11
- package/lib/core/engine/command/mouse/doubleClick.js +35 -11
- package/lib/core/engine/command/mouse/mouseMove.js +38 -16
- package/lib/core/engine/command/mouse/singleClick.js +187 -12
- package/lib/core/engine/command/navigation.js +31 -3
- package/lib/core/engine/command/screenshot.js +33 -0
- package/lib/core/engine/command/scroll.js +35 -13
- package/lib/core/engine/command/select.js +55 -36
- package/lib/core/engine/command/set.js +51 -36
- package/lib/core/engine/command/stopWatch.js +30 -9
- package/lib/core/engine/command/switch.js +49 -11
- package/lib/core/engine/command/wait.js +50 -25
- package/lib/core/engine/commands.js +267 -0
- package/lib/core/engine/context.js +81 -0
- package/lib/core/engine/iteration.js +20 -102
- package/lib/firefox/geckoProfiler.js +49 -1
- package/lib/firefox/webdriver/builder.js +4 -9
- package/lib/firefox/webdriver/firefox.js +1 -1
- package/lib/support/cli.js +7 -0
- package/lib/support/statistics.js +11 -1
- package/package.json +17 -7
- package/types/android/index.d.ts +70 -0
- package/types/android/index.d.ts.map +1 -0
- package/types/chrome/parseCpuTrace.d.ts +21 -0
- package/types/chrome/parseCpuTrace.d.ts.map +1 -0
- package/types/chrome/traceCategoriesParser.d.ts +2 -0
- package/types/chrome/traceCategoriesParser.d.ts.map +1 -0
- package/types/chrome/webdriver/traceUtilities.d.ts +8 -0
- package/types/chrome/webdriver/traceUtilities.d.ts.map +1 -0
- package/types/core/engine/command/action.d.ts +73 -0
- package/types/core/engine/command/action.d.ts.map +1 -0
- package/types/core/engine/command/actions.d.ts +38 -0
- package/types/core/engine/command/actions.d.ts.map +1 -0
- package/types/core/engine/command/addText.d.ts +68 -0
- package/types/core/engine/command/addText.d.ts.map +1 -0
- package/types/core/engine/command/android.d.ts +39 -0
- package/types/core/engine/command/android.d.ts.map +1 -0
- package/types/core/engine/command/cache.d.ts +53 -0
- package/types/core/engine/command/cache.d.ts.map +1 -0
- package/types/core/engine/command/chromeDevToolsProtocol.d.ts +61 -0
- package/types/core/engine/command/chromeDevToolsProtocol.d.ts.map +1 -0
- package/types/core/engine/command/chromeTrace.d.ts +45 -0
- package/types/core/engine/command/chromeTrace.d.ts.map +1 -0
- package/types/core/engine/command/click.d.ts +151 -0
- package/types/core/engine/command/click.d.ts.map +1 -0
- package/types/core/engine/command/debug.d.ts +28 -0
- package/types/core/engine/command/debug.d.ts.map +1 -0
- package/types/core/engine/command/element.d.ts +49 -0
- package/types/core/engine/command/element.d.ts.map +1 -0
- package/types/core/engine/command/geckoProfiler.d.ts +46 -0
- package/types/core/engine/command/geckoProfiler.d.ts.map +1 -0
- package/types/core/engine/command/javaScript.d.ts +63 -0
- package/types/core/engine/command/javaScript.d.ts.map +1 -0
- package/types/core/engine/command/measure.d.ts +194 -0
- package/types/core/engine/command/measure.d.ts.map +1 -0
- package/types/core/engine/command/meta.d.ts +23 -0
- package/types/core/engine/command/meta.d.ts.map +1 -0
- package/types/core/engine/command/mouse/clickAndHold.d.ts +82 -0
- package/types/core/engine/command/mouse/clickAndHold.d.ts.map +1 -0
- package/types/core/engine/command/mouse/contextClick.d.ts +44 -0
- package/types/core/engine/command/mouse/contextClick.d.ts.map +1 -0
- package/types/core/engine/command/mouse/doubleClick.d.ts +51 -0
- package/types/core/engine/command/mouse/doubleClick.d.ts.map +1 -0
- package/types/core/engine/command/mouse/index.d.ts +6 -0
- package/types/core/engine/command/mouse/index.d.ts.map +1 -0
- package/types/core/engine/command/mouse/mouseMove.d.ts +56 -0
- package/types/core/engine/command/mouse/mouseMove.d.ts.map +1 -0
- package/types/core/engine/command/mouse/singleClick.d.ts +115 -0
- package/types/core/engine/command/mouse/singleClick.d.ts.map +1 -0
- package/types/core/engine/command/navigation.d.ts +45 -0
- package/types/core/engine/command/navigation.d.ts.map +1 -0
- package/types/core/engine/command/screenshot.d.ts +33 -0
- package/types/core/engine/command/screenshot.d.ts.map +1 -0
- package/types/core/engine/command/scroll.d.ts +52 -0
- package/types/core/engine/command/scroll.d.ts.map +1 -0
- package/types/core/engine/command/select.d.ts +81 -0
- package/types/core/engine/command/select.d.ts.map +1 -0
- package/types/core/engine/command/set.d.ts +74 -0
- package/types/core/engine/command/set.d.ts.map +1 -0
- package/types/core/engine/command/stopWatch.d.ts +49 -0
- package/types/core/engine/command/stopWatch.d.ts.map +1 -0
- package/types/core/engine/command/switch.d.ts +77 -0
- package/types/core/engine/command/switch.d.ts.map +1 -0
- package/types/core/engine/command/util/lcpHighlightScript.d.ts +2 -0
- package/types/core/engine/command/util/lcpHighlightScript.d.ts.map +1 -0
- package/types/core/engine/command/util/lsHighlightScript.d.ts +2 -0
- package/types/core/engine/command/util/lsHighlightScript.d.ts.map +1 -0
- package/types/core/engine/command/wait.d.ts +74 -0
- package/types/core/engine/command/wait.d.ts.map +1 -0
- package/types/core/engine/commands.d.ts +161 -0
- package/types/core/engine/commands.d.ts.map +1 -0
- package/types/core/engine/context.d.ts +87 -0
- package/types/core/engine/context.d.ts.map +1 -0
- package/types/firefox/geckoProfiler.d.ts +11 -0
- package/types/firefox/geckoProfiler.d.ts.map +1 -0
- package/types/firefox/settings/geckoProfilerDefaults.d.ts +8 -0
- package/types/firefox/settings/geckoProfilerDefaults.d.ts.map +1 -0
- package/types/scripting.d.ts +2 -0
- package/types/support/engineUtils.d.ts +5 -0
- package/types/support/engineUtils.d.ts.map +1 -0
- package/types/support/errors.d.ts +15 -0
- package/types/support/errors.d.ts.map +1 -0
- package/types/support/fileUtil.d.ts +10 -0
- package/types/support/fileUtil.d.ts.map +1 -0
- package/types/support/filters.d.ts +7 -0
- package/types/support/filters.d.ts.map +1 -0
- package/types/support/getViewPort.d.ts +2 -0
- package/types/support/getViewPort.d.ts.map +1 -0
- package/types/support/pathToFolder.d.ts +2 -0
- package/types/support/pathToFolder.d.ts.map +1 -0
- package/types/support/storageManager.d.ts +17 -0
- package/types/support/storageManager.d.ts.map +1 -0
- package/types/support/tcpdump.d.ts +10 -0
- package/types/support/tcpdump.d.ts.map +1 -0
- package/types/support/userTiming.d.ts +2 -0
- package/types/support/userTiming.d.ts.map +1 -0
- package/types/support/util.d.ts +6 -0
- package/types/support/util.d.ts.map +1 -0
- package/types/video/defaults.d.ts +7 -0
- package/types/video/defaults.d.ts.map +1 -0
- package/types/video/postprocessing/finetune/addTextToVideo.d.ts +2 -0
- package/types/video/postprocessing/finetune/addTextToVideo.d.ts.map +1 -0
- package/types/video/postprocessing/finetune/convertFps.d.ts +2 -0
- package/types/video/postprocessing/finetune/convertFps.d.ts.map +1 -0
- package/types/video/postprocessing/finetune/getFont.d.ts +2 -0
- package/types/video/postprocessing/finetune/getFont.d.ts.map +1 -0
- package/types/video/postprocessing/finetune/getTimingMetrics.d.ts +2 -0
- package/types/video/postprocessing/finetune/getTimingMetrics.d.ts.map +1 -0
- package/types/video/postprocessing/finetune/index.d.ts +2 -0
- package/types/video/postprocessing/finetune/index.d.ts.map +1 -0
- package/types/video/postprocessing/finetune/removeOrange.d.ts +2 -0
- package/types/video/postprocessing/finetune/removeOrange.d.ts.map +1 -0
- package/types/video/postprocessing/visualmetrics/extraMetrics.d.ts +5 -0
- package/types/video/postprocessing/visualmetrics/extraMetrics.d.ts.map +1 -0
- package/types/video/postprocessing/visualmetrics/getVideoMetrics.d.ts +5 -0
- package/types/video/postprocessing/visualmetrics/getVideoMetrics.d.ts.map +1 -0
- package/types/video/postprocessing/visualmetrics/visualMetrics.d.ts +3 -0
- package/types/video/postprocessing/visualmetrics/visualMetrics.d.ts.map +1 -0
- package/types/video/screenRecording/android/recorder.d.ts +11 -0
- package/types/video/screenRecording/android/recorder.d.ts.map +1 -0
- package/types/video/screenRecording/desktop/convert.d.ts +2 -0
- package/types/video/screenRecording/desktop/convert.d.ts.map +1 -0
- package/types/video/screenRecording/desktop/desktopRecorder.d.ts +28 -0
- package/types/video/screenRecording/desktop/desktopRecorder.d.ts.map +1 -0
- package/types/video/screenRecording/desktop/ffmpegRecorder.d.ts +17 -0
- package/types/video/screenRecording/desktop/ffmpegRecorder.d.ts.map +1 -0
- package/types/video/screenRecording/desktop/osx/getSPDisplaysDataType.d.ts +2 -0
- package/types/video/screenRecording/desktop/osx/getSPDisplaysDataType.d.ts.map +1 -0
- package/types/video/screenRecording/desktop/osx/getScreen.d.ts +2 -0
- package/types/video/screenRecording/desktop/osx/getScreen.d.ts.map +1 -0
- package/types/video/screenRecording/firefox/firefoxWindowRecorder.d.ts +13 -0
- package/types/video/screenRecording/firefox/firefoxWindowRecorder.d.ts.map +1 -0
- package/types/video/screenRecording/ios/convertToMp4.d.ts +2 -0
- package/types/video/screenRecording/ios/convertToMp4.d.ts.map +1 -0
- package/types/video/screenRecording/ios/iosRecorder.d.ts +14 -0
- package/types/video/screenRecording/ios/iosRecorder.d.ts.map +1 -0
- package/types/video/screenRecording/iosSimulator/convertToMp4.d.ts +2 -0
- package/types/video/screenRecording/iosSimulator/convertToMp4.d.ts.map +1 -0
- package/types/video/screenRecording/iosSimulator/recorder.d.ts +9 -0
- package/types/video/screenRecording/iosSimulator/recorder.d.ts.map +1 -0
- package/types/video/screenRecording/recorder.d.ts +7 -0
- package/types/video/screenRecording/recorder.d.ts.map +1 -0
- package/types/video/screenRecording/setOrangeBackground.d.ts +2 -0
- package/types/video/screenRecording/setOrangeBackground.d.ts.map +1 -0
- package/types/video/video.d.ts +41 -0
- package/types/video/video.d.ts.map +1 -0
- package/browsersupport/firefox-profile/cert9.db +0 -0
- package/browsersupport/firefox-profile/chrome/userChrome.css +0 -4
- package/browsersupport/firefox-profile/key4.db +0 -0
- package/vendor/mac/x86/qvh +0 -0
- package/visualmetrics/__init__.py +0 -1
- package/visualmetrics/test_data/ms_000000.png +0 -0
- package/visualmetrics/test_data/ms_000920.png +0 -0
- package/visualmetrics/test_data/ms_001000.png +0 -0
- package/visualmetrics/test_data/ms_001080.png +0 -0
- package/visualmetrics/test_data/ms_001200.png +0 -0
- package/visualmetrics/test_data/ms_001240.png +0 -0
- package/visualmetrics/test_data/ms_001280.png +0 -0
- package/visualmetrics/test_data/ms_001360.png +0 -0
- package/visualmetrics/test_data/ms_001400.png +0 -0
- package/visualmetrics/test_data/ms_001520.png +0 -0
- package/visualmetrics/test_data/ms_002040.png +0 -0
- package/visualmetrics/test_data/ms_002600.png +0 -0
- package/visualmetrics/test_data/ms_003160.png +0 -0
- package/visualmetrics/test_data/ms_003720.png +0 -0
- package/visualmetrics/test_data/ms_004280.png +0 -0
- package/visualmetrics/test_data/ms_004880.png +0 -0
- package/visualmetrics/test_data/ms_005440.png +0 -0
- package/visualmetrics/test_data/ms_006000.png +0 -0
- package/visualmetrics/test_visualmetrics.py +0 -34
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides functionality to perform a context click (right-click) on elements in a web page.
|
|
3
|
+
*
|
|
4
|
+
* @class
|
|
5
|
+
* @hideconstructor
|
|
6
|
+
*/
|
|
7
|
+
export class ContextClick {
|
|
8
|
+
constructor(browser: any);
|
|
9
|
+
/**
|
|
10
|
+
* @private
|
|
11
|
+
*/
|
|
12
|
+
private driver;
|
|
13
|
+
/**
|
|
14
|
+
* @private
|
|
15
|
+
*/
|
|
16
|
+
private actions;
|
|
17
|
+
/**
|
|
18
|
+
* Performs a context click (right-click) on an element that matches a given XPath selector.
|
|
19
|
+
*
|
|
20
|
+
* @async
|
|
21
|
+
* @param {string} xpath - The XPath selector of the element to context click.
|
|
22
|
+
* @returns {Promise<void>} A promise that resolves when the context click action is performed.
|
|
23
|
+
* @throws {Error} Throws an error if the element is not found.
|
|
24
|
+
*/
|
|
25
|
+
byXpath(xpath: string): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Performs a context click (right-click) on an element that matches a given CSS selector.
|
|
28
|
+
*
|
|
29
|
+
* @async
|
|
30
|
+
* @param {string} selector - The CSS selector of the element to context click.
|
|
31
|
+
* @returns {Promise<void>} A promise that resolves when the context click action is performed.
|
|
32
|
+
* @throws {Error} Throws an error if the element is not found.
|
|
33
|
+
*/
|
|
34
|
+
bySelector(selector: string): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Performs a context click (right-click) at the current cursor position.
|
|
37
|
+
*
|
|
38
|
+
* @async
|
|
39
|
+
* @returns {Promise<void>} A promise that resolves when the context click action is performed.
|
|
40
|
+
* @throws {Error} Throws an error if the context click action cannot be performed.
|
|
41
|
+
*/
|
|
42
|
+
atCursor(): Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=contextClick.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contextClick.d.ts","sourceRoot":"","sources":["../../../../../lib/core/engine/command/mouse/contextClick.js"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH;IACE,0BASC;IARC;;OAEG;IACH,eAAiC;IACjC;;OAEG;IACH,gBAAmD;IAGrD;;;;;;;OAOG;IACH,eAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAYzB;IAED;;;;;;;OAOG;IACH,qBAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAczB;IAED;;;;;;OAMG;IACH,YAHa,QAAQ,IAAI,CAAC,CAWzB;CACF"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides functionality to perform a double-click action on elements in a web page.
|
|
3
|
+
*
|
|
4
|
+
* @class
|
|
5
|
+
* @hideconstructor
|
|
6
|
+
*/
|
|
7
|
+
export class DoubleClick {
|
|
8
|
+
constructor(browser: any, pageCompleteCheck: any);
|
|
9
|
+
/**
|
|
10
|
+
* @private
|
|
11
|
+
*/
|
|
12
|
+
private browser;
|
|
13
|
+
/**
|
|
14
|
+
* @private
|
|
15
|
+
*/
|
|
16
|
+
private actions;
|
|
17
|
+
/**
|
|
18
|
+
* @private
|
|
19
|
+
*/
|
|
20
|
+
private pageCompleteCheck;
|
|
21
|
+
/**
|
|
22
|
+
* Performs a mouse double-click on an element matching a given XPath selector.
|
|
23
|
+
*
|
|
24
|
+
* @async
|
|
25
|
+
* @param {string} xpath - The XPath selector of the element to double-click.
|
|
26
|
+
* @param {Object} [options] - Additional options for the double-click action.
|
|
27
|
+
* @returns {Promise<void>} A promise that resolves when the double-click action is performed.
|
|
28
|
+
* @throws {Error} Throws an error if the element is not found.
|
|
29
|
+
*/
|
|
30
|
+
byXpath(xpath: string, options?: any): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Performs a mouse double-click on an element matching a given CSS selector.
|
|
33
|
+
*
|
|
34
|
+
* @async
|
|
35
|
+
* @param {string} selector - The CSS selector of the element to double-click.
|
|
36
|
+
* @param {Object} [options] - Additional options for the double-click action.
|
|
37
|
+
* @returns {Promise<void>} A promise that resolves when the double-click action is performed.
|
|
38
|
+
* @throws {Error} Throws an error if the element is not found.
|
|
39
|
+
*/
|
|
40
|
+
bySelector(selector: string, options?: any): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Performs a mouse double-click at the current cursor position.
|
|
43
|
+
*
|
|
44
|
+
* @async
|
|
45
|
+
* @param {Object} [options] - Additional options for the double-click action.
|
|
46
|
+
* @returns {Promise<void>} A promise that resolves when the double-click occurs.
|
|
47
|
+
* @throws {Error} Throws an error if the double-click action cannot be performed.
|
|
48
|
+
*/
|
|
49
|
+
atCursor(options?: any): Promise<void>;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=doubleClick.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doubleClick.d.ts","sourceRoot":"","sources":["../../../../../lib/core/engine/command/mouse/doubleClick.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH;IACE,kDAaC;IAZC;;OAEG;IACH,gBAAsB;IACtB;;OAEG;IACH,gBAAgE;IAChE;;OAEG;IACH,0BAA0C;IAG5C;;;;;;;;OAQG;IACH,eALW,MAAM,kBAEJ,QAAQ,IAAI,CAAC,CAiBzB;IAED;;;;;;;;OAQG;IACH,qBALW,MAAM,kBAEJ,QAAQ,IAAI,CAAC,CAmBzB;IAED;;;;;;;OAOG;IACH,yBAHa,QAAQ,IAAI,CAAC,CAczB;CACF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ClickAndHold } from "./clickAndHold.js";
|
|
2
|
+
export { DoubleClick } from "./doubleClick.js";
|
|
3
|
+
export { ContextClick } from "./contextClick.js";
|
|
4
|
+
export { SingleClick } from "./singleClick.js";
|
|
5
|
+
export { MouseMove } from "./mouseMove.js";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/core/engine/command/mouse/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides functionality to move the mouse cursor to elements or specific positions on a web page.
|
|
3
|
+
*
|
|
4
|
+
* @class
|
|
5
|
+
* @hideconstructor
|
|
6
|
+
*/
|
|
7
|
+
export class MouseMove {
|
|
8
|
+
constructor(browser: any);
|
|
9
|
+
/**
|
|
10
|
+
* @private
|
|
11
|
+
*/
|
|
12
|
+
private driver;
|
|
13
|
+
/**
|
|
14
|
+
* @private
|
|
15
|
+
*/
|
|
16
|
+
private actions;
|
|
17
|
+
/**
|
|
18
|
+
* Moves the mouse cursor to an element that matches a given XPath selector.
|
|
19
|
+
*
|
|
20
|
+
* @async
|
|
21
|
+
* @param {string} xpath - The XPath selector of the element to move to.
|
|
22
|
+
* @returns {Promise<void>} A promise that resolves when the mouse has moved to the element.
|
|
23
|
+
* @throws {Error} Throws an error if the element is not found.
|
|
24
|
+
*/
|
|
25
|
+
byXpath(xpath: string): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Moves the mouse cursor to an element that matches a given CSS selector.
|
|
28
|
+
*
|
|
29
|
+
* @async
|
|
30
|
+
* @param {string} selector - The CSS selector of the element to move to.
|
|
31
|
+
* @returns {Promise<void>} A promise that resolves when the mouse has moved to the element.
|
|
32
|
+
* @throws {Error} Throws an error if the element is not found.
|
|
33
|
+
*/
|
|
34
|
+
bySelector(selector: string): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Moves the mouse cursor to a specific position on the screen.
|
|
37
|
+
*
|
|
38
|
+
* @async
|
|
39
|
+
* @param {number} xPos - The x-coordinate on the screen to move to.
|
|
40
|
+
* @param {number} yPos - The y-coordinate on the screen to move to.
|
|
41
|
+
* @returns {Promise<void>} A promise that resolves when the mouse has moved to the specified position.
|
|
42
|
+
* @throws {Error} Throws an error if the action cannot be performed.
|
|
43
|
+
*/
|
|
44
|
+
toPosition(xPos: number, yPos: number): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Moves the mouse cursor by an offset from its current position.
|
|
47
|
+
*
|
|
48
|
+
* @async
|
|
49
|
+
* @param {number} xOffset - The x offset to move by.
|
|
50
|
+
* @param {number} yOffset - The y offset to move by.
|
|
51
|
+
* @returns {Promise<void>} A promise that resolves when the mouse has moved by the specified offset.
|
|
52
|
+
* @throws {Error} Throws an error if the action cannot be performed.
|
|
53
|
+
*/
|
|
54
|
+
byOffset(xOffset: number, yOffset: number): Promise<void>;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=mouseMove.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mouseMove.d.ts","sourceRoot":"","sources":["../../../../../lib/core/engine/command/mouse/mouseMove.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH;IACE,0BASC;IARC;;OAEG;IACH,eAAiC;IACjC;;OAEG;IACH,gBAAmD;IAGrD;;;;;;;OAOG;IACH,eAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAYzB;IAED;;;;;;;OAOG;IACH,qBAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAYzB;IAED;;;;;;;;OAQG;IACH,iBALW,MAAM,QACN,MAAM,GACJ,QAAQ,IAAI,CAAC,CAWzB;IAED;;;;;;;;OAQG;IACH,kBALW,MAAM,WACN,MAAM,GACJ,QAAQ,IAAI,CAAC,CAazB;CACF"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides functionality to perform a single click action on elements or at specific positions in a web page. Uses Seleniums Action API.
|
|
3
|
+
*
|
|
4
|
+
* @hideconstructor
|
|
5
|
+
* @class
|
|
6
|
+
*/
|
|
7
|
+
export class SingleClick {
|
|
8
|
+
constructor(browser: any, pageCompleteCheck: any);
|
|
9
|
+
/**
|
|
10
|
+
* @private
|
|
11
|
+
*/
|
|
12
|
+
private browser;
|
|
13
|
+
/**
|
|
14
|
+
* @private
|
|
15
|
+
*/
|
|
16
|
+
private actions;
|
|
17
|
+
/**
|
|
18
|
+
* @private
|
|
19
|
+
*/
|
|
20
|
+
private pageCompleteCheck;
|
|
21
|
+
/**
|
|
22
|
+
* Performs a single mouse click on an element matching a given XPath selector.
|
|
23
|
+
*
|
|
24
|
+
* @async
|
|
25
|
+
* @param {string} xpath - The XPath selector of the element to click.
|
|
26
|
+
* @param {Object} [options] - Additional options for the click action.
|
|
27
|
+
* @returns {Promise<void>} A promise that resolves when the single click action is performed.
|
|
28
|
+
* @throws {Error} Throws an error if the element is not found.
|
|
29
|
+
*/
|
|
30
|
+
byXpath(xpath: string, options?: any): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Performs a single mouse click on an element matching a given XPath selector and wait for page complete check.
|
|
33
|
+
*
|
|
34
|
+
* @async
|
|
35
|
+
* @param {string} xpath - The XPath selector of the element to click.
|
|
36
|
+
* @returns {Promise<void>} A promise that resolves when the single click action is performed.
|
|
37
|
+
* @throws {Error} Throws an error if the element is not found.
|
|
38
|
+
*/
|
|
39
|
+
byXpathAndWait(xpath: string): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Performs a single mouse click on an element matching a given CSS selector.
|
|
42
|
+
*
|
|
43
|
+
* @async
|
|
44
|
+
* @param {string} selector - The CSS selector of the element to click.
|
|
45
|
+
* @param {Object} [options] - Additional options for the click action.
|
|
46
|
+
* @returns {Promise<void>} A promise that resolves when the single click action is performed.
|
|
47
|
+
* @throws {Error} Throws an error if the element is not found.
|
|
48
|
+
*/
|
|
49
|
+
bySelector(selector: string, options?: any): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Performs a single mouse click on an element matching a given CSS selector and waits on the page complete check.
|
|
52
|
+
*
|
|
53
|
+
* @async
|
|
54
|
+
* @param {string} selector - The CSS selector of the element to click.
|
|
55
|
+
* @returns {Promise<void>} A promise that resolves when the single click action is performed.
|
|
56
|
+
* @throws {Error} Throws an error if the element is not found.
|
|
57
|
+
*/
|
|
58
|
+
bySelectorAndWait(selector: string): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Performs a single mouse click at the current cursor position.
|
|
61
|
+
*
|
|
62
|
+
* @async
|
|
63
|
+
* @param {Object} [options] - Additional options for the click action.
|
|
64
|
+
* @returns {Promise<void>} A promise that resolves when the single click occurs.
|
|
65
|
+
* @throws {Error} Throws an error if the single click action cannot be performed.
|
|
66
|
+
*/
|
|
67
|
+
atCursor(options?: any): Promise<void>;
|
|
68
|
+
/**
|
|
69
|
+
* Performs a single mouse click at the current cursor position and waits on the
|
|
70
|
+
* page complete check.
|
|
71
|
+
*
|
|
72
|
+
* @async
|
|
73
|
+
* @returns {Promise<void>} A promise that resolves when the single click occurs.
|
|
74
|
+
* @throws {Error} Throws an error if the single click action cannot be performed.
|
|
75
|
+
*/
|
|
76
|
+
atCursorAndWait(): Promise<void>;
|
|
77
|
+
/**
|
|
78
|
+
* Clicks on a link whose visible text matches the given string.
|
|
79
|
+
*
|
|
80
|
+
* @async
|
|
81
|
+
* @param {string} text - The visible text of the link to click.
|
|
82
|
+
* @returns {Promise<void>} A promise that resolves when the click action is performed.
|
|
83
|
+
* @throws {Error} Throws an error if the link is not found.
|
|
84
|
+
*/
|
|
85
|
+
byLinkText(text: string): Promise<void>;
|
|
86
|
+
/**
|
|
87
|
+
* Clicks on a link whose visible text matches the given string and waits on the opage complete check.
|
|
88
|
+
*
|
|
89
|
+
* @async
|
|
90
|
+
* @param {string} text - The visible text of the link to click.
|
|
91
|
+
* @returns {Promise<void>} A promise that resolves when the click action is performed.
|
|
92
|
+
* @throws {Error} Throws an error if the link is not found.
|
|
93
|
+
*/
|
|
94
|
+
byLinkTextAndWait(text: string): Promise<void>;
|
|
95
|
+
/**
|
|
96
|
+
* Clicks on a link whose visible text contains the given substring.
|
|
97
|
+
*
|
|
98
|
+
* @async
|
|
99
|
+
* @param {string} text - The substring of the visible text of the link to click.
|
|
100
|
+
* @returns {Promise<void>} A promise that resolves when the click action is performed.
|
|
101
|
+
* @throws {Error} Throws an error if the link is not found.
|
|
102
|
+
*/
|
|
103
|
+
byPartialLinkText(text: string): Promise<void>;
|
|
104
|
+
/**
|
|
105
|
+
* Clicks on a link whose visible text contains the given substring and waits on the
|
|
106
|
+
* page complete checl.
|
|
107
|
+
*
|
|
108
|
+
* @async
|
|
109
|
+
* @param {string} text - The substring of the visible text of the link to click.
|
|
110
|
+
* @returns {Promise<void>} A promise that resolves when the click action is performed.
|
|
111
|
+
* @throws {Error} Throws an error if the link is not found.
|
|
112
|
+
*/
|
|
113
|
+
byPartialLinkTextAndWait(text: string): Promise<void>;
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=singleClick.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"singleClick.d.ts","sourceRoot":"","sources":["../../../../../lib/core/engine/command/mouse/singleClick.js"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH;IACE,kDAaC;IAZC;;OAEG;IACH,gBAAsB;IACtB;;OAEG;IACH,gBAAgE;IAChE;;OAEG;IACH,0BAA0C;IAG5C;;;;;;;;OAQG;IACH,eALW,MAAM,kBAEJ,QAAQ,IAAI,CAAC,CAoBzB;IAED;;;;;;;OAOG;IACH,sBAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAezB;IAED;;;;;;;;OAQG;IACH,qBALW,MAAM,kBAEJ,QAAQ,IAAI,CAAC,CAsBzB;IAED;;;;;;;OAOG;IACH,4BAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAiBzB;IAED;;;;;;;OAOG;IACH,yBAHa,QAAQ,IAAI,CAAC,CAiBzB;IAED;;;;;;;OAOG;IACH,mBAHa,QAAQ,IAAI,CAAC,CAYzB;IAED;;;;;;;OAOG;IACH,iBAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAYzB;IAED;;;;;;;OAOG;IACH,wBAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAYzB;IAED;;;;;;;OAOG;IACH,wBAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAYzB;IAED;;;;;;;;OAQG;IACH,+BAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAYzB;CACF"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides functionality to control browser navigation such as back, forward, and refresh actions.
|
|
3
|
+
*
|
|
4
|
+
* @class
|
|
5
|
+
* @hideconstructor
|
|
6
|
+
*/
|
|
7
|
+
export class Navigation {
|
|
8
|
+
constructor(browser: any, pageCompleteCheck: any);
|
|
9
|
+
/**
|
|
10
|
+
* @private
|
|
11
|
+
*/
|
|
12
|
+
private browser;
|
|
13
|
+
/**
|
|
14
|
+
* @private
|
|
15
|
+
*/
|
|
16
|
+
private pageCompleteCheck;
|
|
17
|
+
/**
|
|
18
|
+
* Navigates backward in the browser's history.
|
|
19
|
+
*
|
|
20
|
+
* @async
|
|
21
|
+
* @param {Object} [options] - Additional options for navigation. Set {wait:true} to wait for the page complete check to run.
|
|
22
|
+
* @returns {Promise<void>} A promise that resolves when the navigation action is completed.
|
|
23
|
+
* @throws {Error} Throws an error if navigation fails.
|
|
24
|
+
*/
|
|
25
|
+
back(options?: any): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Navigates forward in the browser's history.
|
|
28
|
+
*
|
|
29
|
+
* @async
|
|
30
|
+
* @param {Object} [options] - Additional options for navigation. Set {wait:true} to wait for the page complete check to run.
|
|
31
|
+
* @returns {Promise<void>} A promise that resolves when the navigation action is completed.
|
|
32
|
+
* @throws {Error} Throws an error if navigation fails.
|
|
33
|
+
*/
|
|
34
|
+
forward(options?: any): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Refreshes the current page.
|
|
37
|
+
*
|
|
38
|
+
* @async
|
|
39
|
+
* @param {Object} [options] - Additional options for refresh action. Set {wait:true} to wait for the page complete check to run.
|
|
40
|
+
* @returns {Promise<void>} A promise that resolves when the page has been refreshed.
|
|
41
|
+
* @throws {Error} Throws an error if refreshing the page fails.
|
|
42
|
+
*/
|
|
43
|
+
refresh(options?: any): Promise<void>;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=navigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../../lib/core/engine/command/navigation.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH;IACE,kDASC;IARC;;OAEG;IACH,gBAAsB;IACtB;;OAEG;IACH,0BAA0C;IAG5C;;;;;;;OAOG;IACH,qBAHa,QAAQ,IAAI,CAAC,CAezB;IAED;;;;;;;OAOG;IACH,wBAHa,QAAQ,IAAI,CAAC,CAezB;IAED;;;;;;;OAOG;IACH,wBAHa,QAAQ,IAAI,CAAC,CAezB;CACF"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Take a screenshot. The screenshot will be stored to disk,
|
|
3
|
+
* named by the name provided to the take function.
|
|
4
|
+
*
|
|
5
|
+
* @class
|
|
6
|
+
* @hideconstructor
|
|
7
|
+
*/
|
|
8
|
+
export class Screenshot {
|
|
9
|
+
constructor(screenshotManager: any, browser: any, index: any);
|
|
10
|
+
/**
|
|
11
|
+
* @private
|
|
12
|
+
*/
|
|
13
|
+
private screenshotManager;
|
|
14
|
+
/**
|
|
15
|
+
* @private
|
|
16
|
+
*/
|
|
17
|
+
private browser;
|
|
18
|
+
/**
|
|
19
|
+
* @private
|
|
20
|
+
*/
|
|
21
|
+
private index;
|
|
22
|
+
/**
|
|
23
|
+
* Takes a screenshot and saves it using the screenshot manager.
|
|
24
|
+
*
|
|
25
|
+
* @async
|
|
26
|
+
* @example async commands.screenshot.take('my_startpage');
|
|
27
|
+
* @param {string} name The name to assign to the screenshot file.
|
|
28
|
+
* @throws {Error} Throws an error if the name parameter is not provided.
|
|
29
|
+
* @returns {Promise<Object>} A promise that resolves with the screenshot details.
|
|
30
|
+
*/
|
|
31
|
+
take(name: string): Promise<any>;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=screenshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screenshot.d.ts","sourceRoot":"","sources":["../../../../lib/core/engine/command/screenshot.js"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH;IACE,8DAaC;IAZC;;OAEG;IACH,0BAA0C;IAC1C;;OAEG;IACH,gBAAsB;IACtB;;OAEG;IACH,cAAkB;IAGpB;;;;;;;;OAQG;IAEH,WALW,MAAM,GAEJ,YAAe,CAa3B;CACF"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides functionality to control page scrolling in the browser.
|
|
3
|
+
*
|
|
4
|
+
* @class
|
|
5
|
+
* @hideconstructor
|
|
6
|
+
*/
|
|
7
|
+
export class Scroll {
|
|
8
|
+
constructor(browser: any, options: any);
|
|
9
|
+
/**
|
|
10
|
+
* @private
|
|
11
|
+
*/
|
|
12
|
+
private browser;
|
|
13
|
+
/**
|
|
14
|
+
* @private
|
|
15
|
+
*/
|
|
16
|
+
private options;
|
|
17
|
+
/**
|
|
18
|
+
* Scrolls the page by the specified number of pixels.
|
|
19
|
+
*
|
|
20
|
+
* @async
|
|
21
|
+
* @param {number} Xpixels - The number of pixels to scroll horizontally.
|
|
22
|
+
* @param {number} Ypixels - The number of pixels to scroll vertically.
|
|
23
|
+
* @returns {Promise<void>} A promise that resolves when the scrolling action is completed.
|
|
24
|
+
*/
|
|
25
|
+
byPixels(Xpixels: number, Ypixels: number): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Scrolls the page by the specified number of lines. This method is only supported in Firefox.
|
|
28
|
+
*
|
|
29
|
+
* @async
|
|
30
|
+
* @param {number} lines - The number of lines to scroll.
|
|
31
|
+
* @returns {Promise<void>} A promise that resolves when the scrolling action is completed.
|
|
32
|
+
* @throws {Error} Throws an error if not used in Firefox.
|
|
33
|
+
*/
|
|
34
|
+
byLines(lines: number): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Scrolls the page by the specified number of pages.
|
|
37
|
+
*
|
|
38
|
+
* @async
|
|
39
|
+
* @param {number} pages - The number of pages to scroll.
|
|
40
|
+
* @returns {Promise<void>} A promise that resolves when the scrolling action is completed.
|
|
41
|
+
*/
|
|
42
|
+
byPages(pages: number): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Scrolls to the bottom of the page, scrolling page by page with a delay between each scroll.
|
|
45
|
+
*
|
|
46
|
+
* @async
|
|
47
|
+
* @param {number} [delayTime=250] - The delay time in milliseconds between each scroll.
|
|
48
|
+
* @returns {Promise<void>} A promise that resolves when the scrolling to the bottom is completed.
|
|
49
|
+
*/
|
|
50
|
+
toBottom(delayTime?: number): Promise<void>;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=scroll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll.d.ts","sourceRoot":"","sources":["../../../../lib/core/engine/command/scroll.js"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH;IACE,wCASC;IARC;;OAEG;IACH,gBAAsB;IACtB;;OAEG;IACH,gBAAsB;IAGxB;;;;;;;OAOG;IACH,kBAJW,MAAM,WACN,MAAM,GACJ,QAAQ,IAAI,CAAC,CAKzB;IAED;;;;;;;OAOG;IACH,eAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAezB;IAED;;;;;;OAMG;IACH,eAHW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAYzB;IAED;;;;;;OAMG;IACH,qBAHW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAezB;CACF"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides functionality to interact with `<select>` elements on a web page.
|
|
3
|
+
*
|
|
4
|
+
* @class
|
|
5
|
+
* @hideconstructor
|
|
6
|
+
*/
|
|
7
|
+
export class Select {
|
|
8
|
+
constructor(browser: any);
|
|
9
|
+
/**
|
|
10
|
+
* @private
|
|
11
|
+
*/
|
|
12
|
+
private browser;
|
|
13
|
+
/**
|
|
14
|
+
* Selects an option in a `<select>` element by its ID and the value of the option.
|
|
15
|
+
*
|
|
16
|
+
* @async
|
|
17
|
+
* @param {string} selectId - The ID of the `<select>` element.
|
|
18
|
+
* @param {string} value - The value of the option to select.
|
|
19
|
+
* @returns {Promise<void>} A promise that resolves when the option is selected.
|
|
20
|
+
* @throws {Error} Throws an error if the `<select>` element is not found.
|
|
21
|
+
*/
|
|
22
|
+
selectByIdAndValue(selectId: string, value: string): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Selects an option in a `<select>` element by its name and the value of the option.
|
|
25
|
+
*
|
|
26
|
+
* @async
|
|
27
|
+
* @param {string} selectName - The name of the `<select>` element.
|
|
28
|
+
* @param {string} value - The value of the option to select.
|
|
29
|
+
* @returns {Promise<void>} A promise that resolves when the option is selected.
|
|
30
|
+
* @throws {Error} Throws an error if the `<select>` element is not found.
|
|
31
|
+
*/
|
|
32
|
+
selectByNameAndValue(selectName: string, value: string): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Selects an option in a `<select>` element by its ID and the index of the option.
|
|
35
|
+
*
|
|
36
|
+
* @async
|
|
37
|
+
* @param {string} selectId - The ID of the `<select>` element.
|
|
38
|
+
* @param {number} index - The index of the option to select.
|
|
39
|
+
* @returns {Promise<void>} A promise that resolves when the option is selected.
|
|
40
|
+
* @throws {Error} Throws an error if the `<select>` element is not found.
|
|
41
|
+
*/
|
|
42
|
+
selectByIdAndIndex(selectId: string, index: number): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Selects an option in a `<select>` element by its name and the index of the option.
|
|
45
|
+
*
|
|
46
|
+
* @async
|
|
47
|
+
* @param {string} selectName - The name of the `<select>` element.
|
|
48
|
+
* @param {number} index - The index of the option to select.
|
|
49
|
+
* @returns {Promise<void>} A promise that resolves when the option is selected.
|
|
50
|
+
* @throws {Error} Throws an error if the `<select>` element is not found.
|
|
51
|
+
*/
|
|
52
|
+
selectByNameAndIndex(selectName: string, index: number): Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* Deselects all options in a `<select>` element by its ID.
|
|
55
|
+
*
|
|
56
|
+
* @async
|
|
57
|
+
* @param {string} selectId - The ID of the `<select>` element.
|
|
58
|
+
* @returns {Promise<void>} A promise that resolves when all options are deselected.
|
|
59
|
+
* @throws {Error} Throws an error if the `<select>` element is not found.
|
|
60
|
+
*/
|
|
61
|
+
deselectById(selectId: string): Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
* Retrieves all option values in a `<select>` element by its ID.
|
|
64
|
+
*
|
|
65
|
+
* @async
|
|
66
|
+
* @param {string} selectId - The ID of the `<select>` element.
|
|
67
|
+
* @returns {Promise<string[]>} A promise that resolves with an array of the values of the options.
|
|
68
|
+
* @throws {Error} Throws an error if the `<select>` element is not found.
|
|
69
|
+
*/
|
|
70
|
+
getValuesById(selectId: string): Promise<string[]>;
|
|
71
|
+
/**
|
|
72
|
+
* Retrieves the value of the selected option in a `<select>` element by its ID.
|
|
73
|
+
*
|
|
74
|
+
* @async
|
|
75
|
+
* @param {string} selectId - The ID of the `<select>` element.
|
|
76
|
+
* @returns {Promise<string>} A promise that resolves with the value of the selected option.
|
|
77
|
+
* @throws {Error} Throws an error if the `<select>` element is not found.
|
|
78
|
+
*/
|
|
79
|
+
getSelectedValueById(selectId: string): Promise<string>;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../lib/core/engine/command/select.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH;IACE,0BAKC;IAJC;;OAEG;IACH,gBAAsB;IAGxB;;;;;;;;OAQG;IACH,6BALW,MAAM,SACN,MAAM,GACJ,QAAQ,IAAI,CAAC,CAYzB;IAED;;;;;;;;OAQG;IACH,iCALW,MAAM,SACN,MAAM,GACJ,QAAQ,IAAI,CAAC,CAczB;IAED;;;;;;;;OAQG;IACH,6BALW,MAAM,SACN,MAAM,GACJ,QAAQ,IAAI,CAAC,CAgBzB;IAED;;;;;;;;OAQG;IACH,iCALW,MAAM,SACN,MAAM,GACJ,QAAQ,IAAI,CAAC,CAgBzB;IAED;;;;;;;OAOG;IACH,uBAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAazB;IAED;;;;;;;OAOG;IACH,wBAJW,MAAM,GACJ,QAAQ,MAAM,EAAE,CAAC,CAoB7B;IAED;;;;;;;OAOG;IACH,+BAJW,MAAM,GACJ,QAAQ,MAAM,CAAC,CAa3B;CACF"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides functionality to set properties like innerHTML, innerText, and value on elements in a web page.
|
|
3
|
+
*
|
|
4
|
+
* @class
|
|
5
|
+
* @hideconstructor
|
|
6
|
+
*/
|
|
7
|
+
export class Set {
|
|
8
|
+
constructor(browser: any);
|
|
9
|
+
/**
|
|
10
|
+
* @private
|
|
11
|
+
*/
|
|
12
|
+
private browser;
|
|
13
|
+
/**
|
|
14
|
+
* Sets the innerHTML of an element using a CSS selector.
|
|
15
|
+
*
|
|
16
|
+
* @async
|
|
17
|
+
* @param {string} html - The HTML string to set as innerHTML.
|
|
18
|
+
* @param {string} selector - The CSS selector of the element.
|
|
19
|
+
* @returns {Promise<void>} A promise that resolves when the innerHTML is set.
|
|
20
|
+
* @throws {Error} Throws an error if the element is not found.
|
|
21
|
+
*/
|
|
22
|
+
innerHtml(html: string, selector: string): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Sets the innerHTML of an element using its ID.
|
|
25
|
+
*
|
|
26
|
+
* @async
|
|
27
|
+
* @param {string} html - The HTML string to set as innerHTML.
|
|
28
|
+
* @param {string} id - The ID of the element.
|
|
29
|
+
* @returns {Promise<void>} A promise that resolves when the innerHTML is set.
|
|
30
|
+
* @throws {Error} Throws an error if the element is not found.
|
|
31
|
+
*/
|
|
32
|
+
innerHtmlById(html: string, id: string): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Sets the innerText of an element using a CSS selector.
|
|
35
|
+
*
|
|
36
|
+
* @async
|
|
37
|
+
* @param {string} text - The text to set as innerText.
|
|
38
|
+
* @param {string} selector - The CSS selector of the element.
|
|
39
|
+
* @returns {Promise<void>} A promise that resolves when the innerText is set.
|
|
40
|
+
* @throws {Error} Throws an error if the element is not found.
|
|
41
|
+
*/
|
|
42
|
+
innerText(text: string, selector: string): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Sets the innerText of an element using its ID.
|
|
45
|
+
*
|
|
46
|
+
* @async
|
|
47
|
+
* @param {string} text - The text to set as innerText.
|
|
48
|
+
* @param {string} id - The ID of the element.
|
|
49
|
+
* @returns {Promise<void>} A promise that resolves when the innerText is set.
|
|
50
|
+
* @throws {Error} Throws an error if the element is not found.
|
|
51
|
+
*/
|
|
52
|
+
innerTextById(text: string, id: string): Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* Sets the value of an element using a CSS selector.
|
|
55
|
+
*
|
|
56
|
+
* @async
|
|
57
|
+
* @param {string} value - The value to set on the element.
|
|
58
|
+
* @param {string} selector - The CSS selector of the element.
|
|
59
|
+
* @returns {Promise<void>} A promise that resolves when the value is set.
|
|
60
|
+
* @throws {Error} Throws an error if the element is not found.
|
|
61
|
+
*/
|
|
62
|
+
value(value: string, selector: string): Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Sets the value of an element using its ID.
|
|
65
|
+
*
|
|
66
|
+
* @async
|
|
67
|
+
* @param {string} value - The value to set on the element.
|
|
68
|
+
* @param {string} id - The ID of the element.
|
|
69
|
+
* @returns {Promise<void>} A promise that resolves when the value is set.
|
|
70
|
+
* @throws {Error} Throws an error if the element is not found.
|
|
71
|
+
*/
|
|
72
|
+
valueById(value: string, id: string): Promise<void>;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=set.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set.d.ts","sourceRoot":"","sources":["../../../../lib/core/engine/command/set.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH;IACE,0BAKC;IAJC;;OAEG;IACH,gBAAsB;IAGxB;;;;;;;;OAQG;IACH,gBALW,MAAM,YACN,MAAM,GACJ,QAAQ,IAAI,CAAC,CAczB;IAED;;;;;;;;OAQG;IACH,oBALW,MAAM,MACN,MAAM,GACJ,QAAQ,IAAI,CAAC,CAYzB;IAED;;;;;;;;OAQG;IACH,gBALW,MAAM,YACN,MAAM,GACJ,QAAQ,IAAI,CAAC,CAczB;IAED;;;;;;;;OAQG;IACH,oBALW,MAAM,MACN,MAAM,GACJ,QAAQ,IAAI,CAAC,CAYzB;IAED;;;;;;;;OAQG;IACH,aALW,MAAM,YACN,MAAM,GACJ,QAAQ,IAAI,CAAC,CAYzB;IAED;;;;;;;;OAQG;IACH,iBALW,MAAM,MACN,MAAM,GACJ,QAAQ,IAAI,CAAC,CAYzB;CACF"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A stopwatch utility for measuring time intervals.
|
|
3
|
+
*
|
|
4
|
+
* @class
|
|
5
|
+
* @hideconstructor
|
|
6
|
+
*/
|
|
7
|
+
export class StopWatch {
|
|
8
|
+
constructor(name: any, measure: any);
|
|
9
|
+
/**
|
|
10
|
+
* @private
|
|
11
|
+
*/
|
|
12
|
+
private name;
|
|
13
|
+
/**
|
|
14
|
+
* @private
|
|
15
|
+
*/
|
|
16
|
+
private measure;
|
|
17
|
+
/**
|
|
18
|
+
* Starts the stopwatch.
|
|
19
|
+
*/
|
|
20
|
+
start(): void;
|
|
21
|
+
/**
|
|
22
|
+
* Stops the stopwatch and automatically adds the measured time to the
|
|
23
|
+
* last measured page. Logs an error if no page has been measured.
|
|
24
|
+
* @returns {number} The measured time in milliseconds.
|
|
25
|
+
*/
|
|
26
|
+
stopAndAdd(): number;
|
|
27
|
+
/**
|
|
28
|
+
* Stops the stopwatch.
|
|
29
|
+
* @returns {number} The measured time in milliseconds.
|
|
30
|
+
*/
|
|
31
|
+
stop(): number;
|
|
32
|
+
/**
|
|
33
|
+
* Gets the name of the stopwatch.
|
|
34
|
+
* @returns {string} The name of the stopwatch.
|
|
35
|
+
*/
|
|
36
|
+
getName(): string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @private
|
|
40
|
+
*/
|
|
41
|
+
export class Watch {
|
|
42
|
+
constructor(measure: any);
|
|
43
|
+
measure: any;
|
|
44
|
+
/**
|
|
45
|
+
* @private
|
|
46
|
+
*/
|
|
47
|
+
private get;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=stopWatch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stopWatch.d.ts","sourceRoot":"","sources":["../../../../lib/core/engine/command/stopWatch.js"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH;IACE,qCAaC;IAZC;;OAEG;IACH,aAAgB;IAChB;;OAEG;IACH,gBAAsB;IAOxB;;OAEG;IACH,cAEC;IAED;;;;OAIG;IACH,cAFa,MAAM,CAOlB;IAED;;;OAGG;IACH,QAFa,MAAM,CAMlB;IAED;;;OAGG;IACH,WAFa,MAAM,CAIlB;CACF;AAED;;GAEG;AACH;IACE,0BAEC;IADC,aAAsB;IAGxB;;OAEG;IACH,YAEC;CACF"}
|