To handle alerts popups we need to do switch to the alert window and call Selenium WebDriver Alert API methods.