UI-Testing-Toolbox
UI-Testing-Toolbox copied to clipboard
ClickAndFillInWithRetriesAsync fails with numeric inputs on Chrome (OSOE-1168)
Problem
When using something like context.ClickAndFillInWithRetriesAsync(by, decimalValue.ToTechnicalString()) on an <input type="number"> element on Chrome, the driver goes haywire and spams the text resulting in a timeout exception. Example with desired input being 0.01:
ui-test-test-dump-.-Windows-X64-GitHub Actions 1001922741.zip
Workaround
A not-very-pretty workaround for simpler inputs is to code something like this instead:
var element = context.Get(by);
element.Click();
element.Clear();
element.SendKeysWithLogging(decimalValue.ToTechnicalString());
After Fixed
Revert this commit in OrchardCore.Commerce.
This most possibly has to do with the input being number and some weird Chrome behavior. The problem is that after the first input, the value will be 00.01.