1

So I declared an integer. And I have an input field. And I want to use whatever I have stored in the integer as value for that input field. Is it possible?

Here is the code, with the ideal ending:

int avPartQty = Integer.parseInt(avPartQty_substring);
actions.searchResultsVa_SelectAvailPartQty(driver).sendKeys(+avPartQty); //wish it was that easy, lol.

This is my text box:

<input name="txtQty" value="1" maxlength="5" id="txtQty" class="textboxnumeric" onkeypress="return ValidateForDecimal(this, event);" style="color:Black;width:25px;" type="text">
zuri
  • 73
  • 1
  • 9

1 Answers1

2

you can use below code for this,

int avPartQty = Integer.parseInt(avPartQty_substring); actions.searchResultsVa_SelectAvailPartQty(driver).sendKeys(avPartQty+"");

Raghav N
  • 201
  • 1
  • 6