Selenium > new windows & pop-up : What is different between new window and browser alert in selenium?



  • This is very common scenario when we automate any web application. But I am little confused between new window and pop-up?

    Please can you add little examples?



    1. A new window is basically a new webpage that opens in a separate window or a tab depending on your browser settings.

    Since you have asked for examples, here it is e.g. visit appium tutorial webpage. Click on any chapter say chapter 1. It will take you to new window/tab.

    1. An alert box or pop up window is often used if you want to make sure information comes through to the user or you want user to take certain action. Here webpage remains same.

    for alert, think of any website which pops up message as "Do you want to continue", "Click on OK to continue", "Are you sure want to Cancel" etc

    Click on try it.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2