Advertisement
Guest User

Untitled

a guest
Sep 29th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. /// <summary>
  2. /// Sets the number of adults for each room
  3. /// </summary>
  4. /// <param name="selector">The search type</param>
  5. /// <param name="adults">The number of adults</param>
  6. /// <param name="rooms">The number of rooms</param>
  7. public void SetNumberOfAdults(SearchType selector, List<int> adults, int rooms = 1)
  8. {
  9. for (int i = 0; i < rooms; i++)
  10. {
  11. report.Info(string.Format("Set adults dropdown number {0} to '{1}'", i + 1, adults[i]));
  12. app.SelectText(adults[i].ToString(), app.FindElement(By.XPath(string.Format("//div[contains(@class,'{0}')]//select[@name='stayDetails.roomRequests[{1}].adults']", selector.ToString(), i))));
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement