Execute testing js code directly with webdriverio API

This commit is contained in:
Yuya Ochiai
2016-06-25 22:46:07 +09:00
parent 9e6d6fcfdb
commit f5e28e2739

View File

@@ -66,9 +66,9 @@ describe('application', function() {
env.addClientCommands(this.app.client);
const client = this.app.client;
return this.app.client
.windowByIndex(1) // in the first webview
.execute(function() {
const webview = document.querySelector('webview');
webview.executeJavaScript('open_window();');
open_window();
})
.waitUntil(function async() {
return client.windowHandles().then((handles) => {