browsertime 16.11.4 → 16.13.1
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,27 @@
|
|
|
1
1
|
# Browsertime changelog (we do [semantic versioning](https://semver.org))
|
|
2
2
|
|
|
3
|
+
## 16.13.1 - 2022-08-10
|
|
4
|
+
### Fixed
|
|
5
|
+
* Make sure that Android id is always picked up from the phone if tests run on Android [#1826](https://github.com/sitespeedio/browsertime/pull/1826).
|
|
6
|
+
|
|
7
|
+
## 16.13.0 - 2022-08-08
|
|
8
|
+
### Added
|
|
9
|
+
* Upgraded to Edgedriver 104.
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
* Upgraded to Selenium 4.3.1 [#1824](https://github.com/sitespeedio/browsertime/pull/1824).
|
|
13
|
+
* Upgraded Chrome reomte interface to 0.31.3 [#1825](https://github.com/sitespeedio/browsertime/pull/1825)
|
|
14
|
+
## 16.12.0 - 2022-08-06
|
|
15
|
+
### Added
|
|
16
|
+
* Upgraded to Chrome 104, Edge 104, Firefox 103 in the Docker container.
|
|
17
|
+
* Upgraded to Chromedriver 104.
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
* Remove old Firefox on Android workaround for orange frame [#1821](https://github.com/sitespeedio/browsertime/pull/1821), thank you [Sean Feng](https://github.com/sefeng211) for the PR.
|
|
21
|
+
|
|
3
22
|
## 16.11.4 - 2022-07-17
|
|
4
23
|
### Fixed
|
|
5
|
-
* Automatically add white
|
|
24
|
+
* Automatically add white background between --preURL and the URL that you wanna test. This makes visual metrics usable when using preURL. [#1819](https://github.com/sitespeedio/browsertime/pull/1819)
|
|
6
25
|
|
|
7
26
|
## 16.11.3 - 2022-07-14
|
|
8
27
|
|
package/lib/android/index.js
CHANGED
|
@@ -161,13 +161,16 @@ class Android {
|
|
|
161
161
|
const name = (await adb.util.readAll(rawName)).toString().trim();
|
|
162
162
|
const rawDevice = await this._runCommand(`getprop ro.product.device`);
|
|
163
163
|
const device = (await adb.util.readAll(rawDevice)).toString().trim();
|
|
164
|
+
const rawId = await this._runCommand(`getprop ro.serialno`);
|
|
165
|
+
const id = (await adb.util.readAll(rawId)).toString().trim();
|
|
166
|
+
|
|
164
167
|
const rawRelease = await this._runCommand(
|
|
165
168
|
`getprop ro.build.version.release `
|
|
166
169
|
);
|
|
167
170
|
const androidVersion = (await adb.util.readAll(rawRelease))
|
|
168
171
|
.toString()
|
|
169
172
|
.trim();
|
|
170
|
-
return { model, name, device, androidVersion };
|
|
173
|
+
return { model, name, device, androidVersion, id };
|
|
171
174
|
}
|
|
172
175
|
|
|
173
176
|
async pullNetLog(destination) {
|
|
@@ -8,7 +8,6 @@ const isEmpty = require('lodash.isempty');
|
|
|
8
8
|
const get = require('lodash.get');
|
|
9
9
|
const setupChromiumOptions = require('./setupChromiumOptions');
|
|
10
10
|
|
|
11
|
-
let hasConfiguredChromeDriverService = false;
|
|
12
11
|
/**
|
|
13
12
|
* Configure a WebDriver builder based on the specified options.
|
|
14
13
|
* @param builder
|
|
@@ -17,34 +16,31 @@ let hasConfiguredChromeDriverService = false;
|
|
|
17
16
|
module.exports.configureBuilder = function (builder, baseDir, options) {
|
|
18
17
|
const chromeConfig = options.chrome || {};
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
chromedriverPath = chromedriver.binPath();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const serviceBuilder = new chrome.ServiceBuilder(chromedriverPath);
|
|
28
|
-
|
|
29
|
-
// Remove the check that matches the Chromedriver version with Chrome version.
|
|
30
|
-
serviceBuilder.addArguments('--disable-build-check');
|
|
31
|
-
|
|
32
|
-
if (options.chrome && options.chrome.chromedriverPort) {
|
|
33
|
-
serviceBuilder.setPort(options.chrome.chromedriverPort);
|
|
34
|
-
}
|
|
35
|
-
if (
|
|
36
|
-
options.verbose >= 2 ||
|
|
37
|
-
chromeConfig.enableChromeDriverLog ||
|
|
38
|
-
chromeConfig.enableVerboseChromeDriverLog
|
|
39
|
-
) {
|
|
40
|
-
serviceBuilder.loggingTo(`${baseDir}/chromedriver.log`);
|
|
41
|
-
if (options.verbose >= 3 || chromeConfig.enableVerboseChromeDriverLog)
|
|
42
|
-
serviceBuilder.enableVerboseLogging();
|
|
43
|
-
}
|
|
44
|
-
chrome.setDefaultService(serviceBuilder.build());
|
|
45
|
-
hasConfiguredChromeDriverService = true;
|
|
19
|
+
let chromedriverPath = get(chromeConfig, 'chromedriverPath');
|
|
20
|
+
if (!chromedriverPath) {
|
|
21
|
+
const chromedriver = require('@sitespeed.io/chromedriver');
|
|
22
|
+
chromedriverPath = chromedriver.binPath();
|
|
46
23
|
}
|
|
47
24
|
|
|
25
|
+
const serviceBuilder = new chrome.ServiceBuilder(chromedriverPath);
|
|
26
|
+
|
|
27
|
+
// Remove the check that matches the Chromedriver version with Chrome version.
|
|
28
|
+
serviceBuilder.addArguments('--disable-build-check');
|
|
29
|
+
|
|
30
|
+
if (options.chrome && options.chrome.chromedriverPort) {
|
|
31
|
+
serviceBuilder.setPort(options.chrome.chromedriverPort);
|
|
32
|
+
}
|
|
33
|
+
if (
|
|
34
|
+
options.verbose >= 2 ||
|
|
35
|
+
chromeConfig.enableChromeDriverLog ||
|
|
36
|
+
chromeConfig.enableVerboseChromeDriverLog
|
|
37
|
+
) {
|
|
38
|
+
serviceBuilder.loggingTo(`${baseDir}/chromedriver.log`);
|
|
39
|
+
if (options.verbose >= 3 || chromeConfig.enableVerboseChromeDriverLog)
|
|
40
|
+
serviceBuilder.enableVerboseLogging();
|
|
41
|
+
}
|
|
42
|
+
builder.setChromeService(serviceBuilder);
|
|
43
|
+
|
|
48
44
|
const proxyPacSettings = pick(options.proxy, ['pac']);
|
|
49
45
|
|
|
50
46
|
if (!isEmpty(proxyPacSettings)) {
|
|
@@ -2,49 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
const log = require('intel').getLogger('browsertime.video');
|
|
4
4
|
const { until, By } = require('selenium-webdriver');
|
|
5
|
-
module.exports = async function (driver
|
|
5
|
+
module.exports = async function (driver) {
|
|
6
6
|
log.debug('Add orange color');
|
|
7
7
|
// We tried other ways for Android (access an orange page)
|
|
8
8
|
// That works fine ... but break scripts
|
|
9
9
|
// https://github.com/sitespeedio/browsertime/issues/802
|
|
10
|
-
|
|
11
|
-
let orangeScript = '';
|
|
12
|
-
|
|
13
|
-
if (options.android && options.browser === 'firefox') {
|
|
14
|
-
orangeScript = `
|
|
15
|
-
(function() {
|
|
16
|
-
// Adding this extra layer of white frame fixes
|
|
17
|
-
// https://bugzilla.mozilla.org/show_bug.cgi?id=1606365
|
|
18
|
-
// Not clear why it fixes this bug, looks like when
|
|
19
|
-
// WebRender is enabled, orange frame isn't being
|
|
20
|
-
// removed correctly if it's the only element
|
|
21
|
-
// in the document.
|
|
22
|
-
const white = document.createElement('div');
|
|
23
|
-
white.id = 'browsertime-white';
|
|
24
|
-
white.style.position = 'absolute';
|
|
25
|
-
white.style.top = '0';
|
|
26
|
-
white.style.left = '0';
|
|
27
|
-
white.style.width = Math.max(document.documentElement.clientWidth, document.body.clientWidth) + 'px';
|
|
28
|
-
white.style.height = Math.max(document.documentElement.clientHeight,document.body.clientHeight) + 'px';
|
|
29
|
-
white.style.backgroundColor = 'white';
|
|
30
|
-
white.style.zIndex = '2147483647';
|
|
31
|
-
document.body.appendChild(white);
|
|
32
|
-
document.body.style.display = '';
|
|
33
|
-
|
|
34
|
-
const orange = document.createElement('div');
|
|
35
|
-
orange.id = 'browsertime-orange';
|
|
36
|
-
orange.style.position = 'absolute';
|
|
37
|
-
orange.style.top = '0';
|
|
38
|
-
orange.style.left = '0';
|
|
39
|
-
orange.style.width = Math.max(document.documentElement.clientWidth, document.body.clientWidth) + 'px';
|
|
40
|
-
orange.style.height = Math.max(document.documentElement.clientHeight,document.body.clientHeight) + 'px';
|
|
41
|
-
orange.style.backgroundColor = '#DE640D';
|
|
42
|
-
orange.style.zIndex = '2147483647';
|
|
43
|
-
document.body.appendChild(orange);
|
|
44
|
-
document.body.style.display = '';
|
|
45
|
-
})();`;
|
|
46
|
-
} else {
|
|
47
|
-
orangeScript = `
|
|
10
|
+
const orangeScript = `
|
|
48
11
|
(function() {
|
|
49
12
|
const orange = document.createElement('div');
|
|
50
13
|
orange.id = 'browsertime-orange';
|
|
@@ -59,7 +22,6 @@ module.exports = async function (driver, options) {
|
|
|
59
22
|
document.body.appendChild(orange);
|
|
60
23
|
document.body.style.display = '';
|
|
61
24
|
})();`;
|
|
62
|
-
}
|
|
63
25
|
|
|
64
26
|
await driver.executeScript(orangeScript);
|
|
65
27
|
// It seems that in some cases the video do not have any orange at the start, so make sure we
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"description": "Browsertime",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.13.1",
|
|
4
4
|
"bin": "./bin/browsertime.js",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@cypress/xvfb": "1.2.4",
|
|
7
7
|
"@devicefarmer/adbkit": "2.11.3",
|
|
8
|
-
"@sitespeed.io/chromedriver": "
|
|
9
|
-
"@sitespeed.io/edgedriver": "
|
|
8
|
+
"@sitespeed.io/chromedriver": "104.0.5112-29",
|
|
9
|
+
"@sitespeed.io/edgedriver": "104.0.1293-47",
|
|
10
10
|
"@sitespeed.io/geckodriver": "0.31.0-c",
|
|
11
11
|
"@sitespeed.io/throttle": "4.0.1",
|
|
12
12
|
"@sitespeed.io/tracium": "0.3.3",
|
|
13
13
|
"btoa": "1.2.1",
|
|
14
14
|
"chrome-har": "0.13.0",
|
|
15
|
-
"chrome-remote-interface": "0.31.
|
|
15
|
+
"chrome-remote-interface": "0.31.3",
|
|
16
16
|
"dayjs": "1.11.1",
|
|
17
17
|
"execa": "5.1.1",
|
|
18
18
|
"fast-stats": "0.0.6",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"lodash.merge": "4.6.2",
|
|
27
27
|
"lodash.pick": "4.4.0",
|
|
28
28
|
"lodash.set": "4.3.2",
|
|
29
|
-
"selenium-webdriver": "4.3.
|
|
29
|
+
"selenium-webdriver": "4.3.1",
|
|
30
30
|
"yargs": "17.4.1"
|
|
31
31
|
},
|
|
32
32
|
"optionalDependencies": {
|