I'm having trouble setting a value in a textbox after forcibly enabling it through JavaScript executor in my Selenium automation script using Ruby bindings.
input_fieldcar1 = browser.find_element(:xpath, "/html/body/div[5]/div/div[3]/div[2]/div[2]/div/div/div/div/div[2]/div[2]/div/div/div/div[2]/div/div/div[5]/div/div[2]/div[2]/div/div/div/div[4]/div/div/div[3]/div/div/input")
browser.execute_script('arguments[0].removeAttribute("disabled");', input_fieldcar1)
I attempted to use
input_fieldcar1.send_keys"7"
browser.execute_script('arguments[0].setAttribute("innerHTML","1");', input_field1)
both of which did not work as expected!
The script also ends without any errors being thrown.
What could be the missing or wrong step here?