Skip to content
CodeKruPro

A command runs while an alert is open (Python)

QuizMedium-HardPython onlyAsked in: TCS

An alert is open and the test reads driver.title without switching. With default settings in Chrome, what happens?

  • UnexpectedAlertPresentException is raised and the alert is dismissed
  • The title is returned and the alert stays open
  • NoAlertPresentException is raised
  • UnhandledAlertException is raised

This question is part of Pro+

Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.

See Pro+

Already have Pro+? Sign in