Reputation: 33
i am stuck with a situation where i have two textboxes with an (+) operator between it, now the values in these text boxes changes automaticalyy, user has to sum these values and write the sum and press nexxt to go to next page., as the values are changing i am not able to use selenium.getvalue evry time , can anyone suggest how to handle this.I am using selenium rc with testng , eclipse
Upvotes: 1
Views: 1080
Reputation: 4621
String tb1=selenium.getAttribute("xpath to ur textbox 1/@value");
String tb2=selenium.getAttribute("xpath to ur textbox 2/@value");
int FinalValue = Integer.parseInt(tb1)+Integer.parseInt(tb2);
Hope this would help you.
Upvotes: 1