In an automation code, I want to fill the text-box with a number greater than 0. setvalue() doesn't work. A user would have to click on the up arrow (see picture) to make the text-box editable. How can I make this happen?
<input aria-invalid="false" autocomplete="off" class="MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputMarginDense MuiOutlinedInput-inputMarginDense" id="yieldGoal" name="yieldGoal" placeholder="0.00" type="number" min="0.01" step="0.01" data-test="new-program-form__yield-goal-input" value="0.00">
So far I have attempted to set the attributes step
, value
with a value large than 0.0. It did not work.
$('#yieldGoal').setAttribute('step', "2.0")
Increment the value in the text-box
Please use
val
to set the value of an input element.Hope this will solve the issue.