browsertime 19.3.1 → 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 +36 -0
- package/README.md +9 -8
- 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 +151 -19
- 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/index.js +6 -2
- package/lib/core/engine/iteration.js +20 -102
- package/lib/firefox/geckoProfiler.js +49 -1
- package/lib/firefox/webdriver/builder.js +35 -12
- package/lib/firefox/webdriver/firefox.js +1 -1
- package/lib/support/cli.js +35 -15
- package/lib/support/engineUtils.js +13 -1
- package/lib/support/statistics.js +11 -1
- package/lib/support/userTiming.js +2 -2
- package/package.json +17 -8
- 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/CONTRIBUTING.md +0 -24
- 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/docs/examples/README.md +0 -9
- package/docs/examples/advance.md +0 -12
- package/docs/examples/android.md +0 -54
- package/docs/examples/basic.md +0 -36
- package/docs/examples/chrome.md +0 -28
- package/docs/examples/firefox.md +0 -10
- package/docs/issues.md +0 -18
- package/docs/new-style-script-objects.md +0 -38
- package/docs/sequence-diagrams/loadAndWait.wsd +0 -24
- package/docs/sequence-diagrams/run.wsd +0 -24
- 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,194 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A measurement tool for browser-based metrics, handling various aspects
|
|
3
|
+
* of metric collection including navigation, video recording, and data collection.
|
|
4
|
+
*
|
|
5
|
+
* @class
|
|
6
|
+
* @hideconstructor
|
|
7
|
+
*/
|
|
8
|
+
export class Measure {
|
|
9
|
+
constructor(browser: any, index: any, pageCompleteCheck: any, result: any, engineDelegate: any, extensionServer: any, storageManager: any, videos: any, scriptsByCategory: any, asyncScriptsByCategory: any, postURLScripts: any, context: any, screenshotManager: any, options: any);
|
|
10
|
+
/**
|
|
11
|
+
* @private
|
|
12
|
+
*/
|
|
13
|
+
private browser;
|
|
14
|
+
/**
|
|
15
|
+
* @private
|
|
16
|
+
*/
|
|
17
|
+
private pageCompleteCheck;
|
|
18
|
+
/**
|
|
19
|
+
* @private
|
|
20
|
+
*/
|
|
21
|
+
private index;
|
|
22
|
+
/**
|
|
23
|
+
* @private
|
|
24
|
+
*/
|
|
25
|
+
private result;
|
|
26
|
+
/**
|
|
27
|
+
* @private
|
|
28
|
+
*/
|
|
29
|
+
private engineDelegate;
|
|
30
|
+
/**
|
|
31
|
+
* @private
|
|
32
|
+
*/
|
|
33
|
+
private options;
|
|
34
|
+
/**
|
|
35
|
+
* @private
|
|
36
|
+
*/
|
|
37
|
+
private screenshotManager;
|
|
38
|
+
/**
|
|
39
|
+
* @private
|
|
40
|
+
*/
|
|
41
|
+
private storageManager;
|
|
42
|
+
/**
|
|
43
|
+
* @private
|
|
44
|
+
*/
|
|
45
|
+
private recordVideo;
|
|
46
|
+
/**
|
|
47
|
+
* @private
|
|
48
|
+
*/
|
|
49
|
+
private extensionServer;
|
|
50
|
+
/**
|
|
51
|
+
* @private
|
|
52
|
+
*/
|
|
53
|
+
private videos;
|
|
54
|
+
/**
|
|
55
|
+
* @private
|
|
56
|
+
*/
|
|
57
|
+
private scriptsByCategory;
|
|
58
|
+
/**
|
|
59
|
+
* @private
|
|
60
|
+
*/
|
|
61
|
+
private asyncScriptsByCategory;
|
|
62
|
+
/**
|
|
63
|
+
* @private
|
|
64
|
+
*/
|
|
65
|
+
private postURLScripts;
|
|
66
|
+
/**
|
|
67
|
+
* @private
|
|
68
|
+
*/
|
|
69
|
+
private context;
|
|
70
|
+
/**
|
|
71
|
+
* @private
|
|
72
|
+
*/
|
|
73
|
+
private numberOfMeasuredPages;
|
|
74
|
+
/**
|
|
75
|
+
* @private
|
|
76
|
+
*/
|
|
77
|
+
private numberOfVisitedPages;
|
|
78
|
+
/**
|
|
79
|
+
* @private
|
|
80
|
+
*/
|
|
81
|
+
private areWeMeasuring;
|
|
82
|
+
/**
|
|
83
|
+
* @private
|
|
84
|
+
*/
|
|
85
|
+
private testedURLs;
|
|
86
|
+
/**
|
|
87
|
+
* @private
|
|
88
|
+
*/
|
|
89
|
+
private tcpDump;
|
|
90
|
+
/**
|
|
91
|
+
* @private
|
|
92
|
+
*/
|
|
93
|
+
private ANDROID_DELAY_TIME;
|
|
94
|
+
/**
|
|
95
|
+
* @private
|
|
96
|
+
*/
|
|
97
|
+
private IOS_DELAY_TIME;
|
|
98
|
+
/**
|
|
99
|
+
* @private
|
|
100
|
+
*/
|
|
101
|
+
private DESKTOP_DELAY_TIME;
|
|
102
|
+
/**
|
|
103
|
+
* Have a consistent way of starting the video
|
|
104
|
+
* @private
|
|
105
|
+
*/
|
|
106
|
+
private _startVideo;
|
|
107
|
+
video: Video;
|
|
108
|
+
/**
|
|
109
|
+
* Have a consistent way of starting stopping the video
|
|
110
|
+
* @private
|
|
111
|
+
*/
|
|
112
|
+
private _stopVideo;
|
|
113
|
+
/**
|
|
114
|
+
* Have a consistent way of adding an error
|
|
115
|
+
* @private
|
|
116
|
+
*/
|
|
117
|
+
private _error;
|
|
118
|
+
/**
|
|
119
|
+
* Have a consistent way of adding an failure
|
|
120
|
+
* @private
|
|
121
|
+
*/
|
|
122
|
+
private _failure;
|
|
123
|
+
/**
|
|
124
|
+
* Navigates to a specified URL and handles additional setup for the first page visit.
|
|
125
|
+
*
|
|
126
|
+
* This function is responsible for setting up the browser with necessary configurations and
|
|
127
|
+
* navigating to the URL. It also waits for the page
|
|
128
|
+
* to load completely based on configured page completion check.
|
|
129
|
+
*
|
|
130
|
+
* @async
|
|
131
|
+
* @private
|
|
132
|
+
* @param {string} url - The URL to navigate to.
|
|
133
|
+
* @throws {Error} Throws an error if navigation or setup fails.
|
|
134
|
+
* @returns {Promise<void>} A promise that resolves when the navigation and setup are complete.
|
|
135
|
+
*/
|
|
136
|
+
private _navigate;
|
|
137
|
+
/**
|
|
138
|
+
* Starts the measurement process for a given URL or an alias.
|
|
139
|
+
*
|
|
140
|
+
* It supports starting measurements by either directly providing a URL or using an alias.
|
|
141
|
+
* If a URL is provided, it navigates to that URL and performs the measurement.
|
|
142
|
+
* If an alias is provided, or no URL is available, it sets up the environment for a user-driven navigation.
|
|
143
|
+
*
|
|
144
|
+
* @async
|
|
145
|
+
* @example
|
|
146
|
+
* await commands.measure.start('https://www.example.org');
|
|
147
|
+
* // Or start the measurement and click on a link
|
|
148
|
+
* await commands.measure.start();
|
|
149
|
+
* await commands.click.byLinkTextAndWait('Documentation');
|
|
150
|
+
* // Remember to stop the measurements if you do not provide a URL
|
|
151
|
+
* await commands.measure.stop();
|
|
152
|
+
* @param {string} urlOrAlias - The URL to navigate to, or an alias representing the test.
|
|
153
|
+
* @param {string} [optionalAlias] - An optional alias that can be used if the first parameter is a URL.
|
|
154
|
+
* @throws {Error} Throws an error if navigation fails or if there are issues in the setup process.
|
|
155
|
+
* @returns {Promise<void>} A promise that resolves when the start process is complete, or rejects if there are errors.
|
|
156
|
+
*/
|
|
157
|
+
start(urlOrAlias: string, optionalAlias?: string): Promise<void>;
|
|
158
|
+
/**
|
|
159
|
+
* Stops the measurement process, collects metrics, and handles any post-measurement tasks.
|
|
160
|
+
* It finalizes the URL being tested, manages any URL-specific metadata, stops any ongoing video recordings,
|
|
161
|
+
* and initiates the data collection process.
|
|
162
|
+
*
|
|
163
|
+
* @async
|
|
164
|
+
* @param {string} testedStartUrl - The URL that was initially tested. If not provided, it will be obtained from the browser.
|
|
165
|
+
* @throws {Error} Throws an error if there are issues in stopping the measurement or collecting data.
|
|
166
|
+
* @returns {Promise} A promise that resolves with the collected metrics data.
|
|
167
|
+
*/
|
|
168
|
+
stop(testedStartUrl: string): Promise<any>;
|
|
169
|
+
/**
|
|
170
|
+
* Adds a custom metric to the current measurement result.
|
|
171
|
+
* This method should be called after a measurement has started and before it has stopped.
|
|
172
|
+
*
|
|
173
|
+
* @param {string} name - The name of the metric.
|
|
174
|
+
* @param {*} value - The value of the metric.
|
|
175
|
+
* @throws {Error} Throws an error if called before a measurement cycle has started.
|
|
176
|
+
*/
|
|
177
|
+
add(name: string, value: any): void;
|
|
178
|
+
/**
|
|
179
|
+
* Adds multiple custom metrics to the current measurement result.
|
|
180
|
+
* This method accepts an object containing multiple key-value pairs representing different metrics.
|
|
181
|
+
* Similar to `add`, it should be used within an active measurement cycle.
|
|
182
|
+
*
|
|
183
|
+
* @param {Object} object - An object containing key-value pairs of metrics to add.
|
|
184
|
+
* @throws {Error} Throws an error if called before a measurement cycle has started.
|
|
185
|
+
*/
|
|
186
|
+
addObject(object: any): void;
|
|
187
|
+
/**
|
|
188
|
+
*
|
|
189
|
+
* @private
|
|
190
|
+
*/
|
|
191
|
+
private collect;
|
|
192
|
+
}
|
|
193
|
+
import { Video } from '../../../video/video.js';
|
|
194
|
+
//# sourceMappingURL=measure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"measure.d.ts","sourceRoot":"","sources":["../../../../lib/core/engine/command/measure.js"],"names":[],"mappings":"AA6BA;;;;;;GAMG;AACH;IACE,sRA4GC;IA5FC;;OAEG;IACH,gBAAsB;IACtB;;OAEG;IACH,0BAA0C;IAC1C;;OAEG;IACH,cAAkB;IAClB;;OAEG;IACH,eAAoB;IACpB;;OAEG;IACH,uBAAoC;IACpC;;OAEG;IACH,gBAAsB;IACtB;;OAEG;IACH,0BAA0C;IAC1C;;OAEG;IACH,uBAAoC;IACpC;;OAEG;IACH,oBAAyD;IACzD;;OAEG;IACH,wBAAsC;IACtC;;OAEG;IACH,eAAoB;IACpB;;OAEG;IACH,0BAA0C;IAC1C;;OAEG;IACH,+BAAoD;IACpD;;OAEG;IACH,uBAAoC;IACpC;;OAEG;IACH,gBAAsB;IACtB;;OAEG;IACH,8BAA8B;IAC9B;;OAEG;IACH,6BAA6B;IAC7B;;OAEG;IACH,uBAA2B;IAC3B;;OAEG;IACH,mBAAoB;IACpB;;OAEG;IACH,gBAA6D;IAC7D;;OAEG;IACH,2BAAsE;IACtE;;OAEG;IACH,uBAA8D;IAC9D;;OAEG;IACH,2BAAqE;IAGvE;;;OAGG;IACH,oBAsBC;IArBC,aAAuE;IAuBzE;;;OAGG;IACH,mBAKC;IAED;;;OAGG;IACH,eAsBC;IAED;;;OAGG;IACH,iBAQC;IAED;;;;;;;;;;;;OAYG;IACH,kBAuBC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,kBALW,MAAM,kBACN,MAAM,GAEJ,QAAQ,IAAI,CAAC,CAwFzB;IAED;;;;;;;;;OASG;IACH,qBAJW,MAAM,gBAkEhB;IAED;;;;;;;OAOG;IACH,UAJW,MAAM,oBAYhB;IAED;;;;;;;OAOG;IACH,6BAOC;IAED;;;OAGG;IACH,gBA+KC;CACF;sBAlpBqB,yBAAyB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Add meta data to your user journey.
|
|
3
|
+
*
|
|
4
|
+
* @class
|
|
5
|
+
* @hideconstructor
|
|
6
|
+
*/
|
|
7
|
+
export class Meta {
|
|
8
|
+
/**
|
|
9
|
+
* Sets the description for the user journey.
|
|
10
|
+
* @example commands.meta.setDescription('My test');
|
|
11
|
+
* @param {string} text - The text to set as the description.
|
|
12
|
+
*/
|
|
13
|
+
setDescription(text: string): void;
|
|
14
|
+
description: string;
|
|
15
|
+
/**
|
|
16
|
+
* Sets the title for the user journey.
|
|
17
|
+
* @example commands.meta.setTitle('Test title');
|
|
18
|
+
* @param {string} text - The text to set as the title.
|
|
19
|
+
*/
|
|
20
|
+
setTitle(text: string): void;
|
|
21
|
+
title: string;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../../lib/core/engine/command/meta.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH;IAGE;;;;OAIG;IACH,qBAFW,MAAM,QAIhB;IADC,oBAAuB;IAGzB;;;;OAIG;IACH,eAFW,MAAM,QAIhB;IADC,cAAiB;CAEpB"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides functionality to click and hold elements on a web page using different strategies.
|
|
3
|
+
*
|
|
4
|
+
* @class
|
|
5
|
+
* @hideconstructor
|
|
6
|
+
*/
|
|
7
|
+
export class ClickAndHold {
|
|
8
|
+
constructor(browser: any);
|
|
9
|
+
/**
|
|
10
|
+
* @private
|
|
11
|
+
*/
|
|
12
|
+
private driver;
|
|
13
|
+
/**
|
|
14
|
+
* @private
|
|
15
|
+
*/
|
|
16
|
+
private actions;
|
|
17
|
+
/**
|
|
18
|
+
* Clicks and holds on an element that matches a given XPath selector.
|
|
19
|
+
*
|
|
20
|
+
* @async
|
|
21
|
+
* @param {string} xpath - The XPath selector of the element to interact with.
|
|
22
|
+
* @returns {Promise<void>} A promise that resolves when the action is performed.
|
|
23
|
+
* @throws {Error} Throws an error if the element is not found.
|
|
24
|
+
*/
|
|
25
|
+
byXpath(xpath: string): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Clicks and holds on an element that matches a given CSS selector.
|
|
28
|
+
*
|
|
29
|
+
* @async
|
|
30
|
+
* @param {string} selector - The CSS selector of the element to interact with.
|
|
31
|
+
* @returns {Promise<void>} A promise that resolves when the action is performed.
|
|
32
|
+
* @throws {Error} Throws an error if the element is not found.
|
|
33
|
+
*/
|
|
34
|
+
bySelector(selector: string): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Clicks and holds at the current cursor position.
|
|
37
|
+
*
|
|
38
|
+
* @async
|
|
39
|
+
* @returns {Promise<void>} A promise that resolves when the action is performed.
|
|
40
|
+
* @throws {Error} Throws an error if the action cannot be performed.
|
|
41
|
+
*/
|
|
42
|
+
atCursor(): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Clicks and holds at the specified screen coordinates.
|
|
45
|
+
*
|
|
46
|
+
* @async
|
|
47
|
+
* @param {number} xPos - The x-coordinate on the screen.
|
|
48
|
+
* @param {number} yPos - The y-coordinate on the screen.
|
|
49
|
+
* @returns {Promise<void>} A promise that resolves when the action is performed.
|
|
50
|
+
* @throws {Error} Throws an error if the action cannot be performed.
|
|
51
|
+
*/
|
|
52
|
+
atPosition(xPos: number, yPos: number): Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* Releases the mouse button on an element matching the specified XPath.
|
|
55
|
+
*
|
|
56
|
+
* @async
|
|
57
|
+
* @param {string} xpath - The XPath selector of the element to release the mouse on.
|
|
58
|
+
* @returns {Promise<void>} A promise that resolves when the action is performed.
|
|
59
|
+
* @throws {Error} Throws an error if the action cannot be performed.
|
|
60
|
+
*/
|
|
61
|
+
releaseAtXpath(xpath: string): Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
* Releases the mouse button on an element matching the specified CSS selector.
|
|
64
|
+
*
|
|
65
|
+
* @async
|
|
66
|
+
* @param {string} selector - The CSS selector of the element to release the mouse on.
|
|
67
|
+
* @returns {Promise<void>} A promise that resolves when the action is performed.
|
|
68
|
+
* @throws {Error} Throws an error if the action cannot be performed.
|
|
69
|
+
*/
|
|
70
|
+
releaseAtSelector(selector: string): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* Releases the mouse button at the specified screen coordinates.
|
|
73
|
+
*
|
|
74
|
+
* @async
|
|
75
|
+
* @param {number} xPos - The x-coordinate on the screen.
|
|
76
|
+
* @param {number} yPos - The y-coordinate on the screen.
|
|
77
|
+
* @returns {Promise<void>} A promise that resolves when the action is performed.
|
|
78
|
+
* @throws {Error} Throws an error if the action cannot be performed.
|
|
79
|
+
*/
|
|
80
|
+
releaseAtPosition(xPos: number, yPos: number): Promise<void>;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=clickAndHold.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clickAndHold.d.ts","sourceRoot":"","sources":["../../../../../lib/core/engine/command/mouse/clickAndHold.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,CAczB;IAED;;;;;;;OAOG;IACH,qBAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAiBzB;IAED;;;;;;OAMG;IACH,YAHa,QAAQ,IAAI,CAAC,CAWzB;IAED;;;;;;;;OAQG;IACH,iBALW,MAAM,QACN,MAAM,GACJ,QAAQ,IAAI,CAAC,CAgBzB;IAED;;;;;;;OAOG;IACH,sBAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAYzB;IAED;;;;;;;OAOG;IACH,4BAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAYzB;IAED;;;;;;;;OAQG;IACH,wBALW,MAAM,QACN,MAAM,GACJ,QAAQ,IAAI,CAAC,CAgBzB;CACF"}
|
|
@@ -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"}
|