Socket
Socket
Sign inDemoInstall

@wdio/utils

Package Overview
Dependencies
Maintainers
3
Versions
291
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wdio/utils - npm Package Compare versions

Comparing version 8.18.0 to 8.18.2

7

build/driver/index.js

@@ -13,2 +13,3 @@ import fs from 'node:fs';

import { start as startEdgedriver, findEdgePath } from 'edgedriver';
import { isAppiumCapability } from '../utils.js';
import { parseParams, setupPuppeteerBrowser, definesRemoteDriver, setupChromedriver, isChrome, isFirefox, isEdge, isSafari, getCacheDir } from './utils.js';

@@ -41,6 +42,8 @@ import { SUPPORTED_BROWSERNAMES } from '../constants.js';

*/
if (isAppiumCapability(caps)) {
return;
}
if (!caps.browserName) {
throw new Error('No "browserName" defined in capabilities nor hostname or port found!\n' +
'If you like to run a mobile session with Appium, make sure to set "hostname" and "port" in your ' +
'WebdriverIO options. If you like to run a local browser session make sure to pick from one of ' +
'If you like to run a local browser session make sure to pick from one of ' +
`the following browser names: ${Object.values(SUPPORTED_BROWSERNAMES).flat(Infinity)}`);

@@ -47,0 +50,0 @@ }

import initialisePlugin from './initialisePlugin.js';
import { initialiseWorkerService, initialiseLauncherService } from './initialiseServices.js';
import webdriverMonad from './monad.js';
import { commandCallStructure, isValidParameter, getArgumentType, safeImport, isFunctionAsync, transformCommandLogResult, canAccess, sleep } from './utils.js';
import { commandCallStructure, isValidParameter, getArgumentType, safeImport, isFunctionAsync, transformCommandLogResult, canAccess, sleep, isAppiumCapability } from './utils.js';
import { wrapCommand, executeHooksWithArgs, executeAsync } from './shim.js';

@@ -11,3 +11,3 @@ import { testFnWrapper, wrapGlobalTestMethod } from './test-framework/index.js';

import { UNICODE_CHARACTERS } from './constants.js';
export { initialisePlugin, initialiseLauncherService, initialiseWorkerService, isFunctionAsync, transformCommandLogResult, webdriverMonad, commandCallStructure, isValidParameter, getArgumentType, safeImport, canAccess, sleep, startWebDriver, setupBrowser, setupDriver,
export { initialisePlugin, initialiseLauncherService, initialiseWorkerService, isFunctionAsync, transformCommandLogResult, webdriverMonad, commandCallStructure, isValidParameter, getArgumentType, safeImport, canAccess, sleep, isAppiumCapability, startWebDriver, setupBrowser, setupDriver,
/**

@@ -14,0 +14,0 @@ * runner shim

@@ -5,3 +5,3 @@ /* istanbul ignore file */

import webdriverMonad from './monad.js';
import { commandCallStructure, isValidParameter, getArgumentType, safeImport, isFunctionAsync, transformCommandLogResult, canAccess, sleep } from './utils.js';
import { commandCallStructure, isValidParameter, getArgumentType, safeImport, isFunctionAsync, transformCommandLogResult, canAccess, sleep, isAppiumCapability } from './utils.js';
import { wrapCommand, executeHooksWithArgs, executeAsync } from './shim.js';

@@ -13,3 +13,3 @@ import { testFnWrapper, wrapGlobalTestMethod } from './test-framework/index.js';

import { UNICODE_CHARACTERS } from './constants.js';
export { initialisePlugin, initialiseLauncherService, initialiseWorkerService, isFunctionAsync, transformCommandLogResult, webdriverMonad, commandCallStructure, isValidParameter, getArgumentType, safeImport, canAccess, sleep, startWebDriver, setupBrowser, setupDriver,
export { initialisePlugin, initialiseLauncherService, initialiseWorkerService, isFunctionAsync, transformCommandLogResult, webdriverMonad, commandCallStructure, isValidParameter, getArgumentType, safeImport, canAccess, sleep, isAppiumCapability, startWebDriver, setupBrowser, setupDriver,
/**

@@ -16,0 +16,0 @@ * runner shim

@@ -76,2 +76,9 @@ import type { Services } from '@wdio/types';

export declare const sleep: (ms?: number) => Promise<unknown>;
/**
* Checks if the provided WebdriverIO capabilities object is related to Appium.
*
* @param {WebdriverIO.Capabilities} caps - The capabilities object to check.
* @returns {boolean} Returns true if the provided capabilities are related to Appium, false otherwise.
*/
export declare function isAppiumCapability(caps: WebdriverIO.Capabilities): boolean;
//# sourceMappingURL=utils.d.ts.map

@@ -269,1 +269,12 @@ import fs from 'node:fs';

export const sleep = (ms = 0) => new Promise((r) => setTimeout(r, ms));
/**
* Checks if the provided WebdriverIO capabilities object is related to Appium.
*
* @param {WebdriverIO.Capabilities} caps - The capabilities object to check.
* @returns {boolean} Returns true if the provided capabilities are related to Appium, false otherwise.
*/
export function isAppiumCapability(caps) {
return Boolean(caps &&
// @ts-expect-error outdated jsonwp cap
(caps.automationName || caps['appium:automationName'] || caps.deviceName || caps.appiumVersion));
}
{
"name": "@wdio/utils",
"version": "8.18.0",
"version": "8.18.2",
"description": "A WDIO helper utility to provide several utility functions used across the project.",

@@ -51,3 +51,3 @@ "author": "Christian Bromann <mail@bromann.dev>",

},
"gitHead": "66cd3ccfe1c8a94f89afa11fb51f58742ae379c5"
"gitHead": "910c79f1640f0100e763a507fdcaee9e4f52560f"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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