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
package/package.json CHANGED
@@ -1,24 +1,25 @@
1
1
  {
2
2
  "name": "browsertime",
3
3
  "description": "Get performance metrics from your web page using Browsertime.",
4
- "version": "20.0.0",
4
+ "version": "21.0.0",
5
5
  "bin": "./bin/browsertime.js",
6
6
  "type": "module",
7
+ "types": "./types/scripting.d.ts",
7
8
  "dependencies": {
8
9
  "@cypress/xvfb": "1.2.4",
9
10
  "@devicefarmer/adbkit": "3.2.5",
10
11
  "@sitespeed.io/chromedriver": "120.0.6099-71",
11
12
  "@sitespeed.io/edgedriver": "120.0.2210-77",
12
- "@sitespeed.io/geckodriver": "0.33.0-c",
13
+ "@sitespeed.io/geckodriver": "0.34.0",
13
14
  "@sitespeed.io/throttle": "5.0.0",
14
15
  "@sitespeed.io/tracium": "0.3.3",
15
- "ff-test-bidi-har-export": "0.0.12",
16
16
  "btoa": "1.2.1",
17
17
  "chrome-har": "0.13.2",
18
18
  "chrome-remote-interface": "0.33.0",
19
19
  "dayjs": "1.11.10",
20
20
  "execa": "8.0.1",
21
21
  "fast-stats": "0.0.6",
22
+ "ff-test-bidi-har-export": "0.0.12",
22
23
  "find-up": "7.0.0",
23
24
  "get-port": "7.0.0",
24
25
  "hasbin": "1.2.3",
@@ -36,14 +37,18 @@
36
37
  "jimp": "0.22.10"
37
38
  },
38
39
  "devDependencies": {
40
+ "@types/selenium-webdriver": "4.1.21",
39
41
  "ava": "6.0.1",
42
+ "clean-jsdoc-theme": "4.2.17",
40
43
  "eslint": "8.55.0",
41
44
  "eslint-config-prettier": "9.1.0",
42
45
  "eslint-plugin-prettier": "5.0.1",
43
46
  "eslint-plugin-unicorn": "49.0.0",
47
+ "jsdoc": "4.0.2",
44
48
  "prettier": "3.1.1",
49
+ "serve": "14.2.1",
45
50
  "serve-handler": "6.1.5",
46
- "serve": "14.2.1"
51
+ "typescript": "5.3.3"
47
52
  },
48
53
  "engines": {
49
54
  "node": ">=18.0.0"
@@ -56,12 +61,14 @@
56
61
  "bin",
57
62
  "browserscripts",
58
63
  "browsersupport",
59
- "visualmetrics",
64
+ "visualmetrics/visualmetrics-portable.py",
65
+ "visualmetrics/visualmetrics.py",
60
66
  "browsertime.png",
61
67
  "index.js",
62
68
  "lib",
63
69
  "package.json",
64
- "vendor"
70
+ "vendor",
71
+ "types"
65
72
  ],
66
73
  "exports": "./index.js",
67
74
  "scripts": {
@@ -69,7 +76,10 @@
69
76
  "start-server": "serve test/data/html/",
70
77
  "stop-server": "sudo pkill serve",
71
78
  "lint": "eslint .",
72
- "lint:fix": "eslint . --fix"
79
+ "lint:fix": "eslint . --fix",
80
+ "tsc": "tsc",
81
+ "jsdoc": "jsdoc --configure jsdoc/jsdoc.json",
82
+ "prepublishOnly": "npm run lint && npm run tsc"
73
83
  },
74
84
  "author": "Peter Hedenskog",
75
85
  "contributors": [
@@ -0,0 +1,70 @@
1
+ export function isAndroidConfigured(options: any): boolean;
2
+ export class Android {
3
+ constructor(options: any);
4
+ client: any;
5
+ id: any;
6
+ port: any;
7
+ screenBrightnessMode: number;
8
+ screenBrightness: number;
9
+ tmpDir: string;
10
+ _init(): Promise<void>;
11
+ device: any;
12
+ sdcard: any;
13
+ _runCommand(command: any): Promise<any>;
14
+ _runCommandAndGet(command: any): Promise<any>;
15
+ _runAsRootAndGet(command: any): Promise<any>;
16
+ _runAsRoot(command: any): Promise<boolean>;
17
+ _downloadFile(sourcePath: any, destinationPath: any): Promise<any>;
18
+ _downloadDir(sourcePath: any, destinationPath: any): Promise<void>;
19
+ getFullPathOnSdCard(path: any): string;
20
+ mkDirOnSdCard(dirName: any): Promise<any>;
21
+ removeFileOnSdCard(file: any): Promise<any>;
22
+ removePathOnSdCard(path: any): Promise<any>;
23
+ reboot(): Promise<any>;
24
+ getTemperature(): Promise<number>;
25
+ getMeta(): Promise<{
26
+ model: any;
27
+ name: any;
28
+ device: any;
29
+ androidVersion: any;
30
+ id: any;
31
+ wifi: any;
32
+ }>;
33
+ pullNetLog(destination: any): Promise<any>;
34
+ addDevtoolsFw(): Promise<any>;
35
+ removeDevtoolsFw(): Promise<({
36
+ all?: string;
37
+ isCanceled: boolean;
38
+ } & import("execa").ExecaReturnBase<string>)[]>;
39
+ startVideo(): Promise<any>;
40
+ ping(address: any): Promise<boolean>;
41
+ clickPowerButton(): Promise<any>;
42
+ getWifi(): Promise<any>;
43
+ closeAppNotRespondingPopup(): Promise<any>;
44
+ pressHomeButton(): Promise<any>;
45
+ stopVideo(): Promise<any>;
46
+ getPhoneState(): Promise<string>;
47
+ pullVideo(destinationPath: any): Promise<any>;
48
+ removeVideo(): Promise<any>;
49
+ pidof(packageName: any): Promise<any>;
50
+ _pidofWithPidof(packageName: any): Promise<number>;
51
+ _pidofWithPs(packageName: any): Promise<number>;
52
+ _processStartTime(pid: any): Promise<{
53
+ dateInMs: number;
54
+ systemUptimeInSeconds: any;
55
+ utilStartTimeAfterSystemStartTimeInJiffies: any;
56
+ processStartTimeAfterSystemStartTimeInJiffies: any;
57
+ jiffesPerSeconds: number;
58
+ processStartTimeInMs: number;
59
+ }>;
60
+ processStartTime(pid: any, count?: number): Promise<number>;
61
+ startPowerTesting(): Promise<void>;
62
+ stopPowerTesting(): Promise<void>;
63
+ resetPowerUsage(): Promise<void>;
64
+ measurePowerUsage(packageName: any): Promise<{
65
+ 'full-screen': number;
66
+ 'full-wifi': number;
67
+ total: number;
68
+ }>;
69
+ }
70
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/android/index.js"],"names":[],"mappings":"AAiiBA,2DAWC;AA/hBD;IACE,0BAwBC;IAfC,YAAgC;IAEhC,QAIC;IACD,UAAgC;IAGhC,6BAA6B;IAC7B,yBAA2B;IAC3B,eAAgC;IAKlC,uBAgBC;IALC,YAA4C;IAG1C,YAAoE;IAIxE,wCAEC;IAED,8CAIC;IAED,6CAIC;IAED,2CAUC;IAED,mEAYC;IAED,mEAcC;IAED,uCAEC;IAED,0CAGC;IAED,4CAMC;IAED,4CAMC;IAED,uBAGC;IAED,kCAOC;IAED;;;;;;;OAuBC;IAED,2CAKC;IAED,8BAKC;IAED;;;oDAuBC;IAED,2BAIC;IAED,qCAGC;IAED,iCAGC;IAED,wBASC;IAED,2CAOC;IAED,gCAEC;IAED,0BAIC;IAED,iCAGC;IAED,8CAIC;IAED,4BAEC;IAED,sCAYC;IAED,mDAsBC;IAED,gDA+CC;IAED;;;;;;;OAqDC;IAED,4DAQC;IAED,mCAcC;IAED,kCAQC;IAED,iCAIC;IAED;;;;OAGC;CACF"}
@@ -0,0 +1,21 @@
1
+ export function parseCPUTrace(tracelog: any, url: any): Promise<{
2
+ categories: {
3
+ parseHTML: number;
4
+ styleLayout: number;
5
+ paintCompositeRender: number;
6
+ scriptParseCompile: number;
7
+ scriptEvaluation: number;
8
+ garbageCollection: number;
9
+ other: number;
10
+ };
11
+ events: {};
12
+ urls: {
13
+ url: string;
14
+ value: number;
15
+ }[];
16
+ } | {
17
+ categories?: undefined;
18
+ events?: undefined;
19
+ urls?: undefined;
20
+ }>;
21
+ //# sourceMappingURL=parseCpuTrace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseCpuTrace.d.ts","sourceRoot":"","sources":["../../lib/chrome/parseCpuTrace.js"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;;;;;;;GA4EC"}
@@ -0,0 +1,2 @@
1
+ export function parse(events: any, url: any): any;
2
+ //# sourceMappingURL=traceCategoriesParser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"traceCategoriesParser.d.ts","sourceRoot":"","sources":["../../lib/chrome/traceCategoriesParser.js"],"names":[],"mappings":"AA2JA,kDAQC"}
@@ -0,0 +1,8 @@
1
+ export function getRenderBlocking(trace: any): Promise<{
2
+ renderBlockingInfo: {};
3
+ renderBlocking: {
4
+ recalculateStyle: {};
5
+ requests: {};
6
+ };
7
+ }>;
8
+ //# sourceMappingURL=traceUtilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"traceUtilities.d.ts","sourceRoot":"","sources":["../../../lib/chrome/webdriver/traceUtilities.js"],"names":[],"mappings":"AA8DA;;;;;;GAoCC"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * This class provides an abstraction layer for Selenium's action sequence functionality.
3
+ * It allows for easy interaction with web elements using different locating strategies
4
+ * and simulating complex user gestures like mouse movements, key presses, etc.
5
+ *
6
+ * @class
7
+ * @hideconstructor
8
+ * @see https://www.selenium.dev/documentation/webdriver/actions_api/
9
+ */
10
+ export class Action {
11
+ constructor(browser: any);
12
+ /**
13
+ * @private
14
+ */
15
+ private driver;
16
+ /**
17
+ * @private
18
+ */
19
+ private actions;
20
+ clear(): Promise<any>;
21
+ /**
22
+ * Retrieves the current action sequence builder.
23
+ * The actions builder can be used to chain multiple browser actions.
24
+ * @returns {SeleniumActions} The current Selenium Actions builder object for chaining browser actions.
25
+ * @example
26
+ * // Example of using the actions builder to perform a drag-and-drop operation:
27
+ * const elementToDrag = await commands.action.getElementByCss('.draggable');
28
+ * const dropTarget = await commands.action.getElementByCss('.drop-target');
29
+ * await commands.action.getAction()
30
+ * .dragAndDrop(elementToDrag, dropTarget)
31
+ * .perform();
32
+ *
33
+ */
34
+ getAction(): SeleniumActions;
35
+ /**
36
+ * Finds an element by its CSS selector.
37
+ *
38
+ * @param {string} name - The CSS selector of the element.
39
+ * @returns {Promise<WebElement>} A promise that resolves to the WebElement found.
40
+ */
41
+ getElementByCss(name: string): Promise<WebElement>;
42
+ /**
43
+ * Finds an element by its ID.
44
+ *
45
+ * @param {string} id - The ID of the element.
46
+ * @returns {Promise<WebElement>} A promise that resolves to the WebElement found.
47
+ */
48
+ getElementById(id: string): Promise<WebElement>;
49
+ /**
50
+ * Finds an element by its XPath.
51
+ *
52
+ * @param {string} xpath - The XPath query of the element.
53
+ * @returns {Promise<WebElement>} A promise that resolves to the WebElement found.
54
+ */
55
+ getElementByXpath(xpath: string): Promise<WebElement>;
56
+ /**
57
+ * Finds an element by its class name.
58
+ *
59
+ * @param {string} className - The class name of the element.
60
+ * @returns {Promise<WebElement>} A promise that resolves to the WebElement found.
61
+ */
62
+ getElementByClassName(className: string): Promise<WebElement>;
63
+ /**
64
+ * Finds an element by its name attribute.
65
+ *
66
+ * @param {string} name - The name attribute of the element.
67
+ * @returns {Promise<WebElement>} A promise that resolves to the WebElement found.
68
+ */
69
+ getElementByName(name: string): Promise<WebElement>;
70
+ }
71
+ import { Actions as SeleniumActions } from 'selenium-webdriver';
72
+ import { WebElement } from 'selenium-webdriver';
73
+ //# sourceMappingURL=action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../lib/core/engine/command/action.js"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH;IACE,0BASC;IARC;;OAEG;IACH,eAAiC;IACjC;;OAEG;IACH,gBAAmD;IASrD,sBAEC;IAED;;;;;;;;;;;;OAYG;IACH,aAVa,eAAe,CAY3B;IAED;;;;;OAKG;IACH,sBAHW,MAAM,GACJ,QAAQ,UAAU,CAAC,CAI/B;IAED;;;;;OAKG;IACH,mBAHW,MAAM,GACJ,QAAQ,UAAU,CAAC,CAI/B;IAED;;;;;OAKG;IACH,yBAHW,MAAM,GACJ,QAAQ,UAAU,CAAC,CAI/B;IAED;;;;;OAKG;IACH,iCAHW,MAAM,GACJ,QAAQ,UAAU,CAAC,CAI/B;IAED;;;;;OAKG;IACH,uBAHW,MAAM,GACJ,QAAQ,UAAU,CAAC,CAI/B;CACF;2CAnG0D,oBAAoB;2BAApB,oBAAoB"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * This class provides an abstraction layer for Selenium's action sequence functionality.
3
+ * It allows for easy interaction with web elements using different locating strategies
4
+ * and simulating complex user gestures like mouse movements, key presses, etc.
5
+ *
6
+ * @class
7
+ * @hideconstructor
8
+ * @see https://www.selenium.dev/documentation/webdriver/actions_api/
9
+ * @see https://www.selenium.dev/selenium/docs/api/javascript/module/selenium-webdriver/lib/input_exports_Actions.html
10
+ */
11
+ export class Actions {
12
+ constructor(browser: any);
13
+ /**
14
+ * @private
15
+ */
16
+ private driver;
17
+ /**
18
+ * @private
19
+ */
20
+ private actions;
21
+ clear(): Promise<any>;
22
+ /**
23
+ * Retrieves the current action sequence builder.
24
+ * The actions builder can be used to chain multiple browser actions.
25
+ * @returns {SeleniumActions} The current Selenium Actions builder object for chaining browser actions.
26
+ * @example
27
+ * // Example of using the actions builder to perform a drag-and-drop operation:
28
+ * const elementToDrag = await commands.action.getElementByCss('.draggable');
29
+ * const dropTarget = await commands.action.getElementByCss('.drop-target');
30
+ * await commands.action.getAction()
31
+ * .dragAndDrop(elementToDrag, dropTarget)
32
+ * .perform();
33
+ *
34
+ */
35
+ getActions(): SeleniumActions;
36
+ }
37
+ import { Actions as SeleniumActions } from 'selenium-webdriver/lib/input.js';
38
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../lib/core/engine/command/actions.js"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH;IACE,0BASC;IARC;;OAEG;IACH,eAAiC;IACjC;;OAEG;IACH,gBAAmD;IASrD,sBAEC;IAED;;;;;;;;;;;;OAYG;IACH,cAVa,eAAe,CAY3B;CACF;2CAjD0C,iCAAiC"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Provides functionality to add text to elements on a web page using various selectors.
3
+ * @class
4
+ * @hideconstructor
5
+ */
6
+ export class AddText {
7
+ constructor(browser: any);
8
+ /**
9
+ * @private
10
+ */
11
+ private browser;
12
+ /**
13
+ * Adds text to an element identified by its ID.
14
+ *
15
+ * @async
16
+ * @example commands.addText.byId('mytext', 'id');
17
+ * @param {string} text - The text string to add.
18
+ * @param {string} id - The ID of the element.
19
+ * @returns {Promise<void>} A promise that resolves when the text has been added.
20
+ * @throws {Error} Throws an error if the element is not found.
21
+ */
22
+ byId(text: string, id: string): Promise<void>;
23
+ /**
24
+ * Adds text to an element identified by its XPath.
25
+ *
26
+ * @async
27
+ * @example commands.addText.byXpath('mytext', 'xpath');
28
+ * @param {string} text - The text string to add.
29
+ * @param {string} xpath - The XPath of the element.
30
+ * @returns {Promise<void>} A promise that resolves when the text has been added.
31
+ * @throws {Error} Throws an error if the element is not found.
32
+ */
33
+ byXpath(text: string, xpath: string): Promise<void>;
34
+ /**
35
+ * Adds text to an element identified by its CSS selector.
36
+ *
37
+ * @async
38
+ * @example commands.addText.bySelector('mytext', 'selector');
39
+ * @param {string} text - The text string to add.
40
+ * @param {string} selector - The CSS selector of the element.
41
+ * @returns {Promise<void>} A promise that resolves when the text has been added.
42
+ * @throws {Error} Throws an error if the element is not found.
43
+ */
44
+ bySelector(text: string, selector: string): Promise<void>;
45
+ /**
46
+ * Adds text to an element identified by its class name.
47
+ *
48
+ * @async
49
+ * @example commands.addText.byClassName('mytext', 'className');
50
+ * @param {string} text - The text string to add.
51
+ * @param {string} className - The class name of the element.
52
+ * @returns {Promise<void>} A promise that resolves when the text has been added.
53
+ * @throws {Error} Throws an error if the element is not found.
54
+ */
55
+ byClassName(text: string, className: string): Promise<void>;
56
+ /**
57
+ * Adds text to an element identified by its name attribute.
58
+ *
59
+ * @async
60
+ * @example commands.addText.byName('mytext', 'name');
61
+ * @param {string} text - The text string to add.
62
+ * @param {string} name - The name attribute of the element.
63
+ * @returns {Promise<void>} A promise that resolves when the text has been added.
64
+ * @throws {Error} Throws an error if the element is not found.
65
+ */
66
+ byName(text: string, name: string): Promise<void>;
67
+ }
68
+ //# sourceMappingURL=addText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addText.d.ts","sourceRoot":"","sources":["../../../../lib/core/engine/command/addText.js"],"names":[],"mappings":"AAIA;;;;GAIG;AACH;IACE,0BAKC;IAJC;;OAEG;IACH,gBAAsB;IAGxB;;;;;;;;;OASG;IACH,WALW,MAAM,MACN,MAAM,GACJ,QAAQ,IAAI,CAAC,CAezB;IAED;;;;;;;;;OASG;IACH,cALW,MAAM,SACN,MAAM,GACJ,QAAQ,IAAI,CAAC,CAezB;IAED;;;;;;;;;OASG;IACH,iBALW,MAAM,YACN,MAAM,GACJ,QAAQ,IAAI,CAAC,CAezB;IAED;;;;;;;;;OASG;IACH,kBALW,MAAM,aACN,MAAM,GACJ,QAAQ,IAAI,CAAC,CAezB;IAED;;;;;;;;;OASG;IACH,aALW,MAAM,QACN,MAAM,GACJ,QAAQ,IAAI,CAAC,CAezB;CACF"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Provides functionality to interact with an Android device through shell commands.
3
+ * @class
4
+ * @see https://www.sitespeed.io/documentation/sitespeed.io/mobile-phones/#test-on-android
5
+ * @hideconstructor
6
+ */
7
+ export class AndroidCommand {
8
+ constructor(options: any);
9
+ /**
10
+ * @private
11
+ */
12
+ private options;
13
+ /**
14
+ * Runs a shell command on the connected Android device.
15
+ * This method requires the Android device to be properly configured.
16
+ *
17
+ * @async
18
+ * @example await commands.android.shell('');
19
+ * @param {string} command - The shell command to run on the Android device.
20
+ * @returns {Promise<string>} A promise that resolves with the result of the command or rejects if there's an error.
21
+ * @throws {Error} Throws an error if Android is not configured or if the command fails.
22
+ */
23
+ shell(command: string): Promise<string>;
24
+ a: Android;
25
+ /**
26
+ * Runs a shell command on the connected Android device as the root user.
27
+ * This method requires the Android device to be properly configured and that you
28
+ * rooted the device.
29
+ *
30
+ * @async
31
+ * @example await commands.android.shellAsRoot('');
32
+ * @param {string} command - The shell command to run on the Android device as root.
33
+ * @returns {Promise<string>} A promise that resolves with the result of the command or rejects if there's an error.
34
+ * @throws {Error} Throws an error if Android is not configured or if the command fails.
35
+ */
36
+ shellAsRoot(command: string): Promise<string>;
37
+ }
38
+ import { Android } from '../../../android/index.js';
39
+ //# sourceMappingURL=android.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"android.d.ts","sourceRoot":"","sources":["../../../../lib/core/engine/command/android.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH;IACE,0BAKC;IAJC;;OAEG;IACH,gBAAsB;IAGxB;;;;;;;;;OASG;IACH,eAJW,MAAM,GACJ,QAAQ,MAAM,CAAC,CAc3B;IAPK,WAAkC;IASxC;;;;;;;;;;OAUG;IACH,qBAJW,MAAM,GACJ,QAAQ,MAAM,CAAC,CAgB3B;CACF;wBAhE4C,2BAA2B"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Manage the browser cache.
3
+ * This class provides methods to clear the cache and cookies in different browsers.
4
+ *
5
+ * @class
6
+ * @hideconstructor
7
+ */
8
+ export class Cache {
9
+ constructor(browser: any, browserName: any, extensionServer: any, cdp: any);
10
+ /**
11
+ * @private
12
+ */
13
+ private browser;
14
+ /**
15
+ * @private
16
+ */
17
+ private browserName;
18
+ /**
19
+ * @private
20
+ */
21
+ private extensionServer;
22
+ /**
23
+ * @private
24
+ */
25
+ private cdp;
26
+ /**
27
+ * Clears the browser cache. This includes both cache and cookies.
28
+ *
29
+ * For Firefox, it uses the extensionServer setup with specific options.
30
+ * For Chrome and Edge, it uses the Chrome DevTools Protocol (CDP) commands.
31
+ * If the browser is not supported, logs an error message.
32
+ *
33
+ * @async
34
+ * @example await commands.cache.clear();
35
+ * @throws Will throw an error if the browser is not supported.
36
+ * @returns {Promise<void>} A promise that resolves when the cache and cookies are cleared.
37
+ */
38
+ clear(): Promise<void>;
39
+ /**
40
+ * Clears the browser cache while keeping the cookies.
41
+ *
42
+ * For Firefox, it uses the extensionServer setup with specific options.
43
+ * For Chrome and Edge, it uses the Chrome DevTools Protocol (CDP) command to clear the cache.
44
+ * If the browser is not supported, logs an error message.
45
+ *
46
+ * @async
47
+ * @example await commands.cache.clearKeepCookies();
48
+ * @throws Will throw an error if the browser is not supported.
49
+ * @returns {Promise<void>} A promise that resolves when the cache is cleared but cookies are kept.
50
+ */
51
+ clearKeepCookies(): Promise<void>;
52
+ }
53
+ //# sourceMappingURL=cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../../lib/core/engine/command/cache.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH;IACE,4EAiBC;IAhBC;;OAEG;IACH,gBAAsB;IACtB;;OAEG;IACH,oBAA8B;IAC9B;;OAEG;IACH,wBAAsC;IACtC;;OAEG;IACH,YAAc;IAGhB;;;;;;;;;;;OAWG;IACH,SAFa,QAAQ,IAAI,CAAC,CAgBzB;IAED;;;;;;;;;;;OAWG;IACH,oBAFa,QAAQ,IAAI,CAAC,CAezB;CACF"}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Manages interactions with the Chrome DevTools Protocol for Chrome and Edge browsers.
3
+ * Allows sending commands and setting up event listeners via the protocol.
4
+ *
5
+ * @class
6
+ * @hideconstructor
7
+ * @see https://chromedevtools.github.io/devtools-protocol/
8
+ */
9
+ export class ChromeDevelopmentToolsProtocol {
10
+ constructor(engineDelegate: any, browserName: any);
11
+ /**
12
+ * @private
13
+ */
14
+ private engineDelegate;
15
+ /**
16
+ * @private
17
+ */
18
+ private browserName;
19
+ /**
20
+ * Sets up an event listener for a specific DevTools Protocol event.
21
+ *
22
+ * @async
23
+ * @param {string} event - The name of the event to listen for.
24
+ * @param {Function} f - The callback function to execute when the event is triggered.
25
+ * @throws {Error} Throws an error if the browser is not supported or if setting the listener fails.
26
+ */
27
+ on(event: string, f: Function): Promise<void>;
28
+ /**
29
+ * Sends a command to the DevTools Protocol and returns the result.
30
+ *
31
+ * @async
32
+ * @example const domCounters = await commands.cdp.sendAndGet('Memory.getDOMCounters');
33
+ * @see https://chromedevtools.github.io/devtools-protocol/
34
+ * @param {string} command - The DevTools Protocol command to send.
35
+ * @param {Object} arguments_ - The arguments for the command.
36
+ * @throws {Error} Throws an error if the browser is not supported or if the command fails.
37
+ * @returns {Promise<Object>} The result of the command execution.
38
+ */
39
+ sendAndGet(command: string, arguments_: any): Promise<any>;
40
+ /**
41
+ * Retrieves the raw client for the DevTools Protocol.
42
+ * @example const cdpClient = commands.cdp.getRawClient();
43
+ * @returns {Object} The raw DevTools Protocol client.
44
+ * @throws {Error} Throws an error if the browser is not supported.
45
+ * @see https://github.com/cyrus-and/chrome-remote-interface
46
+ */
47
+ getRawClient(): any;
48
+ /**
49
+ * Sends a command to the DevTools Protocol.
50
+ *
51
+ * @async
52
+ * @example await commands.cdp.send('');
53
+ * @see https://chromedevtools.github.io/devtools-protocol/
54
+ * @param {string} command - The DevTools Protocol command to send.
55
+ * @param {Object} arguments_ - The arguments for the command.
56
+ * @throws {Error} Throws an error if the browser is not supported or if the command fails.
57
+ * @returns {Promise<void>} A promise that resolves when the command has been sent.
58
+ */
59
+ send(command: string, arguments_: any): Promise<void>;
60
+ }
61
+ //# sourceMappingURL=chromeDevToolsProtocol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chromeDevToolsProtocol.d.ts","sourceRoot":"","sources":["../../../../lib/core/engine/command/chromeDevToolsProtocol.js"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH;IACE,mDASC;IARC;;OAEG;IACH,uBAAoC;IACpC;;OAEG;IACH,oBAA8B;IAGhC;;;;;;;OAOG;IACH,UAJW,MAAM,8BAuBhB;IAED;;;;;;;;;;OAUG;IACH,oBALW,MAAM,oBAGJ,YAAe,CAsB3B;IAED;;;;;;OAMG;IACH,oBAMC;IAED;;;;;;;;;;OAUG;IACH,cALW,MAAM,oBAGJ,QAAQ,IAAI,CAAC,CAmBzB;CACF"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Manages Chrome trace functionality, enabling custom profiling and trace collection in Chrome.
3
+ *
4
+ * @class
5
+ * @hideconstructor
6
+ */
7
+ export class ChromeTrace {
8
+ constructor(engineDelegate: any, index: any, options: any, result: any);
9
+ /**
10
+ * @private
11
+ */
12
+ private engineDelegate;
13
+ /**
14
+ * @private
15
+ */
16
+ private options;
17
+ /**
18
+ * @private
19
+ */
20
+ private result;
21
+ /**
22
+ * @private
23
+ */
24
+ private index;
25
+ /**
26
+ * Starts the Chrome trace collection.
27
+ *
28
+ * @async
29
+ * @example await commands.trace.start();
30
+ * @returns {Promise<void>} A promise that resolves when tracing is started.
31
+ * @throws {Error} Throws an error if not running Chrome or if configuration is not set for custom tracing.
32
+ */
33
+ start(): Promise<void>;
34
+ /**
35
+ * Stops the Chrome trace collection, processes the collected data, and attaches it to the result object.
36
+ *
37
+ * @async
38
+ * @example await commands.trace.stop();
39
+ * @returns {Promise<void>} A promise that resolves when tracing is stopped and data is processed.
40
+ * @throws {Error} Throws an error if not running Chrome or if custom tracing was not started.
41
+ */
42
+ stop(): Promise<void>;
43
+ events: any;
44
+ }
45
+ //# sourceMappingURL=chromeTrace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chromeTrace.d.ts","sourceRoot":"","sources":["../../../../lib/core/engine/command/chromeTrace.js"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH;IACE,wEAiBC;IAhBC;;OAEG;IACH,uBAAoC;IACpC;;OAEG;IACH,gBAAsB;IACtB;;OAEG;IACH,eAAoB;IACpB;;OAEG;IACH,cAAkB;IAGpB;;;;;;;OAOG;IACH,SAHa,QAAQ,IAAI,CAAC,CAezB;IAED;;;;;;;OAOG;IACH,QAHa,QAAQ,IAAI,CAAC,CAuCzB;IA/BK,YAAgB;CAgCvB"}