I have a site and I need to fill an input field. Only the field with 37.75 is causing a problem, it is not disabled it has a placeholder and I can interact with it easily myself, but when it comes to selenium, I can't.
I have tried:
self.driver.execute_script(f"document.getElementById('product_length').value='{str(depth10)}'")
This did nothing
pyperclip.copy(str(depth10))
self.driver.find_element_by_id("product_length").click()
pclip.paste()
self.driver.find_element_by_id("product_length").send_keys(str(depth10))
Every find_element_by_id() returned the exception:
selenium.common.exceptions.ElementNotInteractableException: Message: Element <input id="product_length" class="input-text wc_input_decimal" name="_length" type="text"> could not be scrolled into view
I used Expected Conditions & WebdriverWait with element_to_be_clickable()
but it couldn't find it in 2 minutes
I also tried:
actions.move_to_element(element).perform()
and
driver.execute_script("arguments[0].scrollIntoView();", element)