browsertime 24.8.2 → 24.9.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 CHANGED
@@ -1,8 +1,19 @@
1
1
  # Browsertime changelog (we do [semantic versioning](https://semver.org))
2
2
 
3
+ ## 24.9.0 - 2025-06-30
4
+ ### Added
5
+ * Update Docker container to use Chrome/edge 138, Firefox 140. Add Edgedriver and Chromedrinver 138 [#2303](https://github.com/sitespeedio/browsertime/pull/2303).
6
+
7
+ ### Fixed
8
+ * Update Selenium webdriver to 4.34.0 [#2304](https://github.com/sitespeedio/browsertime/pull/2304).
9
+ * Add extra try/catch if main document timings is missing when generating the HAR [#2302](https://github.com/sitespeedio/browsertime/pull/2302).
10
+
3
11
  ## 24.8.2 - 2025-06-22
4
12
  ### Fixed
5
- * Fix for serverTiming - thank you [Gregory Mierzwinski](https://github.com/gmierz) for PR [#2301](https://github.com/sitespeedio/browsertime/pull/2301)
13
+ * Fix for serverTiming - thank you [Gregory Mierzwinski](https://github.com/gmierz) for PR [#2301](https://github.com/sitespeedio/browsertime/pull/2301).
14
+ * Cleanup how we get the navigation timing metrics [#2300](https://github.com/sitespeedio/browsertime/pull/2300).
15
+ * Fix depercation warnings in visual metrics. Thank you [Emmanuel Ferdman](https://github.com/emmanuel-ferdman) for PR [#2297](https://github.com/sitespeedio/browsertime/pull/2297).
16
+
6
17
 
7
18
  ## 24.8.1 - 2025-06-01
8
19
  ### Fixed
@@ -185,7 +196,7 @@ Andy Davies](https://github.com/andydavies) cool [https://github.com/andydavies/
185
196
  ### Added
186
197
  * Updated to Chrome and Chromedriver 130 [#2192](https://github.com/sitespeedio/browsertime/pull/2192)
187
198
  * The Chrome in the ARM container is bumped from 107 to 130 [#2194](https://github.com/sitespeedio/browsertime/pull/2194).
188
-
199
+
189
200
  ### Fixed
190
201
  * New Geckodriver install that fixes running on ARM in the Docker container [#2193](https://github.com/sitespeedio/browsertime/pull/2193).
191
202
 
@@ -385,7 +396,7 @@ There's a breaking change for Firefox if you add your own request header or if y
385
396
 
386
397
  ## 21.5.0 - 2024-03-12
387
398
  ### Added
388
- * Firefox:
399
+ * Firefox:
389
400
  * Move injectJS functionality to Bidi [#2088](https://github.com/sitespeedio/browsertime/pull/2088). This makes it possible to inject JS in Firefox on mobile.
390
401
  * Expose Bidi in commands [#2091](https://github.com/sitespeedio/browsertime/pull/2091). You can now use webdriver bidi direct in your commands.
391
402
  ### Fixed
@@ -423,7 +434,7 @@ There's a breaking change for Firefox if you add your own request header or if y
423
434
  * Set correct viewports for the following emulated mobiles for Chrome: iPhone 14 Pro Max [#2070](https://github.com/sitespeedio/browsertime/pull/2070).
424
435
  * Update adbkit to 3.2.6 [#2069](https://github.com/sitespeedio/browsertime/pull/2069).
425
436
  * Selenium 4.17.0 [#2068](https://github.com/sitespeedio/browsertime/pull/2068).
426
- * There was a missing await when getting the tcpdump [#2075](https://github.com/sitespeedio/browsertime/pull/2075)
437
+ * There was a missing await when getting the tcpdump [#2075](https://github.com/sitespeedio/browsertime/pull/2075)
427
438
  * Remove all trace level logs (and do debug instead) since trace added unnecessary stacktraces to the log [#2074](https://github.com/sitespeedio/browsertime/pull/2074).
428
439
 
429
440
  ## 21.1.0 - 2024-01-24
@@ -470,7 +481,7 @@ The new version uses JSDoc to generate documentation for scripting and make it p
470
481
  * Firefox 121 in the Docker container.g
471
482
 
472
483
  ## 19.3.1 - 2023-12-18
473
- ### Fixed
484
+ ### Fixed
474
485
  * Ensure that visual metrics python script is included in the release.
475
486
 
476
487
  ## 19.3.0 - 2023-12-18
@@ -517,7 +528,7 @@ The new version uses JSDoc to generate documentation for scripting and make it p
517
528
  * Updated all dependencies to latest versions: ADB kit 3.2.5 [#2017](https://github.com/sitespeedio/browsertime/pull/2017), execa, dayjs, get-port and Chromedriver [#2015](https://github.com/sitespeedio/browsertime/pull/2015).
518
529
 
519
530
  ## 17.19.0 - 2023-11-03
520
- ### Added
531
+ ### Added
521
532
  * Updated to Chrome, Firefox and Edge 119 in the Docker container [#2010](https://github.com/sitespeedio/browsertime/pull/2010).
522
533
  * Updated to Edgedriver 119.
523
534
 
@@ -533,7 +544,7 @@ The new version uses JSDoc to generate documentation for scripting and make it p
533
544
  ### Added
534
545
  * Updated to Chromedriver 119 [#2003](https://github.com/sitespeedio/browsertime/pull/2003). 119 works with both Chrome 118 and 119 so it fixes [#1197](https://github.com/sitespeedio/browsertime/issues/1997).
535
546
  * Add support for network idle method to know when to end a test that uses network logs. Uses Bidi for Firefox and CDP for Chrome to listen on network events to know when to end a test. By default 5 seconds idle network time ends a tests (you could have network responses that hasn't arrived yet) [#1960](https://github.com/sitespeedio/browsertime/pull/1960). Potentially this can help SPA users or users where the page uses iframes. You can try it out by adding `--pageCompleteCheckNetworkIdle` yo your command line. This is still some work in progress but feel free to try ut out.
536
- * The resources script now collects number of resources served from the browser cashe for browser that supports that through the resource timing API [#1998](https://github.com/sitespeedio/browsertime/pull/1998)
547
+ * The resources script now collects number of resources served from the browser cashe for browser that supports that through the resource timing API [#1998](https://github.com/sitespeedio/browsertime/pull/1998)
537
548
 
538
549
  ### Fixed
539
550
  * Make sure timer always is cleared. There was case of where we do a rase beteween a promise and a timeout where the timeout timer wasn't cleared/removed [#2005](https://github.com/sitespeedio/browsertime/pull/2005).
@@ -551,7 +562,7 @@ The new version uses JSDoc to generate documentation for scripting and make it p
551
562
  ### Added
552
563
  * Firefox 117 and Edge 116 in the Docker container.
553
564
 
554
- ### Fixed
565
+ ### Fixed
555
566
  * Updated the BiDi HAR exporter for Firefox to version 0.0.12. This version will not work with Firefox 116 so if you use the BiDi HAR exporter you need to upgrade to Firefox 117.
556
567
 
557
568
  ## 17.15.0 - 2023-08-16
@@ -650,10 +661,10 @@ The new version uses JSDoc to generate documentation for scripting and make it p
650
661
 
651
662
  ## 17.8.1 - 2023-04-12
652
663
  ### Fixed
653
- * Upgraded to Firefox HAR 0.0.10 [#1939](https://github.com/sitespeedio/browsertime/pull/1939).
664
+ * Upgraded to Firefox HAR 0.0.10 [#1939](https://github.com/sitespeedio/browsertime/pull/1939).
654
665
  ## 17.8.0 - 2023-04-11
655
666
  ### Fixed
656
- * Upgraded to Firefox HAR 0.0.8 [#1937](https://github.com/sitespeedio/browsertime/pull/1937).
667
+ * Upgraded to Firefox HAR 0.0.8 [#1937](https://github.com/sitespeedio/browsertime/pull/1937).
657
668
 
658
669
  ### Added
659
670
  * Upgraded to Firefox 112 in the Docker container.
@@ -698,7 +709,7 @@ The new version uses JSDoc to generate documentation for scripting and make it p
698
709
  * Bumped Geckodriver to 0.32.2 and Edgedriver to 111.
699
710
 
700
711
  ## 17.2.0 - 2023-03-14
701
- ### Added
712
+ ### Added
702
713
  * Updated Chrome, Chromedriver, Edge and Firefox to 111.
703
714
 
704
715
  ## 17.1.1 - 2023-03-04
@@ -721,7 +732,7 @@ The project was transitioned to a [pure ESM package](https://gist.github.com/sin
721
732
 
722
733
 
723
734
  #### CLI users
724
- If you are a command line user and use scripting, you will need to do a change to your scripts or add a extra configuration.
735
+ If you are a command line user and use scripting, you will need to do a change to your scripts or add a extra configuration.
725
736
 
726
737
  The new browsertime version treat all JavaScript files that ends with *.js* as ESM modules, that means your old script files will not work out of the box. There's a couple of fixes for that:
727
738
 
@@ -741,7 +752,7 @@ export default async function (context, commands) {
741
752
  }
742
753
  ```
743
754
 
744
- If you have more complicated scripts, follow the [ESM package guide](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
755
+ If you have more complicated scripts, follow the [ESM package guide](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
745
756
 
746
757
  This is the best fix and will woirk 100% of the time.
747
758
 
@@ -749,7 +760,7 @@ This is the best fix and will woirk 100% of the time.
749
760
 
750
761
  **Another quick fix alternative**: As a last alternative add `--cjs` as a parameter to your test. That way the scripting file will be treated as a commonjs file. This is a hack, so to make sure it works, the user that runs Browsertime need to have write privileges to the folder where you have your scripting files. Browsertime will create a package.json file on the same levels as yoru script file. If you already have a package.json there, it will be overwritten.
751
762
 
752
- #### Non cli users
763
+ #### Non cli users
753
764
  If you import Browsertime in NodeJS we changed how you do your import.
754
765
 
755
766
  If you use ES modules you can import Browsertime like this:
@@ -774,7 +785,7 @@ If you run Browsertime direct using NodeJs (and not using Docker) you need to in
774
785
  python -m pip install --user OpenCV-Python Numpy
775
786
  ```
776
787
 
777
- This is pretty cool because it makes dependencies easier to install on all platforms + the script has also been cleaned up so its easier for us to maintain.
788
+ This is pretty cool because it makes dependencies easier to install on all platforms + the script has also been cleaned up so its easier for us to maintain.
778
789
 
779
790
  ### Added
780
791
  * Selenium 4.8.
@@ -873,7 +884,7 @@ This is pretty cool because it makes dependencies easier to install on all platf
873
884
  * Fixed `--preWarmServer` so it works with `--headless`, Docker and specific Android or iOS device [#1815](https://github.com/sitespeedio/browsertime/pull/1815).
874
885
  ## 16.11.0 - 2022-06-28
875
886
 
876
- ### Added
887
+ ### Added
877
888
  * Firefox 102 and Edge 103 in the Docker container.
878
889
  * Use Edgedriver 103 [#1812](https://github.com/sitespeedio/browsertime/pull/1812)
879
890
  ### Fixed
@@ -899,7 +910,7 @@ This is pretty cool because it makes dependencies easier to install on all platf
899
910
  * Collect number of CPU longtasks before largest contentful paint [#1806](https://github.com/sitespeedio/browsertime/pull/1806).
900
911
 
901
912
  ### Fixed
902
- * Instead of throwing errors and exit the tests if the page hasn't finished loading after 5 minutes, we now gracefully ends the test after 2 minutes (you can change that time with `--maxLoadTime`). That makes more sense than just throwing errors [#1810](https://github.com/sitespeedio/browsertime/pull/1810).
913
+ * Instead of throwing errors and exit the tests if the page hasn't finished loading after 5 minutes, we now gracefully ends the test after 2 minutes (you can change that time with `--maxLoadTime`). That makes more sense than just throwing errors [#1810](https://github.com/sitespeedio/browsertime/pull/1810).
903
914
  ## 16.8.1 - 2022-06-09
904
915
  ### Fixed
905
916
  * Fix for getting the MOZ log, thank you [Gregory Mierzwinski](https://github.com/gmierz) for PR [#1802](https://github.com/sitespeedio/browsertime/pull/1802).
@@ -935,7 +946,7 @@ This is pretty cool because it makes dependencies easier to install on all platf
935
946
  * Only get LCP in Visual Metrics if the LCP API gives us a element [#1786](https://github.com/sitespeedio/browsertime/pull/1786).
936
947
  ## 16.3.0 - 2022-05-07
937
948
  ### Added
938
- * If you use `--visualElements` and the browser supports the Largest Contentful API, we also record
949
+ * If you use `--visualElements` and the browser supports the Largest Contentful API, we also record
939
950
  the LCP from the video. This will help the Chrome team and other browser teams to get it right (see [https://bugs.chromium.org/p/chromium/issues/detail?id=1291502](https://bugs.chromium.org/p/chromium/issues/detail?id=1291502)) [#1782](https://github.com/sitespeedio/browsertime/pull/1782).
940
951
 
941
952
  ## 16.2.2 - 2022-05-06
@@ -972,7 +983,7 @@ the LCP from the video. This will help the Chrome team and other browser teams t
972
983
  ### Changed
973
984
  * When I introduced flushing of the DNS per run I missed that it makes you need to run sudo to do it (Mac/Linux). That sucks so instead of being able to disable the flushing `--disableDNSFlush` you now enables it with `--flushDNS` [#1752](https://github.com/sitespeedio/browsertime/pull/1752).
974
985
 
975
- ### Added
986
+ ### Added
976
987
  * Firefox 99 in the Docker container
977
988
  * Edge and Edgedriver 100
978
989
 
@@ -998,7 +1009,7 @@ the LCP from the video. This will help the Chrome team and other browser teams t
998
1009
  * Added more view ports for emulated mobile in Chrome [#1736](https://github.com/sitespeedio/browsertime/pull/1736).
999
1010
  ## 15.1.1 - 2022-02-24
1000
1011
  ### Fixed
1001
- * Updated Chromedriver dependency that fixes installation on M1 and [some send keys issues](https://chromedriver.storage.googleapis.com/98.0.4758.102/notes.txt).
1012
+ * Updated Chromedriver dependency that fixes installation on M1 and [some send keys issues](https://chromedriver.storage.googleapis.com/98.0.4758.102/notes.txt).
1002
1013
  ## 15.1.0 - 2022-02-24
1003
1014
  ### Added
1004
1015
  * Collect timings from main document. The result includes a field named mainDocumentTimings and contains blocked, dns, connect, send, wait, receive, ssl as long as you get a HAR file from the browser [#1735](https://github.com/sitespeedio/browsertime/pull/1735).
@@ -1047,7 +1058,7 @@ the LCP from the video. This will help the Chrome team and other browser teams t
1047
1058
 
1048
1059
  ## 14.19.0 - 2022-02-02
1049
1060
 
1050
- ### Added
1061
+ ### Added
1051
1062
  * Chrome and Chromedriver 98 [#1704](https://github.com/sitespeedio/browsertime/pull/1704).
1052
1063
 
1053
1064
  ### Fixed
@@ -1079,10 +1090,10 @@ the LCP from the video. This will help the Chrome team and other browser teams t
1079
1090
  * New click by name command `click.byName(name)` [#1697](https://github.com/sitespeedio/browsertime/pull/1697).
1080
1091
 
1081
1092
  ### Fixed
1082
- * Remove the top 10 rows of the image to handle progress bars on some mobile browser recordings. Thank you [Gregory Mierzwinski](https://github.com/gmierz) for PR [#1687](https://github.com/sitespeedio/browsertime/pull/1687).
1093
+ * Remove the top 10 rows of the image to handle progress bars on some mobile browser recordings. Thank you [Gregory Mierzwinski](https://github.com/gmierz) for PR [#1687](https://github.com/sitespeedio/browsertime/pull/1687).
1083
1094
 
1084
1095
  ## 14.16.0 - 2022-01-14
1085
- ### Added
1096
+ ### Added
1086
1097
  * Upgraded Geckodriver downloader that downloads a pre-built Geckodriver on Raspberry Pis.
1087
1098
 
1088
1099
  ## 14.15.0 - 2022-01-12
@@ -1125,7 +1136,7 @@ the LCP from the video. This will help the Chrome team and other browser teams t
1125
1136
  ### Fixed
1126
1137
  * Use the viewport to determine if more cropping is needed in visual metrics. Thank you [Gregory Mierzwinski](https://github.com/gmierz) for PR [#1680](https://github.com/sitespeedio/browsertime/pull/1680).
1127
1138
  ### Added
1128
- * Updated to Selenium 4.1.0 [#1679](https://github.com/sitespeedio/browsertime/pull/1679)
1139
+ * Updated to Selenium 4.1.0 [#1679](https://github.com/sitespeedio/browsertime/pull/1679)
1129
1140
 
1130
1141
  ## 14.10.2 - 2021-11-20
1131
1142
  ### Fixed
@@ -1134,7 +1145,7 @@ the LCP from the video. This will help the Chrome team and other browser teams t
1134
1145
  ## 14.10.1 - 2021-11-19
1135
1146
  ### Fixed
1136
1147
  * Disabled the automatic Chrome/Chromedriver version check in Chromedriver [#1676](https://github.com/sitespeedio/browsertime/pull/1676).
1137
- * Loop until we find a frame with a good viewport or until we run out of retries for Visual Metrics. Thank you [Gregory Mierzwinski](https://github.com/gmierz) for PR [#1668](https://github.com/sitespeedio/browsertime/pull/1668).
1148
+ * Loop until we find a frame with a good viewport or until we run out of retries for Visual Metrics. Thank you [Gregory Mierzwinski](https://github.com/gmierz) for PR [#1668](https://github.com/sitespeedio/browsertime/pull/1668).
1138
1149
 
1139
1150
  ## 14.10.0 - 2021-11-16
1140
1151
  ### Added
@@ -1178,7 +1189,7 @@ the LCP from the video. This will help the Chrome team and other browser teams t
1178
1189
  * Log Firefox preference and Chrome args on debug level [#1654](https://github.com/sitespeedio/browsertime/pull/1654)
1179
1190
  ## 14.5.0 - 2021-09-30
1180
1191
  ### Added
1181
- * Added CSS selector support for mouse commands [#1645](https://github.com/sitespeedio/browsertime/pull/1645)
1192
+ * Added CSS selector support for mouse commands [#1645](https://github.com/sitespeedio/browsertime/pull/1645)
1182
1193
 
1183
1194
  ### Fixed
1184
1195
  * Internal refactoring of the mouse command [#1646](https://github.com/sitespeedio/browsertime/pull/1646) and [#1647](https://github.com/sitespeedio/browsertime/pull/1647).
@@ -1286,7 +1297,7 @@ romedriver 94 and Chrome 94 in the Docker container [#1643](https://github.com/s
1286
1297
  ## 12.9.1 - 2021-06-09
1287
1298
  ### Fixed
1288
1299
  * Finally a fix for driving Safari on iOS. Start/stop the Safaridriver manually, see [#1596](https://github.com/sitespeedio/browsertime/pull/1596). Video on iOS is broken though, see if we can find a fix for that too.
1289
- * Upgrade to use Selenium-4.0.0-beta.4 [#1592](https://github.com/sitespeedio/browsertime/pull/1592) and updated throttle, dayjs, execa and chrome-remote-interface to run latest versions [#1594](https://github.com/sitespeedio/browsertime/pull/1594).
1300
+ * Upgrade to use Selenium-4.0.0-beta.4 [#1592](https://github.com/sitespeedio/browsertime/pull/1592) and updated throttle, dayjs, execa and chrome-remote-interface to run latest versions [#1594](https://github.com/sitespeedio/browsertime/pull/1594).
1290
1301
  ## 12.9.0 - 2021-06-04
1291
1302
 
1292
1303
  ### Added
@@ -1388,9 +1399,9 @@ A special thanks to [Inderpartap Singh Cheema](https://github.com/inderpartap),
1388
1399
  * New metrics: Delta between TTFB and First Contentful Paint, Largest Contentful paint and First visual change [#1528](https://github.com/sitespeedio/browsertime/pull/1528). You can use this if you have unstable TTFB and want to alert on front end metrics. Lets see when other also implement this :)
1389
1400
  * Made it easier for people to get Google Web Vitals. We copy that data under the googleWebVitals namespace in the result JSON [#1521](https://github.com/sitespeedio/browsertime/pull/1521).
1390
1401
  * Added TTFB as a single metric [#1522](https://github.com/sitespeedio/browsertime/pull/1522).
1391
- * New stop watch command [#1512](https://github.com/sitespeedio/browsertime/pull/1512). Measure time by:
1392
- ```const timer = commands.stopWatch.get('my_timer');
1393
- timer.start();
1402
+ * New stop watch command [#1512](https://github.com/sitespeedio/browsertime/pull/1512). Measure time by:
1403
+ ```const timer = commands.stopWatch.get('my_timer');
1404
+ timer.start();
1394
1405
  // Do something
1395
1406
  // Stop the timer and add the result to the last tested URL
1396
1407
  timer.stopAndAdd();
@@ -1451,8 +1462,8 @@ A special thanks to [Inderpartap Singh Cheema](https://github.com/inderpartap),
1451
1462
 
1452
1463
  ## 11.2.0 - 2021-01-24
1453
1464
  ### Added
1454
- * Make it possible to listen to CDP events in scripting [#1473](https://github.com/sitespeedio/browsertime/pull/1473). There's a new command in scripting (for browsers that supports it): ```commands.cdp.on```. Here's an example to pickup all responses for a page :
1455
- ```
1465
+ * Make it possible to listen to CDP events in scripting [#1473](https://github.com/sitespeedio/browsertime/pull/1473). There's a new command in scripting (for browsers that supports it): ```commands.cdp.on```. Here's an example to pickup all responses for a page :
1466
+ ```
1456
1467
  const responses = [];
1457
1468
  await commands.cdp.on('Network.responseReceived', params => {
1458
1469
  responses.push(params);
@@ -1462,7 +1473,7 @@ A special thanks to [Inderpartap Singh Cheema](https://github.com/inderpartap),
1462
1473
  ```
1463
1474
  ## 11.1.2 - 2021-01-20
1464
1475
  ### Fixed
1465
- * The last release didn't fix the problem when browsertime do not collect metrics.
1476
+ * The last release didn't fix the problem when browsertime do not collect metrics.
1466
1477
  ## 11.1.1 - 2021-01-20
1467
1478
  ### Fixed
1468
1479
  * Added a guard if we do not collect any metrics [#1472](https://github.com/sitespeedio/browsertime/pull/1472).
@@ -1481,7 +1492,7 @@ A special thanks to [Inderpartap Singh Cheema](https://github.com/inderpartap),
1481
1492
  * Setting path to Edge was broken, use `--edge.binaryPath` to point out the path to your Edge binary [#1461](https://github.com/sitespeedio/browsertime/pull/1461).
1482
1493
  ## 11.0.0 - 2020-12-18
1483
1494
  ### Changed
1484
- * Record and keep the browser full screen (including URL bar) [#1435](https://github.com/sitespeedio/browsertime/pull/1435). All metrics should stay the same with this change but the video and the code will be easier :) When we implemented video a long time ago we wanted to cut out the URL bar but it made it harder to keep the video to look ok on different OS.
1495
+ * Record and keep the browser full screen (including URL bar) [#1435](https://github.com/sitespeedio/browsertime/pull/1435). All metrics should stay the same with this change but the video and the code will be easier :) When we implemented video a long time ago we wanted to cut out the URL bar but it made it harder to keep the video to look ok on different OS.
1485
1496
  * Say goodbye to RUM Speed Index [#1439](https://github.com/sitespeedio/browsertime/pull/1439).
1486
1497
  * Domain name on disk now uses underscore instead of dots in the name [#1445](https://github.com/sitespeedio/browsertime/pull/1445).
1487
1498
  * Click the Android power button at the start of each test (instead of the home button [#1447](https://github.com/sitespeedio/browsertime/pull/1447).
@@ -1497,7 +1508,7 @@ A special thanks to [Inderpartap Singh Cheema](https://github.com/inderpartap),
1497
1508
  * Add support using alias from CLI and use alias as folder name on disk [#1443](https://github.com/sitespeedio/browsertime/pull/1443).
1498
1509
  * New option to store a more flat structure on disk converting the path part of the URL to one folder `--storeURLsAsFlatPageOnDisk`[#1450](https://github.com/sitespeedio/browsertime/pull/1450)
1499
1510
  * Updated to Selenium 4.0.0-alpha.8 [#1451](https://github.com/sitespeedio/browsertime/pull/1451).
1500
- * Updated to Firefox 84 in the Docker container.
1511
+ * Updated to Firefox 84 in the Docker container.
1501
1512
  * Updated to Edgedriver 87
1502
1513
  * Added Edge in the Docker container [#1458](https://github.com/sitespeedio/browsertime/pull/1458).
1503
1514
 
@@ -1509,12 +1520,12 @@ A special thanks to [Inderpartap Singh Cheema](https://github.com/inderpartap),
1509
1520
  ### Fixed
1510
1521
  * The browsertime.json always included Firefox appConstants and the geckoprofiler JSON missed out on Visual Metrics, fixed in [#1434](https://github.com/sitespeedio/browsertime/pull/1434).
1511
1522
  ## 10.8.0 - 2020-11-18
1512
- ### Added
1523
+ ### Added
1513
1524
  * Updated to Firefox 83 in the Docker container.
1514
1525
  * Updated Chrome and Chromedriver to 87.
1515
1526
  ## 10.7.0 - 2020-11-16
1516
1527
  ### Added
1517
- * Add page generator tag to the HAR file [#1430](https://github.com/sitespeedio/browsertime/pull/1430)
1528
+ * Add page generator tag to the HAR file [#1430](https://github.com/sitespeedio/browsertime/pull/1430)
1518
1529
 
1519
1530
  ### Fixed
1520
1531
  * Reverted to Geckodrover 0.27.0 since 0.28.0 cannot start Firefox on Android [#1431](https://github.com/sitespeedio/browsertime/pull/1431).
@@ -1583,7 +1594,7 @@ A special thanks to [Inderpartap Singh Cheema](https://github.com/inderpartap),
1583
1594
  ## 10.1.0 - 2020-09-22
1584
1595
 
1585
1596
  ### Added
1586
- * Extra love for running tests in Android: Press the home button at the start of a test, verify that the phone state is "device" before starting to test (no need to run tests on offline devices) and
1597
+ * Extra love for running tests in Android: Press the home button at the start of a test, verify that the phone state is "device" before starting to test (no need to run tests on offline devices) and
1587
1598
  added possibility to verify the internet connection on the device through ping (enable with `--androidVerifyNetwork`) [#1386](https://github.com/sitespeedio/browsertime/pull/1386).
1588
1599
 
1589
1600
  ### Fixed
@@ -1610,7 +1621,7 @@ The new 10.0 release mostly include technical changes that will make it easier f
1610
1621
  ### Tech
1611
1622
  * Making a better structure for each browser, so its more understandable when you can run browser specific code. The old browser delegate (now only browser name) has the newly named functions:
1612
1623
  * beforeBrowserStart
1613
- * afterBrowserStart
1624
+ * afterBrowserStart
1614
1625
  * beforeStartIteration
1615
1626
  * beforeEachURL
1616
1627
  * afterPageCompleteCheck
@@ -1619,7 +1630,7 @@ The new 10.0 release mostly include technical changes that will make it easier f
1619
1630
  * getHARs
1620
1631
  * beforeBrowserStop
1621
1632
 
1622
- This makes it easier to make sure when to collect metrics, stop trace logs and do whatever you need. Implemented in [#1348](https://github.com/sitespeedio/browsertime/pull/1348) and [#1367](https://github.com/sitespeedio/browsertime/pull/1367).
1633
+ This makes it easier to make sure when to collect metrics, stop trace logs and do whatever you need. Implemented in [#1348](https://github.com/sitespeedio/browsertime/pull/1348) and [#1367](https://github.com/sitespeedio/browsertime/pull/1367).
1623
1634
 
1624
1635
  * New structure for browser, trying to decrease line of code per file and making it easier to navigate the code and prepare for adding support for other browser drivers than Selenium [#1354](https://github.com/sitespeedio/browsertime/pull/1354) [#1355](https://github.com/sitespeedio/browsertime/pull/1355) [#1356](https://github.com/sitespeedio/browsertime/pull/1356).
1625
1636
 
@@ -1723,7 +1734,7 @@ This makes it easier to make sure when to collect metrics, stop trace logs and d
1723
1734
 
1724
1735
  ## 8.12.1 - 2020-05-19
1725
1736
  ### Fixed
1726
- * Fixed so metrics in the CLI always shows two decimals [#1282](https://github.com/sitespeedio/browsertime/pull/1282).
1737
+ * Fixed so metrics in the CLI always shows two decimals [#1282](https://github.com/sitespeedio/browsertime/pull/1282).
1727
1738
  * Adopt the rename of layout-instability-api to CLS and remove report in percentage since it do not make sense [#1283](https://github.com/sitespeedio/browsertime/pull/1283) and [#1284](https://github.com/sitespeedio/browsertime/pull/1284).
1728
1739
 
1729
1740
  ## 8.12.0 - 2020-05-12
@@ -1819,7 +1830,7 @@ All work in [#1234](https://github.com/sitespeedio/browsertime/pull/1234) and [#
1819
1830
  ## 8.3.0 - 2020-03-20
1820
1831
  ### Added
1821
1832
  * Upgraded from selenium-4.0.0-alpha.5 to selenium-4.0.0-alpha.7 [#1221](https://github.com/sitespeedio/browsertime/pull/1221).
1822
- * Added supported for unified scripts Thank you [Tarek Ziade](https://github.com/tarekziade) for the PR [#1220](https://github.com/sitespeedio/browsertime/pull/1220). Checkout [#1216](https://github.com/sitespeedio/browsertime/issues/1216) for more info.
1833
+ * Added supported for unified scripts Thank you [Tarek Ziade](https://github.com/tarekziade) for the PR [#1220](https://github.com/sitespeedio/browsertime/pull/1220). Checkout [#1216](https://github.com/sitespeedio/browsertime/issues/1216) for more info.
1823
1834
 
1824
1835
  ### Fixed
1825
1836
  * Running Chrome in emulated mobile mode sometimes picked up Chromes info bar as First Visual Change. The default bottom margin was changed from 10 pixels to 16 pixels [#1224](https://github.com/sitespeedio/browsertime/pull/1224).
@@ -1871,7 +1882,7 @@ All work in [#1234](https://github.com/sitespeedio/browsertime/pull/1234) and [#
1871
1882
 
1872
1883
  Woho Browsertime 8.0.0 is here!
1873
1884
 
1874
- There's a lot of new things in 8.0.0. First: A big THANK YOU to all the people at Mozilla that have contributed with all the new stuff:
1885
+ There's a lot of new things in 8.0.0. First: A big THANK YOU to all the people at Mozilla that have contributed with all the new stuff:
1875
1886
  * [Nick Alexander](https://github.com/ncalexan)
1876
1887
  * [Denis Palmeiro](https://github.com/dpalmeiro)
1877
1888
  * [Sean Feng](https://github.com/sefeng211)
@@ -1881,7 +1892,7 @@ There's a lot of new things in 8.0.0. First: A big THANK YOU to all the people a
1881
1892
  * [Tarek Ziade](https://github.com/tarekziade)
1882
1893
  * [Gregory Mierzwinski](https://github.com/gmierz)
1883
1894
 
1884
- Major new things:
1895
+ Major new things:
1885
1896
  * You can collect CPU profiles from Firefox with `--firefox.geckoProfiler` and view them at https://profiler.firefox.com !
1886
1897
  * You can run Firefox on Android!
1887
1898
  * Now the window recorder for Firefox works great. That means you can record a video of the loading of your page without using FFMPEG. Add `--firefox.windowRecorder` and `-video`to your run.
@@ -1905,7 +1916,7 @@ Lets go through all the new things. There's a couple things that changes:
1905
1916
  * Start Firefox with a new profile cloned from a directory. Use this to pre-populate databases with
1906
1917
  certificateY, tracking protectionlists etc `--firefox.profileTemplate`.
1907
1918
  * Fixes so `--firefox.windowRecorder` works better (use it to record a video of the screen).
1908
- * You can now choose the Activity hosting the Chrome WebView on Android using `--chrome.android.activity`. You can also name the process of the Activity hosting the WebView using `--chrome.android.process`.
1919
+ * You can now choose the Activity hosting the Chrome WebView on Android using `--chrome.android.activity`. You can also name the process of the Activity hosting the WebView using `--chrome.android.process`.
1909
1920
  * Move visualmetrics.py to a python package [#1148](https://github.com/sitespeedio/browsertime/pull/1148) - thank you [Tarek Ziade](https://github.com/tarekziade)!
1910
1921
  * Run Safari on iOS with just `-b safari --ios` [#1141](https://github.com/sitespeedio/browsertime/pull/1141)
1911
1922
  * Enable verbose Chromedriver logging with `--chrome.enableVerboseChromeDriverLog` [#1152](https://github.com/sitespeedio/browsertime/pull/1152)
@@ -1927,9 +1938,9 @@ Lets go through all the new things. There's a couple things that changes:
1927
1938
 
1928
1939
  ### Fixed
1929
1940
  * Ignore certificate errors by default when we record with WPR [#1150](https://github.com/sitespeedio/browsertime/pull/1150)
1930
- * If Visual Metrics failed, the original error wasn't there in the log. Fixed by [#1149](https://github.com/sitespeedio/browsertime/pull/1149)
1941
+ * If Visual Metrics failed, the original error wasn't there in the log. Fixed by [#1149](https://github.com/sitespeedio/browsertime/pull/1149)
1931
1942
  * Fix so the devtools port is added only one time on Android [#1145](https://github.com/sitespeedio/browsertime/pull/1145)
1932
- * If Visual Metrics fails, let produce an error that ends up in the JSON [#1147](https://github.com/sitespeedio/browsertime/pull/1147)
1943
+ * If Visual Metrics fails, let produce an error that ends up in the JSON [#1147](https://github.com/sitespeedio/browsertime/pull/1147)
1933
1944
  * Cleanup WPR code to use default page complete check [#1143](https://github.com/sitespeedio/browsertime/pull/1143)
1934
1945
  * CDP bug when scripting, fixed in [#1153](https://github.com/sitespeedio/browsertime/pull/1153)
1935
1946
  * If navigation never happens, make sure we log what's going on and fail hard by throwing an error [#1130](https://github.com/sitespeedio/browsertime/pull/1130).
@@ -191,23 +191,29 @@ export function addCreator(har, comment) {
191
191
  return har;
192
192
  }
193
193
  export function getMainDocumentTimings(har) {
194
- const timings = [];
195
- const entries = [...har.log.entries];
194
+ // Sometimes the HAR is dirty
195
+ try {
196
+ const timings = [];
197
+ const entries = [...har.log.entries];
196
198
 
197
- for (let page of har.log.pages) {
198
- const pageId = page.id;
199
- const url = page._url;
199
+ for (let page of har.log.pages) {
200
+ const pageId = page.id;
201
+ const url = page._url;
200
202
 
201
- let pageEntries = [...entries];
202
- const finalURL = getFinalURL(pageEntries, pageId);
203
+ let pageEntries = [...entries];
204
+ const finalURL = getFinalURL(pageEntries, pageId);
203
205
 
204
- pageEntries = pageEntries.filter(
205
- entry => entry.pageref === pageId && entry.request.url === finalURL
206
- );
206
+ pageEntries = pageEntries.filter(
207
+ entry => entry.pageref === pageId && entry.request.url === finalURL
208
+ );
207
209
 
208
- timings.push({ url, timings: pageEntries[0].timings });
210
+ timings.push({ url, timings: pageEntries[0].timings });
211
+ }
212
+ return timings;
213
+ } catch (error) {
214
+ log.error('Could not get main document timings ' + error);
215
+ return [];
209
216
  }
210
- return timings;
211
217
  }
212
218
  export function getFullyLoaded(har) {
213
219
  const fullyLoaded = [];
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "browsertime",
3
3
  "description": "Get performance metrics from your web page using Browsertime.",
4
- "version": "24.8.2",
4
+ "version": "24.9.0",
5
5
  "bin": "./bin/browsertime.js",
6
6
  "type": "module",
7
7
  "types": "./types/scripting.d.ts",
8
8
  "dependencies": {
9
9
  "@devicefarmer/adbkit": "3.3.8",
10
- "@sitespeed.io/chromedriver": "137.0.7151-55",
11
- "@sitespeed.io/edgedriver": "137.0.3296-52",
10
+ "@sitespeed.io/chromedriver": "138.0.7204-49",
11
+ "@sitespeed.io/edgedriver": "138.0.3351-55",
12
12
  "@sitespeed.io/geckodriver": "0.36.0",
13
13
  "@sitespeed.io/log": "0.2.6",
14
14
  "@sitespeed.io/throttle": "5.0.1",
@@ -19,7 +19,7 @@
19
19
  "fast-stats": "0.0.7",
20
20
  "ff-test-bidi-har-export": "0.0.17",
21
21
  "lodash.merge": "4.6.2",
22
- "selenium-webdriver": "4.33.0",
22
+ "selenium-webdriver": "4.34.0",
23
23
  "yargs": "17.7.2"
24
24
  },
25
25
  "optionalDependencies": {