0
私は、その内容をWebビューに読み込む電子アプリケーションを自動化しようとしています。私はそれのためにspectronとwebdriverioを使用しています。スペクトログラフを使用した電子ウェブビュー上の要素へのアクセス
ここに私が使用しているコードがあります。
it('should assess webview', function() {
var self = this;
return this.app.client.waitUntilWindowLoaded()
.windowHandles().then(function(session) {
self.app.client.switchTab(session.value[1])
.click("#my-id")
.then(console.log.bind(console))
.catch(console.log.bind(console));
});
});
これは機能していないようです。私はどこが間違っているのか分からない。しかし私は
it('should assess webview', function() {
var self = this;
return this.app.client.waitUntilWindowLoaded()
.windowHandles().then(function(session) {
self.app.client.switchTab(session.value[1])
.getSource()
.then(console.log.bind(console))
.catch(console.log.bind(console));
});
});
上記のコードを使用して、webviewウィンドウハンドルが正しいかどうかを確認しました。それはそうです。親切に助けてください。ありがとう
感謝。 –