I've got a script writing values into a web page, and all values write except for one field that keeps throwing up the following error:
(Screenshot provided b/c in other similar questions many comments said this is impossible to happen on a web page.)
"Please enter a numeric value."
Here's my code:
workcenter_to_add = {}
workcenter_to_add['BatchCycle'] = str(2.78)
# driver = my_chrome_webpage
WebDriverWait(driver, wait_time).until(EC.presence_of_element_located((By.XPATH, "//input[@id='BatchSize']"))).send_keys(workcenter_to_add['BatchCycle'])
As everyone knows, if I do not input the 2.78
value in as a string
WebDriver
throws an error. But my page demands a numeric value. I'm stuck.
I've Googled around and not found a usable answer to this. It seems if you're using Java
there's a setAttribute
method you can use, but if you're using Python
you've got to figure something out.
For example, the question here looked promising but I could not find the String
or how to import it to get it to work. There's a couple of other much older questions that talk about executing java
but I have had no luck getting them to work.
I've got the page-source HTML here: https://drive.google.com/open?id=1xRNPfc5E65dbif_44BQ_z_4fMYVJNPcs