switchWindow does the job, but throws unexpected error #762
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
investigation required
Milestone
Hello
I noticed this weird behavior several months ago when created a very first WDIO test for Electron-based app.
Now I know how to reproduce it:
npm init electron-app@latest wdio-electron-hello-world && cd wdio-electron-hello-world
npm init wdio@latest .
index.js
to add functionality to open a new window:Add the following to
preload.js
:Add a button to
index.html
for opening a new window:Add
src/extra.html
:switchWindow()
function throws an error (not expected ❌)The error thrown is:
If
switchWindow
won't be wrapped with try-catch, the test will fail.The text was updated successfully, but these errors were encountered: