I'm trying to fill in a webform with selenium and python. I'm looping trough all input fields and sending each a "Test" string.
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome('C:/Users/kbu/chromedriver.exe')
driver.get('https://skovbakken.halbooking.dk/proc_error.asp')
all_inputs = driver.find_elements_by_xpath("//input[@class='textbox_login']")
for input in all_inputs:
input.send_keys("Test")
Only the first is filled out. Why is that?
This is the error i get:
Traceback (most recent call last):
File "C:\Users\kbu\Dropbox\Python\squash.py", line 10, in <module>
input.send_keys("Test")
File "C:\Users\kbu\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\remote\webelement.py", line 477, in send_keys
self._execute(Command.SEND_KEYS_TO_ELEMENT,
File "C:\Users\kbu\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\remote\webelement.py", line 633, in _execute
return self._parent.execute(command, params)
File "C:\Users\kbu\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\kbu\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
(Session info: chrome=84.0.4147.125)
Here is the HTML: