Beispiel #1
0
        public void WhenIFillInTravellerDetails()
        {
            Random rand     = new Random();
            var    emailGen = rand.Next(10000000).ToString() + "@gmail.com";

            Hooks.WaitIsDisplayed(PageObject.NameInput);
            PageObject.NameInput.SendKeys(Constants.FirstName);
            PageObject.SurnameInput.SendKeys(Constants.LastName);
            PageObject.BirthdateInput.Click();
            Hooks.WaitIsDisplayed(PageObject.BirthdateYearSelect, click: true);
            Hooks.WaitIsDisplayed(PageObject.BirthdateMonthSelect, click: true);
            Hooks.WaitIsDisplayed(PageObject.BirthdateDaySelect, click: true);
            PageObject.EmailInput.SendKeys(emailGen);
            PageObject.EmailRepeatInput.SendKeys(emailGen);
            PageObject.PhoneCodeField.Click();
            PageObject.PhoneCodeInput.SendKeys(Constants.PhoneCode);
            Hooks.WaitIsDisplayed(PageObject.PhoneCodeSelection, click: true);
            PageObject.PhoneNoInput.SendKeys(Constants.PhoneNo);
            PageObject.AddressInput.SendKeys(Constants.Address);
            PageObject.CityInput.SendKeys(Constants.City);
            PageObject.PostcodeInput.SendKeys(Constants.Postcode);
            PageObject.CountryInput.SendKeys(Constants.Country);
            Hooks.WaitIsDisplayed(PageObject.CountrySelect, click: true);
            Hooks.WaitIsDisplayed(PageObject.LanguageInput, click: true);
            Hooks.WaitIsDisplayed(PageObject.LanguageSelect, click: true);
            Hooks.WaitIsDisplayed(PageObject.TravelingAloneInput, click: true);
            Hooks.WaitIsDisplayed(PageObject.TCCheckbox, click: true);
            Hooks.WaitIsDisplayed(PageObject.NextStep, click: true);
        }
Beispiel #2
0
 public void WhenIFillInDetails()
 {
     Hooks.WaitIsDisplayed(PageObject.CommentInput);
     PageObject.CommentInput.SendKeys(Constants.Comment);
     PageObject.BookingNoInput.SendKeys(Constants.BookingNo);
     Hooks.WaitIsDisplayed(PageObject.NextStep, click: true);
 }
Beispiel #3
0
        public void WhenISignAggreement()
        {
            Thread.Sleep(3000);
            Actions builder    = new Actions(Driver);
            IAction drawAction = builder.MoveToElement(PageObject.SignatureCanvas, 10, 10)
                                 .ClickAndHold()
                                 .MoveByOffset(50, 50)
                                 .Release()
                                 .Build();

            drawAction.Perform();
            Thread.Sleep(500);
            IAction drawAction1 = builder.MoveToElement(PageObject.SignatureCanvas, 30, 15)
                                  .ClickAndHold()
                                  .MoveByOffset(50, 60)
                                  .Release()
                                  .Build();

            drawAction1.Perform();
            Thread.Sleep(500);
            IAction drawAction2 = builder.MoveToElement(PageObject.SignatureCanvas, 80, 20)
                                  .ClickAndHold()
                                  .MoveByOffset(50, 70)
                                  .Release()
                                  .Build();

            drawAction2.Perform();
            Hooks.WaitIsDisplayed(PageObject.CompleteClaimButton, click: true);
        }
Beispiel #4
0
 public void WhenIEnterTestAirports()
 {
     Hooks.WaitIsDisplayed(PageObject.DeparturePort);
     PageObject.DeparturePort.SendKeys("Kaunas");
     Hooks.WaitIsDisplayed(PageObject.DepartureSelect, false, true);
     PageObject.ArrivalPort.SendKeys("Barcelona");
     Hooks.WaitIsDisplayed(PageObject.ArrivalSelect, false, true);
     PageObject.AirlinesInput.SendKeys("Ryanair");
     Hooks.WaitIsDisplayed(PageObject.AirlinesSelect, false, true);
     Hooks.WaitIsDisplayed(PageObject.FlightNoInput);
     PageObject.FlightNoInput.SendKeys("1568");
     Hooks.WaitIsDisplayed(PageObject.FlightDateInput, click: true);
     Hooks.WaitIsDisplayed(PageObject.FlightDateToday, click: true);
     Hooks.WaitIsDisplayed(PageObject.FlightCancelled, click: true);
     Hooks.WaitIsDisplayed(PageObject.FlightMoreThan3, false, true);
     Hooks.WaitIsDisplayed(PageObject.FlightLessThan14d, false, true);
     Hooks.WaitIsDisplayed(PageObject.AirlineReasonInput, false, true);
     Hooks.WaitIsDisplayed(PageObject.AirlineReasonSelect, false, true);
     Hooks.WaitIsDisplayed(PageObject.ReferralInput, false, true);
     Hooks.WaitIsDisplayed(PageObject.ReferralSelect, false, true);
     Hooks.WaitIsDisplayed(PageObject.NextStep, false, true);
 }
Beispiel #5
0
 public void ThenISeeThatClaimIsCompleted()
 {
     Hooks.WaitIsDisplayed(PageObject.ClaimSuccess);
 }