AttributeError: 'list' object has no attribute 'text' . (Python Selenium) . Help me with suggestion or solution
###Here is the code from selenium import webdriver from selenium.webdriver.common.by import By import time driver = webdriver.Chrome() driver.get("https://learn.letskodeit.com/p/practice") rows = len(driver.find_elements(By.XPATH,'//*[@id="product"]/tbody/tr')) cols = len(driver.find_elements(By.XPATH,'//*[@id="product"]/tbody/tr[2]/td')) print("Number of rows: {}".format(rows)) print("Number of cols: {}".format(cols)) for i in range(rows): for j in range(cols): path = driver.find_elements(By.XPATH,'//*[@id="product"]/tbody/tr[" + i + "]/*[" + j + "]') print(path.text) time.sleep(5) driver.quit() #####Here is the output Number of rows: 4 Number of cols: 3 Traceback (most recent call last): File "td_text.py", line 14, in <module> print(path.text) AttributeError: 'list' object has no attribute 'text'