Hi,
I am learning Selenium. You help will be appreciated.
If I want to select a deal from list via lowest total price and Star rating of a hotel how do I do it for my following code?
Thanks in advance.
…………………………………………….
WEBPAGE: http://www.priceline.com/
This is my code:
……………………………………….
List<WebElement> hotels = driver.findElements(By.className ("vplisting"));
for(WebElement item : hotels){
String name = item.getText();
System.out.println(name);
}
……………………………………………………….
SOME OF THE Results are:
Days Inn Fort Myers South/Airport
1.0 star
5.0
out of 10 from 107 guest reviews
Fort Myers, Florida
Details | Amenities | Map | Photos
Freebies: Special Discounted Rate (on select rooms)
Freebies: Free breakfast, free internet in room
$716.79
Per Person
Total Price $716.79
includes flight + hotel
and taxes & fees
Flight Summary
JetBlue Airways
View Details For This Flight | Baggage Fees
New York City, NY (JFK) ? Fort Myers, FL (RSW)
Departing ··· May 01, 2015 6:20AM - 9:21AM JetBlue Airways (Non-stop)
Returning ··· May 10, 2015 10:10AM - 12:55PM JetBlue Airways (Non-stop)
Travelodge Fort Myers
1.0 star
6.2
out of 10 from 275 guest reviews
Fort Myers, Florida
Details | Amenities | Map | Photos
Freebies: Special Discounted Rate (on select rooms)
Freebies: Free breakfast, free internet in room
$773.58
Per Person
Total Price $773.58
includes flight + hotel
and taxes & fees
Flight Summary
JetBlue Airways
View Details For This Flight | Baggage Fees
New York City, NY (JFK) ? Fort Myers, FL (RSW)
Departing ··· May 01, 2015 6:20AM - 9:21AM JetBlue Airways (Non-stop)
Returning ··· May 10, 2015 10:10AM - 12:55PM JetBlue Airways (Non-stop)
Crestwood Suites Of Fort Myers
1.0 star
5.2
out of 10 from 101 guest reviews
Fort Myers, Florida
Details | Amenities | Map | Photos
Freebies: Free internet in room and free parking
$902.10
Per Person
Total Price $902.10
includes flight + hotel
and taxes & fees
Flight Summary
JetBlue Airways