public List <Ticket> GetTickets() { IWebElement[,] data = TableUtils.getTableData(TblHeaders, TblContents); List <Ticket> tickets = new List <Ticket>(); for (int i = 1; i < data.GetLength(0); i++) { Ticket ticket = new Ticket(); for (int j = 0; j < data.GetLength(1); j++) { ticket[_tableOrder[j]] = data[i, j].Text; } tickets.Add(ticket); } return(tickets); }
public void TC10_UserBookOneTicket() { Console.WriteLine("TC10 - User can book 1 ticket at a time"); HomePage homePage = new HomePage(); homePage.Open(); LoginPage loginPage = homePage.GoToLoginPage(); homePage = loginPage.Login(Constant.ValidUsername, Constant.ValidPassword); MyTicketPage myTicketPage = homePage.GoToMyTicketPage(); IWebElement[,] test = TableUtils.getTableData(myTicketPage.GetTableHeader(), myTicketPage.GetTableContent()); //1. Navigate to QA Railway Website //2. Login with a valid account //3. Click on "Book ticket" tab //4. Select a "Depart date" from the list //5. Select "Sài Gòn" for "Depart from" and "Nha Trang" for "Arrive at". //6. Select "Soft bed with air conditioner" for "Seat type" //7. Select "1" for "Ticket amount" //8. Click on "Book ticket" button //VP. Message "Ticket booked successfully!" displays.Ticket information display correctly (Depart Date, Depart Station, Arrive Station, Seat Type, Amount) }
public List <Ticket> GetTickets() { IWebElement[,] data = TableUtils.getTableData(TblHeaders, TblContents); return(null); }