How to Solve NameError: name 'Alert' is not defined -- selenium
Solution: Import the 'Alert' module
To Solve the error, add the following line to the top of your code.
from selenium.webdriver.common.alert import Alert
For more information:
Python selenium Alert