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?
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It only takes a minute to sign up.Sign up to join this community
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.
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.