I'm trying to scrape this page. Before getting into the page listings, a Select Location window pops up, so I'm trying to tell selenium to click two buttons in order to access the product listings.
Problem is, Selenium is not able to locate the xpath I'm using to locate this two buttons!
Here's my code:
from selenium import webdriver
driver = webdriver.Chrome("webdriver/chromedriver.exe")
driver.implicitly_wait(30)
driver.get("https://www.indiacashandcarry.com/shop/HomestyleFood")
locationButton = driver.find_element_by_xpath('//*[@id="location-list"]/li[1]/h4/a')
groceriesButton = driver.find_element_by_xpath('//*[@id="price-list-0"]/ul/li[1]')
locationButton.click()
groceriesButton.click()
Here's the site: https://www.indiacashandcarry.com/shop/HomestyleFood
I'm thinking it is because this popup is on other type of frame, but I couldn't find any iframe index, so I'm a bit lost. Please help!
