I want to get value from web
For eg : Total AMount : 25000
and want to convert this value into integer to proceed comparision step but after printing totat_Amt
it displayed as
"java.lang.NumberFormatException: For input string: "25,000""
Here is my code :
WebElement gt = driver.findElement(By.id("totAmt"));
String total_Amt=gt.toString();
System.out.println("Total Amt:"+total_Amt);
//int total_amt_val =Integer.parseInt(total_Amt);
System.out.println(total_amt_val);
String total_Amt=gt.getText();
and post the total_Amt output here. Also post the html fragment.