We Are Going To Discuss About AttributeError: ‘WebDriver’ object has no attribute ‘findElement. So lets Start this Python Article.
AttributeError: ‘WebDriver’ object has no attribute ‘findElement
- How to solve AttributeError: 'WebDriver' object has no attribute 'findElement
selenium webriver in python doesn't have findElement method.
it has:driver.find_element(By.XPATH, 'your xpath')
try to check all of the methods with:print(dir(driver))
try the code:import time from selenium import webdriver from selenium.webdriver.common.by import By driver = webdriver.Chrome() driver.get("https://moitane.ge/shop/5-gudvili/43-axali-xorci-da-xorcproduqti") time.sleep(3) el = driver.find_element(By.XPATH, "//div[@class='style__ShopProductSubCategoryChip-sc-1bc3ssb-2 iKSeHs']") el.click() time.sleep(3) driver.quit()
- AttributeError: 'WebDriver' object has no attribute 'findElement
selenium webriver in python doesn't have findElement method.
it has:driver.find_element(By.XPATH, 'your xpath')
try to check all of the methods with:print(dir(driver))
try the code:import time from selenium import webdriver from selenium.webdriver.common.by import By driver = webdriver.Chrome() driver.get("https://moitane.ge/shop/5-gudvili/43-axali-xorci-da-xorcproduqti") time.sleep(3) el = driver.find_element(By.XPATH, "//div[@class='style__ShopProductSubCategoryChip-sc-1bc3ssb-2 iKSeHs']") el.click() time.sleep(3) driver.quit()
Solution 1
selenium webriver in python doesn’t have findElement method.
it has:
driver.find_element(By.XPATH, 'your xpath')
try to check all of the methods with:
print(dir(driver))
try the code:
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
driver = webdriver.Chrome()
driver.get("https://moitane.ge/shop/5-gudvili/43-axali-xorci-da-xorcproduqti")
time.sleep(3)
el = driver.find_element(By.XPATH, "//div[@class='style__ShopProductSubCategoryChip-sc-1bc3ssb-2 iKSeHs']")
el.click()
time.sleep(3)
driver.quit()
Original Author Vova Of This Content
Conclusion
So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.