This is a weird issue I have ran into and I can't find any solution for this across the internet. I was using selenium in google colab to scrape a website and my code was working completely fine. I woke up the next day and ran the code again without changing a single line and don't know how/why my code starting giving me this error, AttributeError: 'WebDriver' object has no attribute 'find_element_by_link_text'. Same for find_element_by_class_name and id etc. I then rechecked a previously working script just to confirm and that gave me the same error too. I am confused about what happened suddenly and the scripts started giving me these errors.
How do I solve this? What am I doing wrong here?
!pip install selenium
!apt-get update
!apt install chromium-chromedriver
from selenium import webdriver
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
driver = webdriver.Chrome('chromedriver',options=chrome_options)
driver.get("https://petrowiki.spe.org/PetroWiki")
driver.title #this line is returning the correct title value, code is able to access the url
peh = driver.find_element_by_link_text('Pet. Eng. Handbook')
peh.click()