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.
Files changed (211) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +2 -2
  3. package/bin/browsertime.js +9 -3
  4. package/browserscripts/pageinfo/interactionToNextPaintInfo.js +170 -143
  5. package/browserscripts/timings/interactionToNextPaint.js +49 -137
  6. package/lib/chrome/webdriver/setupChromiumOptions.js +0 -9
  7. package/lib/core/engine/collector.js +11 -0
  8. package/lib/core/engine/command/actions.js +52 -0
  9. package/lib/core/engine/command/addText.js +48 -30
  10. package/lib/core/engine/command/android.js +43 -4
  11. package/lib/core/engine/command/cache.js +39 -2
  12. package/lib/core/engine/command/chromeDevToolsProtocol.js +51 -1
  13. package/lib/core/engine/command/chromeTrace.js +34 -0
  14. package/lib/core/engine/command/click.js +102 -52
  15. package/lib/core/engine/command/debug.js +19 -2
  16. package/lib/core/engine/command/element.js +66 -0
  17. package/lib/core/engine/command/geckoProfiler.js +41 -1
  18. package/lib/core/engine/command/javaScript.js +43 -20
  19. package/lib/core/engine/command/measure.js +147 -15
  20. package/lib/core/engine/command/meta.js +17 -0
  21. package/lib/core/engine/command/mouse/clickAndHold.js +56 -29
  22. package/lib/core/engine/command/mouse/contextClick.js +30 -11
  23. package/lib/core/engine/command/mouse/doubleClick.js +35 -11
  24. package/lib/core/engine/command/mouse/mouseMove.js +38 -16
  25. package/lib/core/engine/command/mouse/singleClick.js +187 -12
  26. package/lib/core/engine/command/navigation.js +31 -3
  27. package/lib/core/engine/command/screenshot.js +33 -0
  28. package/lib/core/engine/command/scroll.js +35 -13
  29. package/lib/core/engine/command/select.js +55 -36
  30. package/lib/core/engine/command/set.js +51 -36
  31. package/lib/core/engine/command/stopWatch.js +30 -9
  32. package/lib/core/engine/command/switch.js +49 -11
  33. package/lib/core/engine/command/wait.js +50 -25
  34. package/lib/core/engine/commands.js +267 -0
  35. package/lib/core/engine/context.js +81 -0
  36. package/lib/core/engine/iteration.js +20 -102
  37. package/lib/firefox/geckoProfiler.js +49 -1
  38. package/lib/firefox/webdriver/builder.js +4 -9
  39. package/lib/firefox/webdriver/firefox.js +1 -1
  40. package/lib/support/cli.js +7 -0
  41. package/lib/support/statistics.js +11 -1
  42. package/package.json +17 -7
  43. package/types/android/index.d.ts +70 -0
  44. package/types/android/index.d.ts.map +1 -0
  45. package/types/chrome/parseCpuTrace.d.ts +21 -0
  46. package/types/chrome/parseCpuTrace.d.ts.map +1 -0
  47. package/types/chrome/traceCategoriesParser.d.ts +2 -0
  48. package/types/chrome/traceCategoriesParser.d.ts.map +1 -0
  49. package/types/chrome/webdriver/traceUtilities.d.ts +8 -0
  50. package/types/chrome/webdriver/traceUtilities.d.ts.map +1 -0
  51. package/types/core/engine/command/action.d.ts +73 -0
  52. package/types/core/engine/command/action.d.ts.map +1 -0
  53. package/types/core/engine/command/actions.d.ts +38 -0
  54. package/types/core/engine/command/actions.d.ts.map +1 -0
  55. package/types/core/engine/command/addText.d.ts +68 -0
  56. package/types/core/engine/command/addText.d.ts.map +1 -0
  57. package/types/core/engine/command/android.d.ts +39 -0
  58. package/types/core/engine/command/android.d.ts.map +1 -0
  59. package/types/core/engine/command/cache.d.ts +53 -0
  60. package/types/core/engine/command/cache.d.ts.map +1 -0
  61. package/types/core/engine/command/chromeDevToolsProtocol.d.ts +61 -0
  62. package/types/core/engine/command/chromeDevToolsProtocol.d.ts.map +1 -0
  63. package/types/core/engine/command/chromeTrace.d.ts +45 -0
  64. package/types/core/engine/command/chromeTrace.d.ts.map +1 -0
  65. package/types/core/engine/command/click.d.ts +151 -0
  66. package/types/core/engine/command/click.d.ts.map +1 -0
  67. package/types/core/engine/command/debug.d.ts +28 -0
  68. package/types/core/engine/command/debug.d.ts.map +1 -0
  69. package/types/core/engine/command/element.d.ts +49 -0
  70. package/types/core/engine/command/element.d.ts.map +1 -0
  71. package/types/core/engine/command/geckoProfiler.d.ts +46 -0
  72. package/types/core/engine/command/geckoProfiler.d.ts.map +1 -0
  73. package/types/core/engine/command/javaScript.d.ts +63 -0
  74. package/types/core/engine/command/javaScript.d.ts.map +1 -0
  75. package/types/core/engine/command/measure.d.ts +194 -0
  76. package/types/core/engine/command/measure.d.ts.map +1 -0
  77. package/types/core/engine/command/meta.d.ts +23 -0
  78. package/types/core/engine/command/meta.d.ts.map +1 -0
  79. package/types/core/engine/command/mouse/clickAndHold.d.ts +82 -0
  80. package/types/core/engine/command/mouse/clickAndHold.d.ts.map +1 -0
  81. package/types/core/engine/command/mouse/contextClick.d.ts +44 -0
  82. package/types/core/engine/command/mouse/contextClick.d.ts.map +1 -0
  83. package/types/core/engine/command/mouse/doubleClick.d.ts +51 -0
  84. package/types/core/engine/command/mouse/doubleClick.d.ts.map +1 -0
  85. package/types/core/engine/command/mouse/index.d.ts +6 -0
  86. package/types/core/engine/command/mouse/index.d.ts.map +1 -0
  87. package/types/core/engine/command/mouse/mouseMove.d.ts +56 -0
  88. package/types/core/engine/command/mouse/mouseMove.d.ts.map +1 -0
  89. package/types/core/engine/command/mouse/singleClick.d.ts +115 -0
  90. package/types/core/engine/command/mouse/singleClick.d.ts.map +1 -0
  91. package/types/core/engine/command/navigation.d.ts +45 -0
  92. package/types/core/engine/command/navigation.d.ts.map +1 -0
  93. package/types/core/engine/command/screenshot.d.ts +33 -0
  94. package/types/core/engine/command/screenshot.d.ts.map +1 -0
  95. package/types/core/engine/command/scroll.d.ts +52 -0
  96. package/types/core/engine/command/scroll.d.ts.map +1 -0
  97. package/types/core/engine/command/select.d.ts +81 -0
  98. package/types/core/engine/command/select.d.ts.map +1 -0
  99. package/types/core/engine/command/set.d.ts +74 -0
  100. package/types/core/engine/command/set.d.ts.map +1 -0
  101. package/types/core/engine/command/stopWatch.d.ts +49 -0
  102. package/types/core/engine/command/stopWatch.d.ts.map +1 -0
  103. package/types/core/engine/command/switch.d.ts +77 -0
  104. package/types/core/engine/command/switch.d.ts.map +1 -0
  105. package/types/core/engine/command/util/lcpHighlightScript.d.ts +2 -0
  106. package/types/core/engine/command/util/lcpHighlightScript.d.ts.map +1 -0
  107. package/types/core/engine/command/util/lsHighlightScript.d.ts +2 -0
  108. package/types/core/engine/command/util/lsHighlightScript.d.ts.map +1 -0
  109. package/types/core/engine/command/wait.d.ts +74 -0
  110. package/types/core/engine/command/wait.d.ts.map +1 -0
  111. package/types/core/engine/commands.d.ts +161 -0
  112. package/types/core/engine/commands.d.ts.map +1 -0
  113. package/types/core/engine/context.d.ts +87 -0
  114. package/types/core/engine/context.d.ts.map +1 -0
  115. package/types/firefox/geckoProfiler.d.ts +11 -0
  116. package/types/firefox/geckoProfiler.d.ts.map +1 -0
  117. package/types/firefox/settings/geckoProfilerDefaults.d.ts +8 -0
  118. package/types/firefox/settings/geckoProfilerDefaults.d.ts.map +1 -0
  119. package/types/scripting.d.ts +2 -0
  120. package/types/support/engineUtils.d.ts +5 -0
  121. package/types/support/engineUtils.d.ts.map +1 -0
  122. package/types/support/errors.d.ts +15 -0
  123. package/types/support/errors.d.ts.map +1 -0
  124. package/types/support/fileUtil.d.ts +10 -0
  125. package/types/support/fileUtil.d.ts.map +1 -0
  126. package/types/support/filters.d.ts +7 -0
  127. package/types/support/filters.d.ts.map +1 -0
  128. package/types/support/getViewPort.d.ts +2 -0
  129. package/types/support/getViewPort.d.ts.map +1 -0
  130. package/types/support/pathToFolder.d.ts +2 -0
  131. package/types/support/pathToFolder.d.ts.map +1 -0
  132. package/types/support/storageManager.d.ts +17 -0
  133. package/types/support/storageManager.d.ts.map +1 -0
  134. package/types/support/tcpdump.d.ts +10 -0
  135. package/types/support/tcpdump.d.ts.map +1 -0
  136. package/types/support/userTiming.d.ts +2 -0
  137. package/types/support/userTiming.d.ts.map +1 -0
  138. package/types/support/util.d.ts +6 -0
  139. package/types/support/util.d.ts.map +1 -0
  140. package/types/video/defaults.d.ts +7 -0
  141. package/types/video/defaults.d.ts.map +1 -0
  142. package/types/video/postprocessing/finetune/addTextToVideo.d.ts +2 -0
  143. package/types/video/postprocessing/finetune/addTextToVideo.d.ts.map +1 -0
  144. package/types/video/postprocessing/finetune/convertFps.d.ts +2 -0
  145. package/types/video/postprocessing/finetune/convertFps.d.ts.map +1 -0
  146. package/types/video/postprocessing/finetune/getFont.d.ts +2 -0
  147. package/types/video/postprocessing/finetune/getFont.d.ts.map +1 -0
  148. package/types/video/postprocessing/finetune/getTimingMetrics.d.ts +2 -0
  149. package/types/video/postprocessing/finetune/getTimingMetrics.d.ts.map +1 -0
  150. package/types/video/postprocessing/finetune/index.d.ts +2 -0
  151. package/types/video/postprocessing/finetune/index.d.ts.map +1 -0
  152. package/types/video/postprocessing/finetune/removeOrange.d.ts +2 -0
  153. package/types/video/postprocessing/finetune/removeOrange.d.ts.map +1 -0
  154. package/types/video/postprocessing/visualmetrics/extraMetrics.d.ts +5 -0
  155. package/types/video/postprocessing/visualmetrics/extraMetrics.d.ts.map +1 -0
  156. package/types/video/postprocessing/visualmetrics/getVideoMetrics.d.ts +5 -0
  157. package/types/video/postprocessing/visualmetrics/getVideoMetrics.d.ts.map +1 -0
  158. package/types/video/postprocessing/visualmetrics/visualMetrics.d.ts +3 -0
  159. package/types/video/postprocessing/visualmetrics/visualMetrics.d.ts.map +1 -0
  160. package/types/video/screenRecording/android/recorder.d.ts +11 -0
  161. package/types/video/screenRecording/android/recorder.d.ts.map +1 -0
  162. package/types/video/screenRecording/desktop/convert.d.ts +2 -0
  163. package/types/video/screenRecording/desktop/convert.d.ts.map +1 -0
  164. package/types/video/screenRecording/desktop/desktopRecorder.d.ts +28 -0
  165. package/types/video/screenRecording/desktop/desktopRecorder.d.ts.map +1 -0
  166. package/types/video/screenRecording/desktop/ffmpegRecorder.d.ts +17 -0
  167. package/types/video/screenRecording/desktop/ffmpegRecorder.d.ts.map +1 -0
  168. package/types/video/screenRecording/desktop/osx/getSPDisplaysDataType.d.ts +2 -0
  169. package/types/video/screenRecording/desktop/osx/getSPDisplaysDataType.d.ts.map +1 -0
  170. package/types/video/screenRecording/desktop/osx/getScreen.d.ts +2 -0
  171. package/types/video/screenRecording/desktop/osx/getScreen.d.ts.map +1 -0
  172. package/types/video/screenRecording/firefox/firefoxWindowRecorder.d.ts +13 -0
  173. package/types/video/screenRecording/firefox/firefoxWindowRecorder.d.ts.map +1 -0
  174. package/types/video/screenRecording/ios/convertToMp4.d.ts +2 -0
  175. package/types/video/screenRecording/ios/convertToMp4.d.ts.map +1 -0
  176. package/types/video/screenRecording/ios/iosRecorder.d.ts +14 -0
  177. package/types/video/screenRecording/ios/iosRecorder.d.ts.map +1 -0
  178. package/types/video/screenRecording/iosSimulator/convertToMp4.d.ts +2 -0
  179. package/types/video/screenRecording/iosSimulator/convertToMp4.d.ts.map +1 -0
  180. package/types/video/screenRecording/iosSimulator/recorder.d.ts +9 -0
  181. package/types/video/screenRecording/iosSimulator/recorder.d.ts.map +1 -0
  182. package/types/video/screenRecording/recorder.d.ts +7 -0
  183. package/types/video/screenRecording/recorder.d.ts.map +1 -0
  184. package/types/video/screenRecording/setOrangeBackground.d.ts +2 -0
  185. package/types/video/screenRecording/setOrangeBackground.d.ts.map +1 -0
  186. package/types/video/video.d.ts +41 -0
  187. package/types/video/video.d.ts.map +1 -0
  188. package/browsersupport/firefox-profile/cert9.db +0 -0
  189. package/browsersupport/firefox-profile/chrome/userChrome.css +0 -4
  190. package/browsersupport/firefox-profile/key4.db +0 -0
  191. package/vendor/mac/x86/qvh +0 -0
  192. package/visualmetrics/__init__.py +0 -1
  193. package/visualmetrics/test_data/ms_000000.png +0 -0
  194. package/visualmetrics/test_data/ms_000920.png +0 -0
  195. package/visualmetrics/test_data/ms_001000.png +0 -0
  196. package/visualmetrics/test_data/ms_001080.png +0 -0
  197. package/visualmetrics/test_data/ms_001200.png +0 -0
  198. package/visualmetrics/test_data/ms_001240.png +0 -0
  199. package/visualmetrics/test_data/ms_001280.png +0 -0
  200. package/visualmetrics/test_data/ms_001360.png +0 -0
  201. package/visualmetrics/test_data/ms_001400.png +0 -0
  202. package/visualmetrics/test_data/ms_001520.png +0 -0
  203. package/visualmetrics/test_data/ms_002040.png +0 -0
  204. package/visualmetrics/test_data/ms_002600.png +0 -0
  205. package/visualmetrics/test_data/ms_003160.png +0 -0
  206. package/visualmetrics/test_data/ms_003720.png +0 -0
  207. package/visualmetrics/test_data/ms_004280.png +0 -0
  208. package/visualmetrics/test_data/ms_004880.png +0 -0
  209. package/visualmetrics/test_data/ms_005440.png +0 -0
  210. package/visualmetrics/test_data/ms_006000.png +0 -0
  211. package/visualmetrics/test_visualmetrics.py +0 -34
@@ -0,0 +1,151 @@
1
+ /**
2
+ * Provides functionality to perform click actions on elements in a web page using various selectors.
3
+ *
4
+ * @class
5
+ * @hideconstructor
6
+ */
7
+ export class Click {
8
+ constructor(browser: any, pageCompleteCheck: any);
9
+ /**
10
+ * @private
11
+ */
12
+ private browser;
13
+ /**
14
+ * @private
15
+ */
16
+ private pageCompleteCheck;
17
+ /**
18
+ * Clicks on an element identified by its class name.
19
+ *
20
+ * @async
21
+ * @param {string} className - The class name of the element to click.
22
+ * @returns {Promise<void>} A promise that resolves when the click action is performed.
23
+ * @throws {Error} Throws an error if the element is not found.
24
+ */
25
+ byClassName(className: string): Promise<void>;
26
+ /**
27
+ * Clicks on an element identified by its class name and waits for the page complete check to finish.
28
+ *
29
+ * @async
30
+ * @param {string} className - The class name of the element to click.
31
+ * @returns {Promise<void>} A promise that resolves when the click action and page complete check are finished.
32
+ * @throws {Error} Throws an error if the element is not found.
33
+ */
34
+ byClassNameAndWait(className: string): Promise<void>;
35
+ /**
36
+ * Clicks on a link whose visible text matches the given string.
37
+ *
38
+ * @async
39
+ * @param {string} text - The visible text of the link to click.
40
+ * @returns {Promise<void>} A promise that resolves when the click action is performed.
41
+ * @throws {Error} Throws an error if the link is not found.
42
+ */
43
+ byLinkText(text: string): Promise<void>;
44
+ /**
45
+ * Clicks on a link whose visible text matches the given string and waits for the page complete check to finish.
46
+ *
47
+ * @async
48
+ * @param {string} text - The visible text of the link to click.
49
+ * @returns {Promise<void>} A promise that resolves when the click action and page complete check are finished.
50
+ * @throws {Error} Throws an error if the link is not found.
51
+ */
52
+ byLinkTextAndWait(text: string): Promise<void>;
53
+ /**
54
+ * Clicks on a link whose visible text contains the given substring.
55
+ *
56
+ * @async
57
+ * @param {string} text - The substring of the visible text of the link to click.
58
+ * @returns {Promise<void>} A promise that resolves when the click action is performed.
59
+ * @throws {Error} Throws an error if the link is not found.
60
+ */
61
+ byPartialLinkText(text: string): Promise<void>;
62
+ /**
63
+ * Clicks on a link whose visible text contains the given substring and waits for the page complete check to finish.
64
+ *
65
+ * @async
66
+ * @param {string} text - The substring of the visible text of the link to click.
67
+ * @returns {Promise<void>} A promise that resolves when the click action and page complete check are finished.
68
+ * @throws {Error} Throws an error if the link is not found.
69
+ */
70
+ byPartialLinkTextAndWait(text: string): Promise<void>;
71
+ /**
72
+ * Clicks on an element that matches a given XPath selector.
73
+ *
74
+ * @async
75
+ * @param {string} xpath - The XPath selector of the element to click.
76
+ * @returns {Promise<void>} A promise that resolves when the click action is performed.
77
+ * @throws {Error} Throws an error if the element is not found.
78
+ */
79
+ byXpath(xpath: string): Promise<void>;
80
+ /**
81
+ * Clicks on an element that matches a given XPath selector and waits for the page complete check to finish.
82
+ *
83
+ * @async
84
+ * @param {string} xpath - The XPath selector of the element to click.
85
+ * @returns {Promise<void>} A promise that resolves when the click action and page complete check are finished.
86
+ * @throws {Error} Throws an error if the element is not found.
87
+ */
88
+ byXpathAndWait(xpath: string): Promise<void>;
89
+ /**
90
+ * Clicks on an element located by evaluating a JavaScript expression.
91
+ *
92
+ * @async
93
+ * @param {string} js - The JavaScript expression that evaluates to an element or list of elements.
94
+ * @returns {Promise<void>} A promise that resolves when the click action is performed.
95
+ * @throws {Error} Throws an error if the element is not found.
96
+ */
97
+ byJs(js: string): Promise<void>;
98
+ /**
99
+ * Clicks on an element located by evaluating a JavaScript expression and waits for the page complete check to finish.
100
+ *
101
+ * @async
102
+ * @param {string} js - The JavaScript expression that evaluates to an element or list of elements.
103
+ * @returns {Promise<void>} A promise that resolves when the click action and page complete check are finished.
104
+ * @throws {Error} Throws an error if the element is not found.
105
+ */
106
+ byJsAndWait(js: string): Promise<void>;
107
+ /**
108
+ * Clicks on an element located by its ID.
109
+ *
110
+ * @async
111
+ * @param {string} id - The ID of the element to click.
112
+ * @returns {Promise<void>} A promise that resolves when the click action is performed.
113
+ * @throws {Error} Throws an error if the element is not found.
114
+ */
115
+ byId(id: string): Promise<void>;
116
+ /**
117
+ * Clicks on an element located by its name attribute.
118
+ *
119
+ * @async
120
+ * @param {string} name - The name attribute of the element to click.
121
+ * @returns {Promise<void>} A promise that resolves when the click action is performed.
122
+ * @throws {Error} Throws an error if the element is not found.
123
+ */
124
+ byName(name: string): Promise<void>;
125
+ /**
126
+ * Click on link located by the ID attribute. Uses document.getElementById() to find the element. And wait for page complete check to finish.
127
+ * @param {string} id
128
+ * @returns {Promise<void>} Promise object represents when the element has been clicked and the pageCompleteCheck has finished.
129
+ * @throws Will throw an error if the element is not found
130
+ */
131
+ byIdAndWait(id: string): Promise<void>;
132
+ /**
133
+ * Clicks on an element located by its CSS selector.
134
+ *
135
+ * @async
136
+ * @param {string} selector - The CSS selector of the element to click.
137
+ * @returns {Promise<void>} A promise that resolves when the click action is performed.
138
+ * @throws {Error} Throws an error if the element is not found.
139
+ */
140
+ bySelector(selector: string): Promise<void>;
141
+ /**
142
+ * Clicks on an element located by its CSS selector and waits for the page complete check to finish.
143
+ *
144
+ * @async
145
+ * @param {string} selector - The CSS selector of the element to click.
146
+ * @returns {Promise<void>} A promise that resolves when the click action and page complete check are finished.
147
+ * @throws {Error} Throws an error if the element is not found.
148
+ */
149
+ bySelectorAndWait(selector: string): Promise<void>;
150
+ }
151
+ //# sourceMappingURL=click.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"click.d.ts","sourceRoot":"","sources":["../../../../lib/core/engine/command/click.js"],"names":[],"mappings":"AAYA;;;;;GAKG;AACH;IACE,kDASC;IARC;;OAEG;IACH,gBAAsB;IACtB;;OAEG;IACH,0BAA0C;IAG5C;;;;;;;OAOG;IACH,uBAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAYzB;IAED;;;;;;;OAOG;IACH,8BAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAazB;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;;;;;;;OAOG;IACH,+BAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAYzB;IAED;;;;;;;OAOG;IACH,eAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAczB;IACD;;;;;;;OAOG;IACH,sBAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAezB;IAED;;;;;;;OAOG;IACH,SAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAYzB;IAED;;;;;;;OAOG;IACH,gBAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAazB;IAED;;;;;;;OAOG;IACH,SAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAYzB;IAED;;;;;;;OAOG;IACH,aAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAYzB;IAED;;;;;OAKG;IACH,gBAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAazB;IAED;;;;;;;OAOG;IACH,qBAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAYzB;IAED;;;;;;;OAOG;IACH,4BAJW,MAAM,GACJ,QAAQ,IAAI,CAAC,CAazB;CACF"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Provides debugging capabilities within a browser automation script.
3
+ * It allows setting breakpoints to pause script execution and inspect the current state.
4
+ *
5
+ * @class
6
+ * @hideconstructor
7
+ */
8
+ export class Debug {
9
+ constructor(browser: any, options: any);
10
+ /**
11
+ * @private
12
+ */
13
+ private browser;
14
+ /**
15
+ * @private
16
+ */
17
+ private options;
18
+ /**
19
+ * Adds a breakpoint to the script. The browser will pause at the breakpoint, waiting for user input to continue.
20
+ * This is useful for debugging and inspecting the browser state at a specific point in the script.
21
+ *
22
+ * @async
23
+ * @param {string} [name] - An optional name for the breakpoint for logging purposes.
24
+ * @returns {Promise<void>} A promise that resolves when the user chooses to continue from the breakpoint.
25
+ */
26
+ breakpoint(name?: string): Promise<void>;
27
+ }
28
+ //# sourceMappingURL=debug.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../../../lib/core/engine/command/debug.js"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH;IACE,wCASC;IARC;;OAEG;IACH,gBAAsB;IACtB;;OAEG;IACH,gBAAsB;IAGxB;;;;;;;OAOG;IACH,kBAHW,MAAM,GACJ,QAAQ,IAAI,CAAC,CA+BzB;CACF"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * This class provides a way to get hokld of Seleniums WebElements.
3
+ * @class
4
+ * @hideconstructor
5
+ */
6
+ export class Element {
7
+ constructor(browser: any);
8
+ /**
9
+ * @private
10
+ */
11
+ private driver;
12
+ /**
13
+ * Finds an element by its CSS selector.
14
+ *
15
+ * @param {string} name - The CSS selector of the element.
16
+ * @returns {Promise<WebElement>} A promise that resolves to the WebElement found.
17
+ */
18
+ getByCss(name: string): Promise<WebElement>;
19
+ /**
20
+ * Finds an element by its ID.
21
+ *
22
+ * @param {string} id - The ID of the element.
23
+ * @returns {Promise<WebElement>} A promise that resolves to the WebElement found.
24
+ */
25
+ getById(id: string): Promise<WebElement>;
26
+ /**
27
+ * Finds an element by its XPath.
28
+ *
29
+ * @param {string} xpath - The XPath query of the element.
30
+ * @returns {Promise<WebElement>} A promise that resolves to the WebElement found.
31
+ */
32
+ getByXpath(xpath: string): Promise<WebElement>;
33
+ /**
34
+ * Finds an element by its class name.
35
+ *
36
+ * @param {string} className - The class name of the element.
37
+ * @returns {Promise<WebElement>} A promise that resolves to the WebElement found.
38
+ */
39
+ getByClassName(className: string): Promise<WebElement>;
40
+ /**
41
+ * Finds an element by its name attribute.
42
+ *
43
+ * @param {string} name - The name attribute of the element.
44
+ * @returns {Promise<WebElement>} A promise that resolves to the WebElement found.
45
+ */
46
+ getByName(name: string): Promise<WebElement>;
47
+ }
48
+ import { WebElement } from 'selenium-webdriver';
49
+ //# sourceMappingURL=element.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../../../lib/core/engine/command/element.js"],"names":[],"mappings":"AAGA;;;;GAIG;AACH;IACE,0BAKC;IAJC;;OAEG;IACH,eAAiC;IAGnC;;;;;OAKG;IACH,eAHW,MAAM,GACJ,QAAQ,UAAU,CAAC,CAI/B;IAED;;;;;OAKG;IACH,YAHW,MAAM,GACJ,QAAQ,UAAU,CAAC,CAI/B;IAED;;;;;OAKG;IACH,kBAHW,MAAM,GACJ,QAAQ,UAAU,CAAC,CAI/B;IAED;;;;;OAKG;IACH,0BAHW,MAAM,GACJ,QAAQ,UAAU,CAAC,CAI/B;IAED;;;;;OAKG;IACH,gBAHW,MAAM,GACJ,QAAQ,UAAU,CAAC,CAI/B;CACF;2BA/D8B,oBAAoB"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Manages the Gecko Profiler for profiling Firefox performance.
3
+ *
4
+ * @class
5
+ * @hideconstructor
6
+ */
7
+ export class GeckoProfiler {
8
+ constructor(GeckoProfiler: any, browser: any, index: any, options: any, result: any);
9
+ /**
10
+ * @private
11
+ */
12
+ private GeckoProfiler;
13
+ /**
14
+ * @private
15
+ */
16
+ private browser;
17
+ /**
18
+ * @private
19
+ */
20
+ private index;
21
+ /**
22
+ * @private
23
+ */
24
+ private options;
25
+ /**
26
+ * @private
27
+ */
28
+ private result;
29
+ /**
30
+ * Starts the Gecko Profiler.
31
+ *
32
+ * @async
33
+ * @returns {Promise<void>} A promise that resolves when the profiler is started.
34
+ * @throws {Error} Throws an error if not running Firefox or if the configuration is not set for custom profiling.
35
+ */
36
+ start(): Promise<void>;
37
+ /**
38
+ * Stops the Gecko Profiler and processes the collected data.
39
+ *
40
+ * @async
41
+ * @returns {Promise<void>} A promise that resolves when the profiler is stopped and the data is processed.
42
+ * @throws {Error} Throws an error if not running Firefox or if custom profiling was not started.
43
+ */
44
+ stop(): Promise<void>;
45
+ }
46
+ //# sourceMappingURL=geckoProfiler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geckoProfiler.d.ts","sourceRoot":"","sources":["../../../../lib/core/engine/command/geckoProfiler.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH;IACE,qFAqBC;IApBC;;OAEG;IACH,sBAAkC;IAClC;;OAEG;IACH,gBAAsB;IACtB;;OAEG;IACH,cAAkB;IAClB;;OAEG;IACH,gBAAsB;IACtB;;OAEG;IACH,eAAoB;IAGtB;;;;;;OAMG;IACH,SAHa,QAAQ,IAAI,CAAC,CAezB;IAED;;;;;;OAMG;IACH,QAHa,QAAQ,IAAI,CAAC,CAezB;CACF"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Provides functionality to execute JavaScript code in the context of the current page.
3
+ *
4
+ * @class
5
+ * @hideconstructor
6
+ */
7
+ export class JavaScript {
8
+ constructor(browser: any, pageCompleteCheck: any);
9
+ /**
10
+ * @private
11
+ */
12
+ private browser;
13
+ /**
14
+ * @private
15
+ */
16
+ private pageCompleteCheck;
17
+ /**
18
+ * Executes a JavaScript script.
19
+ *
20
+ * @async
21
+ * @param {string} js - The JavaScript code to execute.
22
+ * @returns {Promise<*>} A promise that resolves with the result of the executed script.
23
+ * @throws {Error} Throws an error if the JavaScript cannot be executed.
24
+ */
25
+ run(js: string): Promise<any>;
26
+ /**
27
+ * Executes a JavaScript script and waits for the page complete check to finish.
28
+ *
29
+ * @async
30
+ * @param {string} js - The JavaScript code to execute.
31
+ * @returns {Promise<*>} A promise that resolves with the result of the executed script and the completion of the page load.
32
+ * @throws {Error} Throws an error if the JavaScript cannot be executed.
33
+ */
34
+ runAndWait(js: string): Promise<any>;
35
+ /**
36
+ * Executes synchronous privileged JavaScript.
37
+ *
38
+ * @async
39
+ * @param {string} js - The privileged JavaScript code to execute.
40
+ * @returns {Promise<*>} A promise that resolves with the result of the executed privileged script.
41
+ * @throws {Error} Throws an error if the privileged JavaScript cannot be executed.
42
+ */
43
+ runPrivileged(js: string): Promise<any>;
44
+ /**
45
+ * Executes synchronous privileged JavaScript and waits for the page complete check to finish.
46
+ *
47
+ * @async
48
+ * @param {string} js - The privileged JavaScript code to execute.
49
+ * @returns {Promise<*>} A promise that resolves with the result of the executed privileged script and the completion of the page load.
50
+ * @throws {Error} Throws an error if the privileged JavaScript cannot be executed.
51
+ */
52
+ runPrivilegedAndWait(js: string): Promise<any>;
53
+ /**
54
+ * Executes asynchronous privileged JavaScript.
55
+ *
56
+ * @async
57
+ * @param {string} js - The asynchronous privileged JavaScript code to execute.
58
+ * @returns {Promise<*>} A promise that resolves with the result of the executed asynchronous privileged script.
59
+ * @throws {Error} Throws an error if the asynchronous privileged JavaScript cannot be executed.
60
+ */
61
+ runPrivilegedAsync(js: string): Promise<any>;
62
+ }
63
+ //# sourceMappingURL=javaScript.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"javaScript.d.ts","sourceRoot":"","sources":["../../../../lib/core/engine/command/javaScript.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH;IACE,kDASC;IARC;;OAEG;IACH,gBAAsB;IACtB;;OAEG;IACH,0BAA0C;IAG5C;;;;;;;OAOG;IACH,QAJW,MAAM,GACJ,YAAU,CAYtB;IAED;;;;;;;OAOG;IACH,eAJW,MAAM,GACJ,YAAU,CAYtB;IAED;;;;;;;OAOG;IACH,kBAJW,MAAM,GACJ,YAAU,CAetB;IAED;;;;;;;OAOG;IACH,yBAJW,MAAM,GACJ,YAAU,CAYtB;IAED;;;;;;;OAOG;IACH,uBAJW,MAAM,GACJ,YAAU,CAetB;CACF"}
@@ -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"}