Html of input box with type number looks as below
<input id="noofItems" type="number" max="99" min="1" class="form-control" data-bind="value: noofItems" />
In my selenium test i have code which inputs number in that input box
[FindsBy(How = How.Id, Using = "noofItems"), CacheLookup]
private HtmlElement ItemsInput;
ItemsInput.WaitForVisible().SendKeys(Keys.Control + "a");
ItemsInput.WaitForVisible().SendKeys(Keys.Control + "x");
ItemsInput.WaitForVisible().SendKeys("2");
ItemsInput.WaitForVisible().SendKeys(Keys.Return); // need this to reload dom
ItemsInput.Click();
by default input box has value 1 but when test runs then i want to change to 2. But sometimes value changes to 12 instead of 2.
How to resolve this? I am using chromedriver.