Chapter 7

Exception Handling & File I/O — quiz

5 questions · ~4 min

Chapter 7 quiz

Question 1 of 5

Your Selenium test calls `driver.findElement(By.id("submit"))` which throws `NoSuchElementException` when the element is missing. You want to log the failure and let the next test case run. What's the correct shape?