Пример #1
0
        public void ThenSuccessfulLogINMessageShouldDisplay()
        {
            WaitforElement.wait();
            string message = _registerpage.AccountCreated();

            Assert.AreEqual("Welcome to your account. Here you can manage all of your personal information and orders.", message);
        }
Пример #2
0
        public bool ShoppingCartSummaryPage()
        {
            WaitforElement.wait();
            bool summarytable = Hooks.driver.FindElementById("order-detail-content").Displayed;

            return(summarytable);
        }
Пример #3
0
 public void ClickdeleteButton()
 {
     for (int i = 1; i <= 2; i++)
     {
         deleteButton.Click();
         WaitforElement.wait();
     }
 }
Пример #4
0
        public void ClickWomenSummerDresses()
        {
            Actions action = new Actions(Hooks.driver);

            action.MoveToElement(womenMenu).Perform();
            WaitforElement.wait();
            summerdressesdropdownMenu.Click();
        }
Пример #5
0
        //button[@name="processCarrier"]

        public void ClickblouseWomenDropdownMenu()
        {
            Actions action = new Actions(Hooks.driver);

            action.MoveToElement(womenMenu).Perform();
            WaitforElement.wait();
            blousesdropdownMenu.Click();
        }
Пример #6
0
        public void ClickByCheque()
        {
            IJavaScriptExecutor js = (IJavaScriptExecutor)Hooks.driver;

            js.ExecuteScript("window.scrollBy(0,450)", "");
            WaitforElement.wait();
            ClickbyCheck.Click();
        }
Пример #7
0
        public void ClickPayByWire()
        {
            IJavaScriptExecutor js = (IJavaScriptExecutor)Hooks.driver;

            js.ExecuteScript("window.scrollBy(0,450)", "");
            WaitforElement.wait();
            ClickPaybyWire.Click();
        }
Пример #8
0
        public void ClickProceedCheckoutAddress()
        {
            IJavaScriptExecutor js = (IJavaScriptExecutor)Hooks.driver;

            js.ExecuteScript("window.scrollBy(0,450)", "");
            WaitforElement.wait();
            proceedtocheckoutAddress.Click();
        }
Пример #9
0
        public void ClickBlouse()
        {
            // Actions actions = new Actions(Hooks.driver);
            // actions.MoveToElement(blousedress).Perform();
            //WaitforElement.wait();
//actions.Click();

            IJavaScriptExecutor js = (IJavaScriptExecutor)Hooks.driver;

            js.ExecuteScript("window.scrollBy(0,250)", "");
            WaitforElement.wait();
            blousedress.Click();
        }
Пример #10
0
 public bool BookingIsDisplayed()
 {
     for (int i = 0; i <= 5; i++)
     {
         bool searchIconPresence = Hooks.driver.FindElementByClassName("row").Displayed;
         if (searchIconPresence == true)
         {
             WaitforElement.wait();
             return(true);
         }
         else
         {
             return(false);
         }
     }
     return(false);
 }
Пример #11
0
        public void AddtoCart()
        {
            IJavaScriptExecutor js = (IJavaScriptExecutor)Hooks.driver;

            js.ExecuteScript("window.scrollBy(0,250)", "");
            WaitforElement.wait();
            // String parentHandle = Hooks.driver.CurrentWindowHandle; // get the current window handle
            addtocart.Click();
            WaitforElement.wait();
            //IWebElement newFrame = Hooks.driver.FindElementByClassName("clearfix");
            //Hooks.driver.SwitchTo().NewWindow(0);
            Hooks.driver.SwitchTo().Window(Hooks.driver.WindowHandles.Last());

            //// foreach (String winHandle in Hooks.driver.CurrentWindowHandle)
            // {
            //    Hooks.driver.SwitchTo().Window(winHandle); // switch focus of WebDriver to the next found window handle (that's your newly opened window)
            // }
            // foreach (string winHandle in context.GetDriver().WindowHandles)
            // {

            //     context.GetDriver().SwitchTo().Window(winHandle);
            //                           }

            // Store the current window handle
            // String winHandleBefore = Hooks.driver.CurrentWindowHandle;

            // Perform the click operation that opens new window

            // Switch to new window opened
            //for (String winHandle : Hooks.driver.CurrentWindowHandle)
            //{
            //    Hooks.driver.SwitchTo().Window(winHandle);
            //}

            //// Perform the actions on new window

            //// Close the new window, if that window no more required
            //Hooks.driver.Close();

            //// Switch back to original browser (first window)
            //Hooks.driver.SwitchTo().Window(winHandleBefore);

            //// Continue with original browser (first window)
        }
 public void WhenTheClickOnTheSaveButton()
 {
     WaitforElement.wait();
     _formObjects.ClicksaveButton();
 }
 public void ThenTheUserInformationIsDisplayed()
 {
     WaitforElement.wait();
     Assert.IsTrue(_formObjects.BookingIsDisplayed());
 }
 public void WhenTheUserEntersTheDeposit(string deposit)
 {
     WaitforElement.wait();
     _formObjects.Enterdeposit(deposit);
 }
 public void WhenTheUserEntersTheCheckout(string checkout)
 {
     WaitforElement.wait();
     _formObjects.Entercheckout(checkout);
 }
 public void WhenTheUserEntersTheFirstname(string firstname)
 {
     WaitforElement.wait();
     _formObjects.Enterfirstname(firstname);
 }
 public void WhenTheUserEntersThePrice(int price)
 {
     WaitforElement.wait();
     _formObjects.EnterPrice(price);
 }
Пример #18
0
 public void ClickCreateAccountbutton()
 {
     createAccountbutton.Click();
     WaitforElement.wait();
 }
Пример #19
0
 public void Enteremailaddress()
 {
     WaitforElement.wait();
     mailTextbox.Clear();
     mailTextbox.SendKeys("*****@*****.**");
 }
Пример #20
0
 public void ClickProceedCheckout()
 {
     WaitforElement.wait();
     proceedtocheckout.Click();
 }
Пример #21
0
 public void WhenUserInputTheirEmailAddress()
 {
     WaitforElement.wait();
     _registerpage.Inputemail();
 }
 public void ThenTheUserDeleteTheBooking()
 {
     WaitforElement.wait();
     _formObjects.ClickdeleteButton();
 }
 public void WhenUserClickTheSign_InButton()
 {
     WaitforElement.wait();
     _loginpage.ClickSigninbutton();
 }
Пример #24
0
 public void GivenUserClickOnSign_InButton()
 {
     WaitforElement.wait();
     _registerpage.ClickSigninbutton();
 }