I am trying to web scrap and automatically fill forms in realtor website called daft.ie
. When I open the page using selenium since its logs in using incognito it shows the cookies pop up everytime.
I wrote this code to click on this button
from selenium import webdriver
from selenium.webdriver.common.by import By
PATH = "/Users/adam/Desktop/coding/daft/chromedriver"
driver = webdriver.Chrome(PATH)
driver.implicitly_wait(10)
link1= 'https://www.daft.ie/for-rent/griffith-wood-griffith-avenue-drumcondra-dublin-9/3523580'
driver.get(link1)
driver.find_element(By.LINK_TEXT, 'ACCEPT ALL').click()
But this gives me the following error:
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"link text","selector":"ACCEPT ALL"}
We can see that button exists with Accept All string, so why cant this find it? What am doing wrong here?
Also is there anyway to open the normal chrome through selenium, as if I want to fill forms after clicking on cookies button it would require me to log in using google sign in would be very hard to do, so if I can have my normal chrome open I would not need to sign in every-time I run the script.