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

@applitools/spec-driver-webdriver

Package Overview
Dependencies
Maintainers
34
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applitools/spec-driver-webdriver - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

3

dist/index.js

@@ -31,2 +31,3 @@ "use strict";

__exportStar(require("./spec-driver"), exports);
exports.default = spec;
const typedSpec = spec;
exports.default = typedSpec;

@@ -29,3 +29,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.build = exports.switchWorld = exports.getWorlds = exports.getCurrentWorld = exports.performAction = exports.getElementAttribute = exports.getElementRegion = exports.setOrientation = exports.getOrientation = exports.getSystemBars = exports.click = exports.takeScreenshot = exports.visit = exports.getUrl = exports.getTitle = exports.getDriverInfo = exports.getCapabilities = exports.getCookies = exports.setWindowSize = exports.getWindowSize = exports.getElementText = exports.setElementText = exports.findElements = exports.findElement = exports.childContext = exports.parentContext = exports.mainContext = exports.executeScript = exports.isEqualElements = exports.isStaleElementError = exports.untransformSelector = exports.extractHostName = exports.transformSelector = exports.transformElement = exports.transformDriver = exports.isSelector = exports.isShadowRoot = exports.isElement = exports.isDriver = void 0;
exports.build = exports.switchWorld = exports.getWorlds = exports.getCurrentWorld = exports.performAction = exports.getElementAttribute = exports.getElementRegion = exports.setOrientation = exports.getOrientation = exports.getSystemBars = exports.click = exports.takeScreenshot = exports.visit = exports.getUrl = exports.getTitle = exports.getDriverInfo = exports.getCapabilities = exports.getCookies = exports.setWindowSize = exports.getWindowSize = exports.getElementText = exports.setElementText = exports.findElements = exports.findElement = exports.childContext = exports.parentContext = exports.mainContext = exports.executeScript = exports.isEqualElements = exports.isStaleElementError = exports.extractHostName = exports.untransformSelector = exports.transformSelector = exports.transformElement = exports.transformDriver = exports.isSelector = exports.isShadowRoot = exports.isElement = exports.isDriver = void 0;
const url_1 = require("url");

@@ -200,7 +200,2 @@ const utils = __importStar(require("@applitools/utils"));

exports.transformSelector = transformSelector;
function extractHostName(driver) {
var _a, _b;
return (_b = (_a = driver.options) === null || _a === void 0 ? void 0 : _a.hostname) !== null && _b !== void 0 ? _b : null;
}
exports.extractHostName = extractHostName;
function untransformSelector(selector) {

@@ -213,2 +208,7 @@ if (utils.types.has(selector, ['using', 'value'])) {

exports.untransformSelector = untransformSelector;
function extractHostName(driver) {
var _a, _b;
return (_b = (_a = driver.options) === null || _a === void 0 ? void 0 : _a.hostname) !== null && _b !== void 0 ? _b : null;
}
exports.extractHostName = extractHostName;
function isStaleElementError(error) {

@@ -253,6 +253,11 @@ if (!error)

const parentId = parent ? (isShadowRoot(parent) ? extractShadowRootId(parent) : extractElementId(parent)) : null;
const element = parentId
? await driver.findElementFromElement(parentId, selector.using, selector.value)
: await driver.findElement(selector.using, selector.value);
return isElement(element) ? element : null;
try {
const element = parentId
? await driver.findElementFromElement(parentId, selector.using, selector.value)
: await driver.findElement(selector.using, selector.value);
return isElement(element) ? element : null;
}
catch {
return null;
}
}

@@ -259,0 +264,0 @@ exports.findElement = findElement;

{
"name": "@applitools/spec-driver-webdriver",
"version": "1.0.0",
"version": "1.0.1",
"keywords": [

@@ -69,3 +69,3 @@ "webdriver",

"dependencies": {
"@applitools/driver": "1.11.17",
"@applitools/driver": "1.11.18",
"@applitools/utils": "1.3.21",

@@ -78,3 +78,3 @@ "proxy-agent": "5.0.0"

"@applitools/scripts": "1.2.0",
"@applitools/test-utils": "1.5.4",
"@applitools/test-utils": "1.5.5",
"@types/mocha": "^9.1.1",

@@ -81,0 +81,0 @@ "@types/node": "12",

@@ -1,2 +0,2 @@

declare const _default: typeof spec;
declare const _default: import('@applitools/driver').SpecDriver<Driver, Driver, Element, Selector>;
export default _default;

@@ -10,4 +10,4 @@ export function isDriver(driver: any): driver is Driver;

export function transformSelector(selector: string | { selector: string | Selector; type?: undefined | string; }): Selector;
export function untransformSelector(selector: Selector): string | { selector: string; type?: undefined | string; };
export function extractHostName(driver: Driver): null | string;
export function untransformSelector(selector: Selector): string | { selector: string; type?: undefined | string; };
export function isStaleElementError(error: any): boolean;

@@ -60,3 +60,3 @@ export function isEqualElements(_driver: Driver, element1: Element, element2: Element): Promise<boolean>;

export function build(env: any): Promise<[Driver, () => Promise<void>]>;
export type Driver = import('webdriver').Client & { __applitoolsBrand?: undefined; };
export type Driver = import('webdriver').Client & { original?: any; } & { __applitoolsBrand?: undefined; };
export type Element = ({ 'element-6066-11e4-a52e-4f735466cecf': string; } | { ELEMENT: string; }) & { __applitoolsBrand?: undefined; };

@@ -63,0 +63,0 @@ export type ShadowRoot = {

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