from selenium import webdriverfrom selenium.webdriver.common.keys import Keysimport time# Set up the webdriver (you need to have the appropriate browser driver installed, like chromedriver)driver = webdriver.Chrome()# Open myguichet.ludriver.get("https://www.myguichet.lu")#Time for me to log in into the pagetime.sleep(60)# Find the search box using XPath and input "1000"search_box = driver.find_element_by_xpath("//input[@id='fieldN20DA0']")search_box.send_keys("1000")# Wait for a few seconds to see the resulttime.sleep(5)# Close the browserdriver.quit()
A specific number has to be inputted in a text box, but the field does not get recognized. I have implemented a sleep timer so that I can log myself in and navigate to the page where the text box is located. I do not have made any complicated additions to my code and verified if there are iframes, which would block the input box.
I tried finding the element by id, name and css.selector. I've also tried using other inputs fields on the same website, which worked. I have also checked for no iframes.