Ejemplo n.º 1
0
        public bool IsProductReturned()
        {
            WaitforElement.ImplicitWaitforElement();
            bool messageicon = Hooks.driver.FindElementByClassName("icon-ok").Displayed;

            return(messageicon);
        }
Ejemplo n.º 2
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);
        }
Ejemplo n.º 3
0
        public bool ShoppingCartSummaryPage()
        {
            WaitforElement.wait();
            bool summarytable = Hooks.driver.FindElementById("order-detail-content").Displayed;

            return(summarytable);
        }
Ejemplo n.º 4
0
        //button[@name="processCarrier"]

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

            action.MoveToElement(womenMenu).Perform();
            WaitforElement.wait();
            blousesdropdownMenu.Click();
        }
Ejemplo n.º 5
0
        public void ClickByCheque()
        {
            IJavaScriptExecutor js = (IJavaScriptExecutor)Hooks.driver;

            js.ExecuteScript("window.scrollBy(0,450)", "");
            WaitforElement.wait();
            ClickbyCheck.Click();
        }
Ejemplo n.º 6
0
        public void ClickPayByWire()
        {
            IJavaScriptExecutor js = (IJavaScriptExecutor)Hooks.driver;

            js.ExecuteScript("window.scrollBy(0,450)", "");
            WaitforElement.wait();
            ClickPaybyWire.Click();
        }
Ejemplo n.º 7
0
        public void ClickProceedCheckoutAddress()
        {
            IJavaScriptExecutor js = (IJavaScriptExecutor)Hooks.driver;

            js.ExecuteScript("window.scrollBy(0,450)", "");
            WaitforElement.wait();
            proceedtocheckoutAddress.Click();
        }
Ejemplo n.º 8
0
 public void ClickdeleteButton()
 {
     for (int i = 1; i <= 2; i++)
     {
         deleteButton.Click();
         WaitforElement.wait();
     }
 }
Ejemplo n.º 9
0
        public void ClickWomenSummerDresses()
        {
            Actions action = new Actions(Hooks.driver);

            action.MoveToElement(womenMenu).Perform();
            WaitforElement.wait();
            summerdressesdropdownMenu.Click();
        }
Ejemplo n.º 10
0
        public void ClickProceedCheckoutShipping()
        {
            IJavaScriptExecutor js = (IJavaScriptExecutor)Hooks.driver;

            js.ExecuteScript("window.scrollBy(0,250)", "");
            termsofService.Click();
            WaitforElement.ImplicitWaitforElement();
            proceedtocheckoutShipping.Click();
        }
Ejemplo n.º 11
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();
        }
Ejemplo n.º 12
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);
 }
Ejemplo n.º 13
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 WhenTheUserEntersTheCheckout(string checkout)
 {
     WaitforElement.wait();
     _formObjects.Entercheckout(checkout);
 }
 public void WhenTheUserEntersTheDeposit(string deposit)
 {
     WaitforElement.wait();
     _formObjects.Enterdeposit(deposit);
 }
 public void WhenTheUserEntersThePrice(int price)
 {
     WaitforElement.wait();
     _formObjects.EnterPrice(price);
 }
 public void WhenTheUserEntersTheFirstname(string firstname)
 {
     WaitforElement.wait();
     _formObjects.Enterfirstname(firstname);
 }
Ejemplo n.º 18
0
 public void ClickCreateAccountbutton()
 {
     createAccountbutton.Click();
     WaitforElement.wait();
 }
Ejemplo n.º 19
0
 public void Enteremailaddress()
 {
     WaitforElement.wait();
     mailTextbox.Clear();
     mailTextbox.SendKeys("*****@*****.**");
 }
Ejemplo n.º 20
0
 public void WhenUserInputTheirEmailAddress()
 {
     WaitforElement.wait();
     _registerpage.Inputemail();
 }
Ejemplo n.º 21
0
 public void GivenUserClickOnSign_InButton()
 {
     WaitforElement.wait();
     _registerpage.ClickSigninbutton();
 }
 public void ThenTheUserDeleteTheBooking()
 {
     WaitforElement.wait();
     _formObjects.ClickdeleteButton();
 }
 public void WhenTheClickOnTheSaveButton()
 {
     WaitforElement.wait();
     _formObjects.ClicksaveButton();
 }
 public void ThenTheUserInformationIsDisplayed()
 {
     WaitforElement.wait();
     Assert.IsTrue(_formObjects.BookingIsDisplayed());
 }
Ejemplo n.º 25
0
 public void ClickProceedCheckout()
 {
     WaitforElement.wait();
     proceedtocheckout.Click();
 }
 public void WhenUserClickTheSign_InButton()
 {
     WaitforElement.wait();
     _loginpage.ClickSigninbutton();
 }
Ejemplo n.º 27
0
 public void GivenUserNavigateToTheHomePage()
 {
     Hooks.driver.Navigate().GoToUrl("http://automationpractice.com");
     WaitforElement.DriverWait();
     Hooks.driver.Manage().Window.Maximize();
 }