Issue
How to enter numeric value into textbox in Selenium webdriver.
The code is below: sendKeys()
method is not working for numeric value, is there any alternative command for the integers.
@FindBy(id="toolbox-options-key")
private WebElement BillingRateTextBox;
public void createNewBill(String billingRate)
{
BillingRateTextBox.sendKeys(10);
}
Solution
You need to convert the Integer to String and pass them to sendKeys
like this:
element.sendKeys(String.valueOf(number))
Answered By - Ant's
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.