It is quite clear in the error, the variable isn't defined
from selenium.webdriver.common.by import By