0

Scenario : There is a button/link on a page opened in chrome browser and after clicking on a button/link it will navigate to the other link and opens in systems default browser i.e. Internet Explorer.

How to change the focus from chrome browser to internet explorer in selenium?

1 Answers1

0

This is not possible.

You are starting your Chrome browser using the Chromedriver. You cannot handle Internet Explorer with your Chromedriver. You would need to use the IEDriver. But as you did not start Internet Explorer using Selenium you would need to re-use an existing session. This is officially not supported see.

Nevertheless Tarun Lalwani was able to achieve this. See here and here.


I would suggest to save the link of the button/link before clicking on it and then start a new session using Internet Explorer and navigate to the saved link.

AndiCover
  • 1,724
  • 3
  • 17
  • 38