Hello
In an input field “amount” :
IWebElement amountElement = this.webDriverFactory.FindElement(How.Id, "amount");
this.webDriverFactory.MySendKeys(amountElement, this.theTest.User.Transfer.Amount.ToString(new CultureInfo("fr-FR")));
amountElement.SendKeys(Keys.Tab);
and:
public void MySendKeys(IWebElement element, string infos)
{
this.ScrollToElement(element);
element.Click();
element.SendKeys(infos);
}
with a decimal number: e.g., 2.10
Sometimes, the entered number is 210 ☹
I don’t know why …
If you know 😊
David
Numbers must be passed as strings
Clear before sending
For <input type="number"> fields
Hi
Thanks for reply.
And sometimes, the amount is 100 times too high, as if it doesn't take the decimal point into account. Probably a cultural issue.
But why not always then?
De : seleniu...@googlegroups.com <seleniu...@googlegroups.com>
De la part de SuperKevy
Envoyé : jeudi 29 janvier 2026 19:35
À : Selenium Users <seleniu...@googlegroups.com>
Objet : [selenium-users] Re: c# - sendKeys : decimal number
ATTENTION : cet e-mail provient d'une personne externe. Vérifiez toujours l’expéditeur avant d’ouvrir les pièces jointes ou de cliquer sur les liens.
Is the variable info as string? Copilot says...
1. Numbers must be passed as strings
2. Clear before sending
3. For <input type="number"> fields
On Thursday, January 29, 2026 at 8:20:06 AM UTC-6 n...@cph.be wrote:
Hello
In an input field “amount” :
IWebElement amountElement = this.webDriverFactory.FindElement(How.Id, "amount");
this.webDriverFactory.MySendKeys(amountElement, this.theTest.User.Transfer.Amount.ToString(new CultureInfo("fr-FR")));
amountElement.SendKeys(Keys.Tab);
and:
public void MySendKeys(IWebElement element, string infos)
{
this.ScrollToElement(element);
element.Click();
element.SendKeys(infos);
}
with a decimal number: e.g., 2.10
Sometimes, the entered number is 210 ☹
I don’t know why …
If you know 😊
David
====== DISCLAIMER ======
https://www.cph.be/maildisclaimer
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
selenium-user...@googlegroups.com.
To view this discussion visit
https://groups.google.com/d/msgid/selenium-users/80966909-2324-4f31-91ee-32a4ee6cc1dcn%40googlegroups.com.
Thanks for idea
I’ll try
De : seleniu...@googlegroups.com <seleniu...@googlegroups.com>
De la part de SuperKevy
Envoyé : vendredi 30 janvier 2026 23:47
À : Selenium Users <seleniu...@googlegroups.com>
Objet : Re: [selenium-users] Re: c# - sendKeys : decimal number
To view this discussion visit https://groups.google.com/d/msgid/selenium-users/4b678d76-0be9-419d-926d-2308529e00e3n%40googlegroups.com.