webdriver-js-extender
Advanced tools
Comparing version 0.2.3 to 1.0.0
/// <reference types="selenium-webdriver" /> | ||
import { promise as Promise } from 'selenium-webdriver'; | ||
import { promise as wdpromise } from 'selenium-webdriver'; | ||
import { Extender } from './extender'; | ||
@@ -11,3 +11,3 @@ export declare class CommandDefinition<T> { | ||
constructor(name: string, params: string[], method: 'GET' | 'POST' | 'DELETE' | 'PUT', path: string, preprocessParams?: (...args: any[]) => any[]); | ||
compile(extender: Extender, silentFailure: boolean): (...args: any[]) => Promise.Promise<{}>; | ||
compile<T>(extender: Extender, silentFailure: boolean): (...args: any[]) => wdpromise.Promise<T>; | ||
} |
import { CommandDefinition } from './command_definition'; | ||
export declare let getNetworkConnection: CommandDefinition<number>; | ||
export declare let setNetworkConnection: CommandDefinition<void>; | ||
export declare let toggleAirplaneMode: CommandDefinition<void>; | ||
export declare let toggleWiFi: CommandDefinition<void>; | ||
export declare let toggleData: CommandDefinition<void>; | ||
export declare let toggleLocationServices: CommandDefinition<void>; | ||
export declare let getGeolocation: CommandDefinition<{ | ||
latitude: number; | ||
longitude: number; | ||
altitude: number; | ||
}>; | ||
export declare let setGeolocation: CommandDefinition<void>; | ||
export declare let getCurrentDeviceActivity: CommandDefinition<string>; | ||
export declare let startDeviceActivity: CommandDefinition<void>; | ||
export declare let getAppiumSettings: CommandDefinition<{ | ||
[name: string]: any; | ||
}>; | ||
export declare let setAppiumSettings: CommandDefinition<void>; | ||
export declare let getCurrentContext: CommandDefinition<string>; | ||
export declare let selectContext: CommandDefinition<void>; | ||
export declare let getScreenOrientation: CommandDefinition<"LANDSCAPE" | "PORTRAIT">; | ||
export declare let setScreenOrientation: CommandDefinition<void>; | ||
export declare let isDeviceLocked: CommandDefinition<boolean>; | ||
export declare let lockDevice: CommandDefinition<void>; | ||
export declare let unlockDevice: CommandDefinition<void>; | ||
export declare let installApp: CommandDefinition<void>; | ||
export declare let isAppInstalled: CommandDefinition<boolean>; | ||
export declare let removeApp: CommandDefinition<void>; | ||
export declare let pullFileFromDevice: CommandDefinition<string>; | ||
export declare let pullFolderFromDevice: CommandDefinition<any>; | ||
export declare let pushFileToDevice: CommandDefinition<void>; | ||
export declare let listContexts: CommandDefinition<string[]>; | ||
export declare let uploadFile: CommandDefinition<void>; | ||
export declare let switchToParentFrame: CommandDefinition<void>; | ||
export declare let fullscreen: CommandDefinition<void>; | ||
export declare let sendAppToBackground: CommandDefinition<void>; | ||
export declare let closeApp: CommandDefinition<void>; | ||
export declare let getAppStrings: CommandDefinition<string[]>; | ||
export declare let launchSession: CommandDefinition<void>; | ||
export declare let resetApp: CommandDefinition<void>; | ||
export declare let hideSoftKeyboard: CommandDefinition<void>; | ||
export declare let getDeviceTime: CommandDefinition<string>; | ||
export declare let openDeviceNotifications: CommandDefinition<void>; | ||
export declare let rotationGesture: CommandDefinition<{}>; | ||
export declare let shakeDevice: CommandDefinition<void>; |
"use strict"; | ||
var command_definition_1 = require("./command_definition"); | ||
exports.getNetworkConnection = new command_definition_1.CommandDefinition('getNetworkConnection', [], 'GET', '/network_connection'); | ||
exports.setNetworkConnection = new command_definition_1.CommandDefinition('setNetworkConnection', ['type'], 'POST', '/network_connection'); | ||
exports.setNetworkConnection = new command_definition_1.CommandDefinition('setNetworkConnection', ['type'], 'POST', '/network_connection', function (args) { | ||
if (typeof args[0] == 'boolean') { | ||
// Transform into bitmask | ||
return [(args[0] ? 1 : 0) + (args[1] ? 2 : 0) + (args[2] ? 4 : 0)]; | ||
} | ||
else { | ||
return args; | ||
} | ||
}); | ||
exports.toggleAirplaneMode = new command_definition_1.CommandDefinition('toggleAirplaneMode', [], 'POST', 'appium/device/toggle_airplane_mode'); | ||
exports.toggleWiFi = new command_definition_1.CommandDefinition('toggleWiFi', [], 'POST', 'appium/device/toggle_wifi'); | ||
exports.toggleData = new command_definition_1.CommandDefinition('toggleData', [], 'POST', 'appium/device/toggle_data'); | ||
exports.toggleLocationServices = new command_definition_1.CommandDefinition('toggleLocationServices', [], 'POST', 'appium/device/toggle_location_services'); | ||
exports.getGeolocation = new command_definition_1.CommandDefinition('getGeolocation', [], 'GET', '/location'); | ||
exports.setGeolocation = new command_definition_1.CommandDefinition('setGeolocation', ['location'], 'POST', '/location', function (args) { | ||
return [{ latitude: args[0] || 0, longitude: args[1] || 0, altitude: args[2] || 0 }]; | ||
}); | ||
exports.getCurrentDeviceActivity = new command_definition_1.CommandDefinition('getCurrentDeviceActivity', [], 'GET', '/appium/device/current_activity'); | ||
exports.startDeviceActivity = new command_definition_1.CommandDefinition('startDeviceActivity', ['appPackage', 'appActivity', 'appWaitPackage', 'appWaitActivity'], 'POST', '/appium/device/start_activity', function (args) { | ||
if (args.length == 2) { | ||
// No appWait, default parameters to undefined | ||
args[2] = undefined; | ||
args[3] = undefined; | ||
} | ||
if (args.length == 4) { | ||
return args; | ||
} | ||
else { | ||
throw new RangeError('startDeviceActivity requires 2 or 4 arguments, got ' + args.length); | ||
} | ||
}); | ||
exports.getAppiumSettings = new command_definition_1.CommandDefinition('getAppiumSettings', [], 'GET', '/appium/settings'); | ||
exports.setAppiumSettings = new command_definition_1.CommandDefinition('setAppiumSettings', ['settings'], 'POST', '/appium/settings'); | ||
exports.getCurrentContext = new command_definition_1.CommandDefinition('getCurrentContext', [], 'GET', '/context'); | ||
exports.selectContext = new command_definition_1.CommandDefinition('selectContext', ['name'], 'POST', '/context'); | ||
exports.getScreenOrientation = new command_definition_1.CommandDefinition('getScreenOrientation', [], 'GET', '/orientation'); | ||
exports.setScreenOrientation = new command_definition_1.CommandDefinition('setScreenOrientation', ['orientation'], 'POST', '/orientation', function (args) { | ||
var orientation = (args[0] || '').toUpperCase(); | ||
if ((orientation != 'PORTRAIT') && (orientation != 'LANDSCAPE')) { | ||
throw new TypeError('Invalid orientation "' + args[0] + '"'); | ||
} | ||
args[0] = orientation; | ||
return args; | ||
}); | ||
exports.isDeviceLocked = new command_definition_1.CommandDefinition('isDeviceLocked', [], 'POST', '/appium/device/is_locked'); | ||
exports.lockDevice = new command_definition_1.CommandDefinition('lockDevice', ['seconds'], 'POST', '/appium/device/lock', function (args) { | ||
args[0] = args[0] || 0; | ||
return args; | ||
}); | ||
exports.unlockDevice = new command_definition_1.CommandDefinition('unlockDevice', [], 'POST', '/appium/device/unlock'); | ||
exports.installApp = new command_definition_1.CommandDefinition('installApp', ['appPath'], 'POST', '/appium/device/install_app'); | ||
exports.isAppInstalled = new command_definition_1.CommandDefinition('isAppInstalled', ['bundleId'], 'POST', 'appium/device/app_installed'); | ||
exports.removeApp = new command_definition_1.CommandDefinition('removeApp', ['appId'], 'POST', '/appium/device/remove_app'); | ||
exports.pullFileFromDevice = new command_definition_1.CommandDefinition('pullFileFromDevice', ['path'], 'POST', '/appium/device/pull_file'); | ||
exports.pullFolderFromDevice = new command_definition_1.CommandDefinition('pullFolderFromDevice', ['path'], 'POST', '/appium/device/pull_folder'); | ||
exports.pushFileToDevice = new command_definition_1.CommandDefinition('pushFileToDevice', ['path', 'data'], 'POST', 'appium/device/push_file'); | ||
exports.listContexts = new command_definition_1.CommandDefinition('listContexts', [], 'GET', '/contexts'); | ||
exports.uploadFile = new command_definition_1.CommandDefinition('uploadFile', ['file'], 'POST', '/file'); | ||
exports.switchToParentFrame = new command_definition_1.CommandDefinition('switchToParentFrame', [], 'POST', '/frame/parent'); | ||
exports.fullscreen = new command_definition_1.CommandDefinition('fullscreen', [], 'POST', '/window/fullscreen'); | ||
exports.sendAppToBackground = new command_definition_1.CommandDefinition('sendAppToBackground', ['seconds'], 'POST', '/appium/app/background', function (args) { | ||
args[0] = args[0] || 0; | ||
return args; | ||
}); | ||
exports.closeApp = new command_definition_1.CommandDefinition('closeApp', [], 'POST', '/appium/app/close'); | ||
exports.getAppStrings = new command_definition_1.CommandDefinition('getAppStrings', ['language'], 'POST', 'appium/app/strings', function (args) { | ||
args[0] = args.length ? args[0] : undefined; // Default to `undefined` | ||
return args; | ||
}); | ||
exports.launchSession = new command_definition_1.CommandDefinition('launchSession', [], 'POST', '/appium/app/launch'); | ||
exports.resetApp = new command_definition_1.CommandDefinition('resetApp', [], 'POST', '/appium/app/reset'); | ||
exports.hideSoftKeyboard = new command_definition_1.CommandDefinition('hideSoftKeyboard', ['strategy', 'key'], 'POST', '/appium/device/hide_keyboard', function (args) { | ||
switch (args[0] || 'default') { | ||
case 'default': | ||
args[0] = 'default'; | ||
case 'swipeDown': | ||
case 'tapOut': | ||
case 'tapOutside': | ||
if (args.length == 1) { | ||
args[1] = undefined; // Default to `undefined` | ||
} | ||
case 'press': | ||
case 'pressKey': | ||
return args; | ||
default: | ||
throw new RangeError('Invalid keyboard hiding strategy "' + args[0] + '"'); | ||
} | ||
}); | ||
exports.getDeviceTime = new command_definition_1.CommandDefinition('getDeviceTime', [], 'GET', '/appium/device/system_time'); | ||
exports.openDeviceNotifications = new command_definition_1.CommandDefinition('openDeviceNotifications', [], 'POST', '/appium/device/open_notifications'); | ||
exports.rotationGesture = new command_definition_1.CommandDefinition('rotationGesture', ['x', 'y', 'duration', 'rotation', 'touchCount'], 'POST', '/appium/device/rotate', function (args) { | ||
args[0] = args[0] || 0; | ||
args[1] = args[1] || 0; | ||
args[2] = args[2] === undefined ? 1 : args[2]; | ||
args[3] = args[3] === undefined ? 180 : args[3]; | ||
args[4] = args[4] == undefined ? 2 : args[4]; | ||
return args; | ||
}); | ||
exports.shakeDevice = new command_definition_1.CommandDefinition('shakeDevice', [], 'POST', 'appium/device/shake'); | ||
//# sourceMappingURL=command_definitions.js.map |
/// <reference types="selenium-webdriver" /> | ||
import * as webdriver from 'selenium-webdriver'; | ||
import { promise as wdpromise } from 'selenium-webdriver'; | ||
export declare class DeferredExecutor { | ||
execute: (command: any) => webdriver.promise.Promise<any>; | ||
execute: (command: any) => wdpromise.Promise<any>; | ||
defineCommand: (name: string, method: string, path: string) => void; | ||
@@ -10,3 +10,3 @@ /** | ||
*/ | ||
constructor(delegate: webdriver.promise.Promise<any>); | ||
constructor(delegate: wdpromise.Promise<any>); | ||
} |
/// <reference types="selenium-webdriver" /> | ||
import * as webdriver from 'selenium-webdriver'; | ||
import { promise as wdpromise, WebDriver } from 'selenium-webdriver'; | ||
export declare class Extender { | ||
driver_: webdriver.WebDriver; | ||
driver_: WebDriver; | ||
params_: { | ||
@@ -11,3 +11,3 @@ [key: string]: string[]; | ||
}; | ||
constructor(driver: webdriver.WebDriver); | ||
constructor(driver: WebDriver); | ||
/** | ||
@@ -36,3 +36,3 @@ * Defines a new command. When a command is sent, the {@code path} will be | ||
*/ | ||
execCommand<T>(name: string, method: string, params: any[]): webdriver.promise.Promise<T>; | ||
execCommand<T>(name: string, method: string, params: any[]): wdpromise.Promise<T>; | ||
} |
@@ -55,5 +55,8 @@ "use strict"; | ||
if ((typeof x == 'number') || (typeof x == 'boolean') || | ||
(typeof x == 'function') || (x == null)) { | ||
(typeof x == 'function')) { | ||
return x.toString(); | ||
} | ||
else if (x == null) { | ||
return '' + x; | ||
} | ||
else { | ||
@@ -60,0 +63,0 @@ return JSON.stringify(x); |
/// <reference types="selenium-webdriver" /> | ||
import * as webdriver from 'selenium-webdriver'; | ||
export interface ExtendedWebDriver extends webdriver.WebDriver { | ||
getNetworkConnection: () => webdriver.promise.Promise<number>; | ||
setNetworkConnection: (type: number) => webdriver.promise.Promise<void>; | ||
import { promise as wdpromise, WebDriver } from 'selenium-webdriver'; | ||
export interface ExtendedWebDriver extends WebDriver { | ||
getNetworkConnection: () => wdpromise.Promise<0 | 1 | 2 | 3 | 4 | 5 | 6 | 7>; | ||
setNetworkConnection: (typeOrAirplaneMode: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | boolean, wifi?: boolean, data?: boolean) => wdpromise.Promise<void>; | ||
toggleAirplaneMode: () => wdpromise.Promise<void>; | ||
toggleWiFi: () => wdpromise.Promise<void>; | ||
toggleData: () => wdpromise.Promise<void>; | ||
toggleLocationServices: () => wdpromise.Promise<void>; | ||
getGeolocation: () => wdpromise.Promise<{ | ||
latitude: number; | ||
longitude: number; | ||
altitude: number; | ||
}>; | ||
setGeolocation: (latitude?: number, longitude?: number, altitude?: number) => wdpromise.Promise<void>; | ||
getCurrentDeviceActivity: () => wdpromise.Promise<string>; | ||
startDeviceActivity: (appPackage: string, appActivity: string, appWaitPackage?: string, appWaitActivity?: string) => wdpromise.Promise<void>; | ||
getAppiumSettings: () => wdpromise.Promise<{ | ||
[name: string]: any; | ||
}>; | ||
setAppiumSettings: (settings: { | ||
[name: string]: any; | ||
}) => wdpromise.Promise<void>; | ||
getCurrentContext: () => wdpromise.Promise<string>; | ||
selectContext: (name: string) => wdpromise.Promise<void>; | ||
getScreenOrientation: () => wdpromise.Promise<'LANDSCAPE' | 'PORTRAIT'>; | ||
setScreenOrientation: (orientation: string) => wdpromise.Promise<void>; | ||
isDeviceLocked: () => wdpromise.Promise<boolean>; | ||
lockDevice: (delay?: number) => wdpromise.Promise<void>; | ||
unlockDevice: () => wdpromise.Promise<void>; | ||
installApp: (appPath: string) => wdpromise.Promise<void>; | ||
isAppInstalled: (bundleId: string) => wdpromise.Promise<boolean>; | ||
removeApp: (appId: string) => wdpromise.Promise<void>; | ||
pullFileFromDevice: (path: string) => wdpromise.Promise<string>; | ||
pullFolderFromDevice: (path: string) => wdpromise.Promise<any>; | ||
pushFileToDevice: (path: string, base64Data: string) => wdpromise.Promise<void>; | ||
listContexts: () => wdpromise.Promise<string[]>; | ||
uploadFile: (base64Data: string) => wdpromise.Promise<void>; | ||
switchToParentFrame: () => wdpromise.Promise<void>; | ||
fullscreen: () => wdpromise.Promise<void>; | ||
sendAppToBackground: (delay?: number) => wdpromise.Promise<void>; | ||
closeApp: () => wdpromise.Promise<void>; | ||
getAppStrings: (language?: string) => wdpromise.Promise<string[]>; | ||
launchSession: () => wdpromise.Promise<void>; | ||
resetApp: () => wdpromise.Promise<void>; | ||
hideSoftKeyboard: (strategy?: 'default' | 'tapOutside' | 'tapOut' | 'swipeDown' | 'pressKey' | 'press', key?: string) => wdpromise.Promise<void>; | ||
getDeviceTime: () => wdpromise.Promise<string>; | ||
openDeviceNotifications: () => wdpromise.Promise<void>; | ||
rotationGesture: (x?: number, y?: number, duration?: number, rotation?: number, touchCount?: 1 | 2 | 3 | 4 | 5) => wdpromise.Promise<void>; | ||
shakeDevice: () => wdpromise.Promise<void>; | ||
} | ||
export declare function extend(baseDriver: webdriver.WebDriver, fallbackGracefully?: boolean): ExtendedWebDriver; | ||
export declare function extend(baseDriver: WebDriver, fallbackGracefully?: boolean): ExtendedWebDriver; | ||
/** | ||
@@ -9,0 +54,0 @@ * Patches webdriver so that the extender can defie new commands. |
"use strict"; | ||
var webdriver = require("selenium-webdriver"); | ||
var selenium_webdriver_1 = require("selenium-webdriver"); | ||
var commandDefinitions = require("./command_definitions"); | ||
@@ -40,3 +40,3 @@ var deferred_executor_1 = require("./deferred_executor"); | ||
executors.createExecutor = function (url, opt_agent, opt_proxy) { | ||
return new deferred_executor_1.DeferredExecutor(webdriver.promise.when(url, function (url) { | ||
return new deferred_executor_1.DeferredExecutor(selenium_webdriver_1.promise.when(url, function (url) { | ||
var client = new http.HttpClient(url, opt_agent, opt_proxy); | ||
@@ -43,0 +43,0 @@ return new http.Executor(client); |
{ | ||
"name": "webdriver-js-extender", | ||
"version": "0.2.3", | ||
"version": "1.0.0", | ||
"description": "A plugin which adds additional commands to selenium's javascript implementation of the webdriver client side API", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -7,46 +7,50 @@ "use strict"; | ||
var table = { | ||
getCurrentContext: { skip: true, result: 'WEBVIEW_1' }, | ||
selectContext: { skip: true, args: ['WEBVIEW_1'], params: { name: 'WEBVIEW_1' } }, | ||
listContexts: { skip: true, result: ['WEBVIEW_1'] }, | ||
uploadFile: { skip: true, args: ['hello'], params: { file: 'hello' } }, | ||
getCurrentContext: { result: 'WEBVIEW_1' }, | ||
selectContext: { args: ['WEBVIEW_1'], params: { name: 'WEBVIEW_1' } }, | ||
listContexts: { result: ['WEBVIEW_1'] }, | ||
uploadFile: { args: ['hello'], params: { file: 'hello' } }, | ||
getNetworkConnection: { result: 6 }, | ||
setNetworkConnection: { args: [0], params: { 'type': 0 } }, | ||
toggleAirplaneMode: { skip: true }, | ||
toggleData: { skip: true }, | ||
toggleWiFi: { skip: true }, | ||
toggleLocationServices: { skip: true }, | ||
getGeolocation: { skip: true, result: { latitude: 0, longitude: 0, altitude: 0 } }, | ||
setGeolocation: { skip: true, args: [1, 2, 3], params: { location: { latitude: 1, longitude: 2, altitude: 3 } } }, | ||
getScreenOrientation: { skip: true, result: 'PORTRAIT' }, | ||
setScreenOrientation: { skip: true, args: ['landscape'], params: { orientation: 'LANDSCAPE' } }, | ||
switchToParentFrame: { skip: true }, | ||
fullscreen: { skip: true }, | ||
getAppiumSettings: { skip: true, result: { ignoreUnimportantViews: false } }, | ||
setAppiumSettings: { skip: true, args: [{ ignoreUnimportantViews: true }], params: { settings: { ignoreUnimportantViews: true } } }, | ||
sendAppToBackground: [{ skip: true, params: { seconds: 0 } }, | ||
{ skip: true, args: [1], params: { seconds: 1 } }], | ||
closeApp: { skip: true }, | ||
getAppStrings: { skip: true, result: ['Hello', 'World'] }, | ||
launchSession: { skip: true }, | ||
resetApp: { skip: true }, | ||
getCurrentDeviceActivity: { skip: true }, | ||
startDeviceActivity: [{ skip: true, args: ['a', 'b', 'c', 'd'], params: { appPackage: 'a', appActivity: 'b', appWaitPackage: 'c', appWaitActivity: 'd' } }, | ||
{ skip: true, args: ['a', 'b'], params: { appPackage: 'a', appActivity: 'b' } }], | ||
hideSoftKeyboard: [{ skip: true, params: { strategy: 'default' } }, | ||
{ skip: true, args: ['pressKey', 'Done'], params: { strategy: 'pressKey', key: 'Done' } }], | ||
installApp: { skip: true, args: [path.resolve(__dirname, 'totally_real_apk.apk')], | ||
setNetworkConnection: [ | ||
{ args: [0], params: { 'type': 0 } }, | ||
{ args: [true, false, false], params: { 'type': 1 } }, | ||
{ args: [false, true, true], params: { 'type': 6 } } | ||
], | ||
toggleAirplaneMode: {}, | ||
toggleData: {}, | ||
toggleWiFi: {}, | ||
toggleLocationServices: {}, | ||
getGeolocation: { result: { latitude: 0, longitude: 0, altitude: 0 } }, | ||
setGeolocation: { args: [1, 2, 3], params: { location: { latitude: 1, longitude: 2, altitude: 3 } } }, | ||
getScreenOrientation: { result: 'PORTRAIT' }, | ||
setScreenOrientation: { args: ['landscape'], params: { orientation: 'LANDSCAPE' } }, | ||
switchToParentFrame: {}, | ||
fullscreen: {}, | ||
getAppiumSettings: { result: { ignoreUnimportantViews: false } }, | ||
setAppiumSettings: { args: [{ ignoreUnimportantViews: true }], params: { settings: { ignoreUnimportantViews: true } } }, | ||
sendAppToBackground: [{ params: { seconds: 0 } }, { args: [1], params: { seconds: 1 } }], | ||
closeApp: {}, | ||
getAppStrings: [{ result: ['Hello', 'World'] }, | ||
{ result: ['Hello', 'World'], args: ['en'], params: { language: 'en' } }], | ||
launchSession: {}, | ||
resetApp: {}, | ||
getCurrentDeviceActivity: {}, | ||
startDeviceActivity: [{ args: ['a', 'b', 'c', 'd'], params: { appPackage: 'a', appActivity: 'b', appWaitPackage: 'c', appWaitActivity: 'd' } }, | ||
{ args: ['a', 'b'], params: { appPackage: 'a', appActivity: 'b' } }], | ||
hideSoftKeyboard: [{ params: { strategy: 'default' } }, | ||
{ args: ['pressKey', 'Done'], params: { strategy: 'pressKey', key: 'Done' } }], | ||
installApp: { args: [path.resolve(__dirname, 'totally_real_apk.apk')], | ||
params: { appPath: path.resolve(__dirname, 'totally_real_apk.apk') } }, | ||
isAppInstalled: { skip: true, result: false, args: ['sjelin.is.cool'], params: { bundleId: 'sjelin.is.cool' } }, | ||
removeApp: { skip: true, args: ['sjelin.is.cool'], params: { appId: 'sjelin.is.cool' } }, | ||
isDeviceLocked: { skip: true, result: false }, | ||
lockDevice: { skip: true }, | ||
unlockDevice: { skip: true }, | ||
isAppInstalled: { result: false, args: ['sjelin.is.cool'], params: { bundleId: 'sjelin.is.cool' } }, | ||
removeApp: { args: ['sjelin.is.cool'], params: { appId: 'sjelin.is.cool' } }, | ||
isDeviceLocked: { result: false }, | ||
lockDevice: [{ params: { seconds: 0 } }, { args: [1], params: { seconds: 1 } }], | ||
unlockDevice: {}, | ||
// pullFileFromDevice: null, // No good way to test this | ||
pullFolderFromDevice: { skip: true, result: {}, args: [''], params: { path: '' } }, | ||
pushFileToDevice: { skip: true, args: ['/a/b', 'cde'], params: { path: '/a/b', data: 'cde' } }, | ||
getDeviceTime: { skip: true }, | ||
openDeviceNotifications: { skip: true }, | ||
rotationGesture: [{ skip: true, params: { x: 0, y: 0, duration: 1, rotation: 180, | ||
touchCount: 2 } }, { skip: true, args: [1, 2, 3, 90, 5], params: { x: 1, y: 2, duration: 3, rotation: 90, touchCount: 5 } }], | ||
shakeDevice: { skip: true } | ||
pullFolderFromDevice: { result: {}, args: [''], params: { path: '' } }, | ||
pushFileToDevice: { args: ['/a/b', 'cde'], params: { path: '/a/b', data: 'cde' } }, | ||
getDeviceTime: { result: new Date().toString() }, | ||
openDeviceNotifications: {}, | ||
rotationGesture: [{ params: { x: 0, y: 0, duration: 1, rotation: 180, touchCount: 2 } }, | ||
{ args: [1, 2, 3, 90, 5], params: { x: 1, y: 2, duration: 3, rotation: 90, touchCount: 5 } }], | ||
shakeDevice: {} | ||
}; | ||
@@ -53,0 +57,0 @@ function runTestcase(commandName) { |
{ | ||
"name": "webdriver-js-extender", | ||
"version": "0.2.3", | ||
"version": "1.0.0", | ||
"description": "A plugin which adds additional commands to selenium's javascript implementation of the webdriver client side API", | ||
@@ -5,0 +5,0 @@ "scripts": { |
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
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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
120375
66
1506
1
1