I want to find the element and check its stock status, but cannot find the element
my code:
while staleElement:
driver.get(list_url)
list_items = driver.find_elements_by_xpath('//li[@class="a-spacing-none g-item-sortable"]')
for item in list_items:
basket = False
try:
basket = item.find_elements_by_xpath('//a[@class="a-button-text a-text-center"]')
except exceptions.StaleElementReferenceException as e:
basket = item.find_elements_by_xpath('//a[@class="a-button-text a-text-center"]')
print(basket[0].text)
console:




