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

@applitools/driver

Package Overview
Dependencies
Maintainers
56
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.18.0 to 1.19.0

13

CHANGELOG.md
# Changelog
## [1.19.0](https://github.com/Applitools-Dev/sdk/compare/js/driver@1.18.0...js/driver@1.19.0) (2024-09-10)
### Features
* add support for env var APPLITOOLS_IS_IC ([#2469](https://github.com/Applitools-Dev/sdk/issues/2469)) ([87d7b5c](https://github.com/Applitools-Dev/sdk/commit/87d7b5cc1f7ea774c6b90504e85296f0681d0b1e))
### Bug Fixes
* handle userAgent.brands returned as string ([#2453](https://github.com/Applitools-Dev/sdk/issues/2453)) ([dd6328b](https://github.com/Applitools-Dev/sdk/commit/dd6328be3e7d885714124a8e43aabaae3abecde9))
* searching for scrollable element multiple times ([#2493](https://github.com/Applitools-Dev/sdk/issues/2493)) ([d98db80](https://github.com/Applitools-Dev/sdk/commit/d98db8016c6312f467f244444c6f1a87bc09b7da))
## [1.18.0](https://github.com/Applitools-Dev/sdk/compare/js/driver@1.17.5...js/driver@1.18.0) (2024-07-23)

@@ -4,0 +17,0 @@

@@ -41,2 +41,9 @@ "use strict";

this._state = {};
/**
* The purpose of this state is to make sure we don't search for the SRE multiple times.
* This is unwanted to have but needed, search for `.setScrollingElement(settings.scrollRootElement ?? null)`,
* I don't want to risk breaking it.
* e.g in js/packages/core/src/classic/check.ts
*/
this._searchScrollingElement = true;
this._spec = options.spec;

@@ -396,2 +403,4 @@ if (options.context) {

async getScrollingElement() {
if (!this._searchScrollingElement)
return this._scrollingElement;
if (!(0, element_1.isElementInstance)(this._scrollingElement)) {

@@ -420,2 +429,5 @@ await this.focus();

}
if (this._scrollingElement === null) {
this._searchScrollingElement = false;
}
}

@@ -422,0 +434,0 @@ return this._scrollingElement;

5

dist/driver.js

@@ -287,3 +287,6 @@ "use strict";

const driverUrl = (_d = (await this.getDriverUrl())) !== null && _d !== void 0 ? _d : '';
this._environment.isEC = this._environment.isECClient || /exec-wus.applitools.com/.test(driverUrl);
this._environment.isEC =
this._environment.isECClient ||
utils.general.getEnvValue('IS_EC', 'boolean') ||
/exec-wus\.applitools\.com/.test(driverUrl);
this._environment.isKobiton = /kobiton/.test(driverUrl);

@@ -290,0 +293,0 @@ this._logger.log('Extracted environment', this._environment);

17

dist/user-agent.js

@@ -146,5 +146,14 @@ "use strict";

function extractUserAgentObjectEnvironment(userAgent) {
var _a, _b, _c, _d;
const chromiumBrand = (_a = userAgent.brands) === null || _a === void 0 ? void 0 : _a.find(brand => /Chromium/i.test(brand.brand));
const browserBrand = (_c = (_b = userAgent.brands) === null || _b === void 0 ? void 0 : _b.find(brand => brand !== chromiumBrand && !/Not.?A.?Brand/i.test(brand.brand))) !== null && _c !== void 0 ? _c : chromiumBrand;
var _a, _b, _c, _d, _e, _f;
if (typeof userAgent.brands === 'string') {
try {
userAgent.brands = JSON.parse(userAgent.brands);
}
catch (e) {
userAgent.brands = [];
}
}
// we assume the structure of the brands array, but since it's an experimental API, we use optional chaining to stay on the safe side
const chromiumBrand = (_b = (_a = userAgent.brands) === null || _a === void 0 ? void 0 : _a.find) === null || _b === void 0 ? void 0 : _b.call(_a, brand => /Chromium/i.test(brand.brand));
const browserBrand = (_e = (_d = (_c = userAgent.brands) === null || _c === void 0 ? void 0 : _c.find) === null || _d === void 0 ? void 0 : _d.call(_c, brand => brand !== chromiumBrand && !/Not.?A.?Brand/i.test(brand.brand))) !== null && _e !== void 0 ? _e : chromiumBrand;
const environment = {

@@ -165,5 +174,5 @@ browserName: browserBrand === null || browserBrand === void 0 ? void 0 : browserBrand.brand,

environment.platformName = 'Mac OS X';
environment.platformVersion = (_d = environment.platformVersion) === null || _d === void 0 ? void 0 : _d.split(/[._]/, 2).join('.');
environment.platformVersion = (_f = environment.platformVersion) === null || _f === void 0 ? void 0 : _f.split(/[._]/, 2).join('.');
}
return environment;
}
{
"name": "@applitools/driver",
"version": "1.18.0",
"version": "1.19.0",
"description": "Applitools universal framework wrapper",

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

@@ -32,2 +32,9 @@ import type { Location, Size, Region } from '@applitools/utils';

protected readonly _spec: SpecDriver<T>;
/**
* The purpose of this state is to make sure we don't search for the SRE multiple times.
* This is unwanted to have but needed, search for `.setScrollingElement(settings.scrollRootElement ?? null)`,
* I don't want to risk breaking it.
* e.g in js/packages/core/src/classic/check.ts
*/
private _searchScrollingElement;
constructor(options: ContextOptions<T>);

@@ -63,3 +70,3 @@ get logger(): import("@applitools/logger").Logger;

getContextElement(): Promise<Element<T> | null>;
getScrollingElement(): Promise<Element<T> | null>;
getScrollingElement(): Promise<Element<T> | null | undefined>;
setScrollingElement(scrollingElement: Element<T> | ElementReference<T> | undefined | null): Promise<void>;

@@ -66,0 +73,0 @@ blurElement(element?: Element<T>): Promise<T['element'] | null>;

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