本文整理汇总了TypeScript中webdriverio.remote函数的典型用法代码示例。如果您正苦于以下问题:TypeScript remote函数的具体用法?TypeScript remote怎么用?TypeScript remote使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了remote函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it("can waitForVisible", () => {
webdriverio
.remote(options)
.init()
.url("http://www.google.com/")
.waitForVisible("//input[@type='submit']", 5000)
.then((visible) => {
console.log(visible); // Should return true
})
.end();
});
示例2: before
before(async () => {
client = webdriverio.remote({ deprecationWarnings: true, desiredCapabilities: { browserName: "phantomjs" } });
await client.init();
});
示例3:
const channel = Math.round(Math.random() * 100000000000);
matrix
.init()
.url("https://apprtc.appspot.com/r/" + channel)
.click("#confirm-join-button")
.pause(5000)
.end();
const options = {
desiredCapabilities: {
browserName: "chrome"
}
};
webdriverio
.remote(options)
.init()
.url("https://news.ycombinator.com/")
.selectorExecute("//div", (inputs: HTMLElement[], message: string) => {
return `${inputs.length} ${message}`;
}, "divs on the page")
.then((res: string) => {
console.log(res);
})
.end();
webdriverio
.remote(options)
.init()
.url("http://www.google.com/")
.waitForVisible("//input[@type='submit']", 5000)
示例4: require
/*
* APS
*
* (C) Copyright 2015-2016 Vladimir Grechka
*/
const webdriverio = require('webdriverio')
webdriverio
.remote({
desiredCapabilities: {
browserName: 'chrome'
}
})
.init()
.url('http://127.0.0.1:3001')
.getTitle().then(function(title) {
console.log('Title was: ' + title)
})
.windowHandleMaximize()
示例5: before
before(function(done){
client = webdriverio.remote({ desiredCapabilities: {browserName: "phantomjs"} });
client.init(done);
});
示例6: constructor
constructor(options: OptionsConstructor) {
this.name = options.name;
this.url = `${options.protocol}://${options.url}:${options.port}${options.path ? "/" + options.path : ""}`;
this.runner = webdriverio.remote(options.config);
}