Hey there! any question in your mind? Ask It Now!.

Popular Categories





4/100 how to validate numbers like this dynamically

+1 vote
85 views
asked in Programming by anonymous
the number 4 is changing every time ,how to validate dynamically.

1 Answer

0 votes
answered by Himanshu Expert (5,940 points)

String strID1 = driver.findElement(By.xpath("Xpath here");
                        String[] parts = strID1.split("/");
                        String part1 = parts[0];

Now you can validate part1, in your case 4/100.

part1 will return 4. I hope you got my point.

Related Questions

+1 vote
1 answer 2,307 views
+5 votes
7 answers 14,757 views
+2 votes
1 answer 1,350 views
+1 vote
1 answer 585 views
+2 votes
1 answer 156 views
+2 votes
2 answers 870 views

Not a Member yet?

Ask to Folks Login

My Account
739 Folks are online
0 members and 739 guest online
Your feedback is highly appreciated