By is not getting recognized while using driver.find_elements in selenium

80 views Asked by At

I was using selenium automation for web scraping while i notice that when i'm fetching an element of a search bar using its XPATH, "By" is not getting recognized. What am i doing wrong here?

I was trying to fetch an element using its XPATH and was expecting for the result to get print

1

There are 1 answers

1
Prophet On

You are missing an import

from selenium.webdriver.common.by import By