forked from enviPath/enviPy
Current Dev State
This commit is contained in:
34
static/js/ketcher2/node_modules/webdriverio/lib/protocol/url.js
generated
vendored
Normal file
34
static/js/ketcher2/node_modules/webdriverio/lib/protocol/url.js
generated
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
/**
|
||||
*
|
||||
* Protocol binding to load or get the URL of the browser.
|
||||
*
|
||||
* <example>
|
||||
:url.js
|
||||
// navigate to a new URL
|
||||
browser.url('http://webdriver.io');
|
||||
// receive url
|
||||
console.log(browser.getUrl()); // outputs: "http://webdriver.io"
|
||||
* </example>
|
||||
*
|
||||
* @param {String=} url the URL to navigate to
|
||||
* @return {String} the current URL
|
||||
*
|
||||
* @see https://w3c.github.io/webdriver/webdriver-spec.html#dfn-get
|
||||
* @type protocol
|
||||
*
|
||||
*/
|
||||
|
||||
import nodeUrl from 'url'
|
||||
|
||||
export default function url (uri) {
|
||||
let data = {}
|
||||
|
||||
if (typeof uri === 'string') {
|
||||
data.url = uri
|
||||
if (typeof this.options.baseUrl === 'string') {
|
||||
data.url = nodeUrl.resolve(this.options.baseUrl, data.url)
|
||||
}
|
||||
}
|
||||
|
||||
return this.requestHandler.create('/session/:sessionId/url', data)
|
||||
}
|
||||
Reference in New Issue
Block a user