It was reported that WebUI.clearText()
does not work for a <input type="number">
<input type="number" id="quantity" name="quantity" min="1" max="5">
See for example
We can guess and understand this mess. A <input type="number">
requires a text value to be a number. Now a question arises. Having blank in the field – is it legal? Is a blank a number?
Well, principally, a blank is not number, a blank should be avoided there.
Then how browsers should react when Katalon Studio called WebUI.clearText()
for a <input type="number">
element?
Well, there would be no clear-cut answer. Browsers may behave in various manner.
- turn the field blank
- turn it to be the minimum value, or the maximum value, or 0
- just ignore the clearText() request
A possible approach would be saying that “you should not use WebUI.clearText() for <input type="number">
as the result is not deterministic”
Katalon should explain in the official document something to avoid confusion.