Exemple #1
0
 public void WhenAddFirstFixedOddsTickets()
 {
     FixedOdd[] fixedOdds = (FixedOdd[])_scenarioContext["fixedOdds"];
     //Assert.AreEqual("Add tickets" , usersP.GetTicketTitleText());   after addTicket
     for (int i = 0; i < fixedOdds.Length; i++)
     {
         usersP.ClickAddTicket();
         usersP.ChooseCompetitionFixedOdds();
         usersP.ChooseProduct(fixedOdds[i].Title);
         if (fixedOdds[i].TicketsLeft < 0)
         {
             throw new Exception("your " + fixedOdds[i].Title + " has negative TicketsLeft " + fixedOdds[i].TicketsLeft);
         }
         else
         if (fixedOdds[i].TicketsLeft > 1)
         {
             try { usersP.SetTicketsAmountTwo(); }
             catch (ElementNotInteractableException e)
             {
                 Console.WriteLine("NotInteract. " + fixedOdds[i].Title);
                 usersP.ChooseProduct(fixedOdds[i].Title);
             }
         }
         else if (fixedOdds[i].TicketsLeft == 1)
         {
         }
         usersP.ClickSaveBtn();
     }
 }