We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d90f7ba commit 882afbaCopy full SHA for 882afba
1 file changed
py/selenium/webdriver/remote/switch_to.py
@@ -89,8 +89,8 @@ def frame(self, frame_reference: Union[str, int, WebElement]) -> None:
89
except NoSuchElementException:
90
try:
91
frame_reference = self._driver.find_element(By.NAME, frame_reference)
92
- except NoSuchElementException:
93
- raise NoSuchFrameException(frame_reference)
+ except NoSuchElementException as exc:
+ raise NoSuchFrameException(frame_reference) from exc
94
95
self._driver.execute(Command.SWITCH_TO_FRAME, {"id": frame_reference})
96
0 commit comments