Forums

visibility_of_all_elements_located: Attribute Error

selenium.webdriver.support.expected_conditions' has no attribute 'visibility_of_all_elements_located

Any idea why? Does this have to do with the version of selenium:

Code:

priceFound = wait.until(EC.visibility_of_all_elements_located((By.XPATH, "//span[@class='a-price']")))
for price in priceFound:
        print(price.text)

I’m no expert, but visibility_of_all_elements_located isn’t isn’t an attribute of selenium as the error suggests, see all attributes here:

https://selenium-python.readthedocs.io/waits.html

Remove the “all” and it’ll work.

thanks @dreid254!

https://www.selenium.dev/selenium/docs/api/py/webdriver_support/selenium.webdriver.support.expected_conditions.html

Not sure if this is a version issue. The above is from Selenium 3.141 documentation

could certainly be- what's the version of selenium that you are using?

2.53.6! I think that is very old ok sorry, that was stupid

I just installed it and will try again

I hope that it helped.