I wrote a code to automatise the inscriptions for a sneakers raffle, but the main problem I have is that webdriver is unable to find the elements, which I find really odd. I'll put the link to the website and the sample of my code that is relevant. Maybe this is due to an anti-bot, but that seems unlikely since the site seems to lack of security. This is the website:
I try down here to find the element by a short xpath, long xpath and ID but neither one of them work.
driver = webdriver.Chrome(executable_path='../drivers/chromedriver', chrome_options=options)
driver.get('https://r1.dotmailer-surveys.com/2a5ece38e398a86d1d2ieba093b44fa8fd3a-610c7264a82913e254v5f2457bdb04a5a308')
time.sleep(delay)
search = driver.find_element_by_id('textbox-3').send_keys(Prenom)
time.sleep(delay)
search = driver.find_element_by_xpath('//*[@id="textbox-4"]').send_keys(Nom)
time.sleep(delay)
search = driver.find_element_by_xpath('/html/body/form/div[2]/div/div/div/div[2]/div/div[1]/div/div[10]/input').send_keys(Mail)
time.sleep(delay)
It always returns me an error message even when I put a big delay or webdriverwait. I'm super confused, if someone could help me i would be really thankful. This is the error message I get:
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[id="textbox-3"]"}
You can go check out the website if you like to verify that this is indeed the good IDs and Xpaths.
I'm really clueless about what's going on. I don't know if it's relevant but I use python.
Thanks for your help!