Selenium Java - Handling Windows, Frames, and Alerts
You want to write a Selenium Java test that clicks Cancel on a confirmation alert only if the alert text contains the word "Delete". Which code snippet correctly implements this?
alert.getText().contains("Delete") to detect if alert text includes "Delete".dismiss() to click Cancel; otherwise, call accept().15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions