Execute testing js code directly with webdriverio API
This commit is contained in:
@@ -66,9 +66,9 @@ describe('application', function() {
|
|||||||
env.addClientCommands(this.app.client);
|
env.addClientCommands(this.app.client);
|
||||||
const client = this.app.client;
|
const client = this.app.client;
|
||||||
return this.app.client
|
return this.app.client
|
||||||
|
.windowByIndex(1) // in the first webview
|
||||||
.execute(function() {
|
.execute(function() {
|
||||||
const webview = document.querySelector('webview');
|
open_window();
|
||||||
webview.executeJavaScript('open_window();');
|
|
||||||
})
|
})
|
||||||
.waitUntil(function async() {
|
.waitUntil(function async() {
|
||||||
return client.windowHandles().then((handles) => {
|
return client.windowHandles().then((handles) => {
|
||||||
|
Reference in New Issue
Block a user