forked from enviPath/enviPy
Current Dev State
This commit is contained in:
30
static/js/ketcher2/node_modules/webdriverio/lib/protocol/context.js
generated
vendored
Normal file
30
static/js/ketcher2/node_modules/webdriverio/lib/protocol/context.js
generated
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
/**
|
||||
*
|
||||
* Retrieve current context or switch to the specified context
|
||||
*
|
||||
* @param {String=} id the context to switch to
|
||||
*
|
||||
* @see http://appium.io/slate/en/v1.1.0/?javascript#automating-hybrid-ios-apps
|
||||
* @see https://github.com/admc/wd/blob/master/lib/commands.js#L279
|
||||
* @type mobile
|
||||
* @for android, ios
|
||||
*
|
||||
*/
|
||||
|
||||
import depcrecate from '../helpers/depcrecationWarning'
|
||||
|
||||
export default function context (id) {
|
||||
const data = {}
|
||||
const requestOptions = {
|
||||
path: '/session/:sessionId/context',
|
||||
method: 'GET'
|
||||
}
|
||||
|
||||
if (typeof id === 'string') {
|
||||
requestOptions.method = 'POST'
|
||||
data.name = id
|
||||
}
|
||||
|
||||
depcrecate('context')
|
||||
return this.requestHandler.create(requestOptions, data)
|
||||
}
|
||||
Reference in New Issue
Block a user