I am currently trying to click on each link which lead give me more info on the restaurants. https://www.halton.ca/For-Residents/Food-Safety/Dinewise/Search-Directory-of-Food-Premises-Dinewise.
The first restaurant is 151 Social and I am trying to click on it but doesn't seem to be working for me. I already compiled a pd.Series consisting of the xpath links to each restaurant
//*[@id="lblContent"]/div[3]/table/tbody/tr[1]/td[1]/a
That is just for the first restaurant
for element in range(len(df['Temp xPath links'])):
frame = WebDriverWait(driver, 30).until(EC.frame_to_be_available_and_switch_to_it((By.ID,"iframe-form")))
ref = WebDriverWait(driver, 30).until(EC.presence_of_element_located(By.xpath(df['Temp xPath links'][element])))
driver.execute_script("arguments[0].scrollIntoView();", ref)
driver.execute_script("arguments[0].click();", ref)
I'm struggling to enter to the next page. Any help will be great.