Currently i'm able to print all of them but i want to find out the largest and print only that value.
Can anyone please help me in building the code for this in Selenium Webdriver & Java.
Here is my code:
List <WebElement> Rating = oBrowser.findElements(By.xpath("//span[contains(@class, 'rating-out-of-five')]");
try{
for(WebElement starRating:Rating)
{
System.out.println(starRating.getText());
}
catch(Exception e){
System.out.println("Rating not found");
}