Python : 3.7.9
Selenium : 4.5.0
Error
appname = driver.find_element_by_xpath('//*[@id="__next"]/div/h1').text
AttributeError: 'WebDriver' object has no attribute 'find_element_by_xpath'
해결 방법
from selenium.webdriver.common.by import By
appname = driver.find_element(By.XPATH, '//*[@id="__next"]/div/h1').text
By.ID
By.NAME
By.XPATH
By.LINK_TEXT
By.PARTIAL_LINK_TEXT
By.TAG_NAME
By.CLASS_NAME
By.CSS_SELECTOR
https://www.selenium.dev/documentation/webdriver/getting_started/upgrade_to_selenium_4/