0
votes

I'm trying to use Selenium to scrap google maps unfortunatly its's not quite working,the element is not present on page load and is added after clicking on some button but it seems that the element is not always loaded when looking for it. (I'm talking about the carousel's items that appears after clicking on a shop,restaurant while doing a specific search)

I already tried to use the classic Selenium wait options.

Things I tried:

  • time.sleep()
  • WebDriverWait(driver,30).until(EC.visibility_of_element_located(...)
  • WebDriverWait(driver,30).until(EC.element_to_be_clickable(...)
  • WebDriverWait(driver,60).until(EC.presence_of_all_elements_located(...)

Even with theses things results are random, I sometimes can access the element via Selenium and sometimes I don't. It seem's that even with long waits, Selenium can't always access the web element even tho I can click it and see it.