Issue
I'm trying to scrape this website https://www.parkers.co.uk but for some reason I cannot seem to get past the cookies pop up, I've tried with this code
cookies = driver.find_element_by_xpath('//*[@id="notice"]/div[5]/button[2]') cookies.click()
but it doesn't seem to be working, what can I do?
Solution
Try this:
iframe = driver.find_element_by_xpath("//iframe[@title='SP Consent Message']")
driver.switch_to.frame(iframe)
driver.find_element_by_xpath("//button[@title='Accept All']").click()
Answered By - Gedas Miksenas
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.