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