public bool SelectTicket() { Page.ResultPage selectPage = new Page.ResultPage(_driver); try { selectPage.ClickTicket(); } catch (Exception) { return(false); } return(true); }
public bool CheckSortByAmount() { Page.ResultPage selectPage = new Page.ResultPage(_driver); var first = selectPage.GetFirstAmount().Split(new char[] { ' ' }); var second = selectPage.GetSecondAmount().Split(new char[] { ' ' }); var third = selectPage.GetThirdAmount().Split(new char[] { ' ' }); double amountFirst = Double.Parse(first[0] + first[1]); double amountSecond = Double.Parse(second[0] + second[1]); double amountThird = Double.Parse(third[0] + third[1]); if (amountFirst <= amountSecond && amountSecond <= amountThird) { return(true); } return(false); }
public bool CheckSortByTime() { Page.ResultPage selectPage = new Page.ResultPage(_driver); string[] first = selectPage.GetFirstTime().Split(new char[] { ' ' }); string[] second = selectPage.GetSecondTime().Split(new char[] { ' ' }); string[] third = selectPage.GetThirdTime().Split(new char[] { ' ' }); double firstTimeMinutes = Double.Parse(first[3].Replace("ч", "")) * 60 + Double.Parse(first[4].Replace("м", "")); double secondTimeMinutes = Double.Parse(second[3].Replace("ч", "")) * 60 + Double.Parse(second[4].Replace("м", "")); double thirdTimeMinutes = Double.Parse(third[3].Replace("ч", "")) * 60 + Double.Parse(third[4].Replace("м", "")); if (firstTimeMinutes <= secondTimeMinutes && secondTimeMinutes <= thirdTimeMinutes) { return(true); } else { return(false); } }
public void SelectSortByTime() { Page.ResultPage selectPage = new Page.ResultPage(_driver); selectPage.StartSort(); }