Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@applitools/driver

Package Overview
Dependencies
Maintainers
24
Versions
216
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applitools/driver - npm Package Compare versions

Comparing version 1.4.13 to 1.4.14

7

CHANGELOG.md

@@ -6,2 +6,9 @@ # Change Log

## 1.4.14 - 2022/2/15
- add `viewportScale` getter to `Driver` class
- updated to @applitools/snippets@2.1.13 (from 2.1.12)
- updated to @applitools/types@1.0.25 (from 1.0.24)
- updated to @applitools/utils@1.2.13 (from 1.2.12)
## 1.4.13 - 2022/2/10

@@ -8,0 +15,0 @@

37

dist/driver.js

@@ -102,2 +102,6 @@ "use strict";

}
get viewportScale() {
var _a;
return (_a = this._driverInfo.viewportScale) !== null && _a !== void 0 ? _a : 1;
}
get statusBarHeight() {

@@ -138,4 +142,4 @@ var _a;

async init() {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
var _v, _w, _x, _y, _z, _0, _1;
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
var _w, _x, _y, _z, _0, _1, _2, _3;
const capabilities = await ((_b = (_a = this._spec).getCapabilities) === null || _b === void 0 ? void 0 : _b.call(_a, this.target));

@@ -147,22 +151,23 @@ this._logger.log('Driver capabilities', capabilities);

if (this.isWeb) {
(_e = (_v = this._driverInfo).pixelRatio) !== null && _e !== void 0 ? _e : (_v.pixelRatio = await this.execute(snippets.getPixelRatio));
(_f = (_w = this._driverInfo).userAgent) !== null && _f !== void 0 ? _f : (_w.userAgent = await this.execute(snippets.getUserAgent));
(_e = (_w = this._driverInfo).pixelRatio) !== null && _e !== void 0 ? _e : (_w.pixelRatio = await this.execute(snippets.getPixelRatio));
(_f = (_x = this._driverInfo).viewportScale) !== null && _f !== void 0 ? _f : (_x.viewportScale = await this.execute(snippets.getViewportScale));
(_g = (_y = this._driverInfo).userAgent) !== null && _g !== void 0 ? _g : (_y.userAgent = await this.execute(snippets.getUserAgent));
if (this._driverInfo.userAgent) {
const userAgentInfo = user_agent_1.parseUserAgent(this._driverInfo.userAgent);
this._driverInfo.browserName = (_g = userAgentInfo.browserName) !== null && _g !== void 0 ? _g : this._driverInfo.browserName;
this._driverInfo.browserVersion = (_h = userAgentInfo.browserVersion) !== null && _h !== void 0 ? _h : this._driverInfo.browserVersion;
this._driverInfo.browserName = (_h = userAgentInfo.browserName) !== null && _h !== void 0 ? _h : this._driverInfo.browserName;
this._driverInfo.browserVersion = (_j = userAgentInfo.browserVersion) !== null && _j !== void 0 ? _j : this._driverInfo.browserVersion;
if (this._driverInfo.isMobile) {
(_j = (_x = this._driverInfo).platformName) !== null && _j !== void 0 ? _j : (_x.platformName = userAgentInfo.platformName);
(_k = (_y = this._driverInfo).platformVersion) !== null && _k !== void 0 ? _k : (_y.platformVersion = userAgentInfo.platformVersion);
(_k = (_z = this._driverInfo).platformName) !== null && _k !== void 0 ? _k : (_z.platformName = userAgentInfo.platformName);
(_l = (_0 = this._driverInfo).platformVersion) !== null && _l !== void 0 ? _l : (_0.platformVersion = userAgentInfo.platformVersion);
}
else {
this._driverInfo.platformName = (_l = userAgentInfo.platformName) !== null && _l !== void 0 ? _l : this._driverInfo.platformName;
this._driverInfo.platformVersion = (_m = userAgentInfo.platformVersion) !== null && _m !== void 0 ? _m : this._driverInfo.platformVersion;
this._driverInfo.platformName = (_m = userAgentInfo.platformName) !== null && _m !== void 0 ? _m : this._driverInfo.platformName;
this._driverInfo.platformVersion = (_o = userAgentInfo.platformVersion) !== null && _o !== void 0 ? _o : this._driverInfo.platformVersion;
}
}
(_o = (_z = this._driverInfo).features) !== null && _o !== void 0 ? _o : (_z.features = {});
(_p = (_0 = this._driverInfo.features).allCookies) !== null && _p !== void 0 ? _p : (_0.allCookies = /chrome/i.test(this._driverInfo.browserName) && !this._driverInfo.isMobile);
(_p = (_1 = this._driverInfo).features) !== null && _p !== void 0 ? _p : (_1.features = {});
(_q = (_2 = this._driverInfo.features).allCookies) !== null && _q !== void 0 ? _q : (_2.allCookies = /chrome/i.test(this._driverInfo.browserName) && !this._driverInfo.isMobile);
}
else {
const barsHeight = await ((_r = (_q = this._spec).getBarsHeight) === null || _r === void 0 ? void 0 : _r.call(_q, this.target).catch(() => undefined));
const barsHeight = await ((_s = (_r = this._spec).getBarsHeight) === null || _s === void 0 ? void 0 : _s.call(_r, this.target).catch(() => undefined));
const displaySize = await this.getDisplaySize();

@@ -173,5 +178,5 @@ // calculate status and navigation bars sizes

if (this.isAndroid && barsHeight.statusBarHeight / this.pixelRatio < displaySize.height) {
this._driverInfo.statusBarHeight = Math.max((_s = this._driverInfo.statusBarHeight) !== null && _s !== void 0 ? _s : 0, barsHeight.statusBarHeight);
this._driverInfo.statusBarHeight = Math.max((_t = this._driverInfo.statusBarHeight) !== null && _t !== void 0 ? _t : 0, barsHeight.statusBarHeight);
}
this._driverInfo.navigationBarHeight = Math.max((_t = this._driverInfo.navigationBarHeight) !== null && _t !== void 0 ? _t : 0, barsHeight.navigationBarHeight);
this._driverInfo.navigationBarHeight = Math.max((_u = this._driverInfo.navigationBarHeight) !== null && _u !== void 0 ? _u : 0, barsHeight.navigationBarHeight);
}

@@ -212,3 +217,3 @@ if (this.isAndroid) {

if (this.isMobile) {
(_u = (_1 = this._driverInfo).orientation) !== null && _u !== void 0 ? _u : (_1.orientation = await this.getOrientation().catch(() => undefined));
(_v = (_3 = this._driverInfo).orientation) !== null && _v !== void 0 ? _v : (_3.orientation = await this.getOrientation().catch(() => undefined));
}

@@ -215,0 +220,0 @@ this._logger.log('Combined driver info', this._driverInfo);

{
"name": "@applitools/driver",
"version": "1.4.13",
"version": "1.4.14",
"description": "Applitools universal framework wrapper",

@@ -76,5 +76,5 @@ "keywords": [

"dependencies": {
"@applitools/snippets": "2.1.12",
"@applitools/types": "1.0.24",
"@applitools/utils": "1.2.12"
"@applitools/snippets": "2.1.13",
"@applitools/types": "1.0.25",
"@applitools/utils": "1.2.13"
},

@@ -81,0 +81,0 @@ "devDependencies": {

@@ -37,2 +37,3 @@ /// <reference types="node" />

get pixelRatio(): number;
get viewportScale(): number;
get statusBarHeight(): number;

@@ -39,0 +40,0 @@ get navigationBarHeight(): number;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc