diff --git a/py/test/selenium/webdriver/common/frame_switching_tests.py b/py/test/selenium/webdriver/common/frame_switching_tests.py index 828c0d53f54ba..532705a19dbd8 100644 --- a/py/test/selenium/webdriver/common/frame_switching_tests.py +++ b/py/test/selenium/webdriver/common/frame_switching_tests.py @@ -139,7 +139,7 @@ def testShouldEnsureElementIsAFrameBeforeSwitching(self): try: self.driver.switch_to.frame(frame) - self.fail("Should have thrown NoSuchElementException") + self.fail("Should have thrown NoSuchFrameException") except NoSuchFrameException: # Do nothing. pass @@ -160,7 +160,7 @@ def testFrameSearchesShouldBeRelativeToTheCurrentlySelectedFrame(self): try: self.driver.switch_to.frame("second") - self.fail("Should have thrown NoSuchElementException") + self.fail("Should have thrown NoSuchFrameException") except NoSuchFrameException: # Do nothing pass