Unable to use switchWindow in nightwatch #3507
Unanswered
tannerlogan
asked this question in
Help Needed
Replies: 1 comment
-
For anyone who comes across this, the issue appeared to be related to the version I was on. I upgraded to the latest version of nightwatch and switchWindow is working for me now. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've seen older posts on this topic but they have been unsuccessful for me so far. Hoping someone could perhaps share a code snippet of theirs that is working. I am trying to use switchWindow() to toggle between two windows when both are open. I have tried this on a couple of different web applications but neither seemed to like this command.
client.windowHandles(function (result) { var handle = result.value[1]; client.switchWindow(handle); });
I've verified that windowHandles does seem to be returning a list of windows. It just seems like it's ignoring my switchWindow command. Not getting any errors, it just simply isn't switching windows for me. Wondering if switchWindow is still the standard or not. Any thoughts/code snippets appreciated!
Nightwatch 8.3.1 | Node v16.14.0 | Windows 10 | msedgedriver v106.0.1370
Beta Was this translation helpful? Give feedback.
All reactions