Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to switch focus to another window? #3023

govindn started this conversation in General
Discussion options

What are you trying to achieve?

I am trying to login to my app but via social login i.e. facebook or google

steps:

  • open login url(where various login options present i.e. inbuilt login of app, login via facebook/google)
  • click on 'login via facebook'
  • a new window open where you have to enter facebook login id and password
  • question is : how to switch focus to facebook login window now??

What do you get instead?

is there something like 'switchToNextTab' for switch window as well

Provide console output if related. Use --verbose mode for more details.

# paste output here

Provide test source code if related

// paste test

Details

  • CodeceptJS version: 1.4.6
  • NodeJS Version: 5.6.0
  • Operating System: macOS
  • Protractor || WebDriverIO || Nightmare version (if related) : protractor
  • Configuration file:
# paste suite config here
You must be logged in to vote

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

@govindn In case the solution proposed by @peterngtr is not sufficient I would suggest having a look over wdio switchWindow and implement it through a helper
https://webdriver.io/docs/api/browser/switchWindow.html

You must be logged in to vote
0 replies
Comment options

After 2 and a bit years I would hope this has been addressed. Has there been any updates on this? I too have a similar issue but in this case it is making a purchase from a third party checkout window, the basket page greyed out and a new window opens with the checkout form in it, how can you move focus from the background window to the foreground window?

You must be logged in to vote
1 reply
Comment options

Have you tried this? Or the suggestion here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Converted from issue

This discussion was converted from issue #1614 on September 05, 2021 17:33.

AltStyle によって変換されたページ (->オリジナル) /