Selenium - Executescript numeric field.

Get help with using AutoHotkey and its commands and hotkeys
Axxi
Posts: 15
Joined: 02 Apr 2020, 10:56

Selenium - Executescript numeric field.

24 May 2020, 06:37

Hi!

Im trying to use the following code below to input a value into a numeric field (field that only allows numbers to be input), but i cant seem to find what i am missing, or if its even possible.

Code: Select all

driver.executeScript("arguments[0].setAttribute('value', '123')", driver.FindElementbyXpath("//input[@name='ItemPrice']"))
The code below is the element extracted from the page that is targeted.

Code: Select all

<input name="ItemPrice" class="editGridInactive numeric-value editGridField valid" data-bind="value: ItemPrice.formatted" data-maxlength="10" type="text" aria-invalid="false">

I can input into other fields in the same website that allows chars+numbers, but the fields that only allow numbers are not working :(

Thanks in advance.

Return to “Ask For Help”

Who is online

Users browsing this forum: jarhead, mikeyww and 45 guests