WebDriverException is a base Selenium-WebDriver exception that could be used to catch all other Selenium-WebDriver exceptions
To be able to catch exception it should be imported first:
from selenium.common.exceptions import WebDriverException as WDE
and then:
try:
element = driver.find_el...