I'm learning how to automate websites using selenium but getting 'NoneType' Error.
selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(ChromeDriverManager().install())
driver = driver.get("https://soundcloud.com/")
When I try to focus the search Bar get "NoneType Error"
driver = driver.get("https://soundcloud.com/")
Problem is here you have assign driver.get()
in a variable
which is again driver
and which is having no attribute find_element_by_xpath()
Just change this. It will navigate to webpage.
driver.get("https://soundcloud.com/")
driver.find_element_by_xpath("your xpath")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.