Example #1
0
        public void MakeSearchOfItem(string itemName)
        {
            var homePage = new HomePage();

            homePage.SearchInput.ClearAndType(itemName + Keys.Enter);

            WaitUntil.ConditionIsMet(x => homePage.BuyBtn.IsElementPresent());
        }
Example #2
0
        public HomePageAction Authentication(User user)
        {
            var mainPage = new MainPage();

            mainPage.SignInLink.Click();

            var loginDialog = mainPage.LoginDialog;

            loginDialog.UserNameInput.ClearAndType(user.UserName);
            loginDialog.PasswordInput.ClearAndType(user.UserPassword);
            loginDialog.SubmitBtn.Click();

            var homePage = new HomePage();

            //NOTE: Example of Wait
            WaitUntil.ConditionIsMet(x => homePage.NameContainer.Text.Contains(user.FirstName), timeOut: 20);

            return(new HomePageAction());
        }
 public void CloseDialog()
 {
     WaitUntil.ConditionIsMet(x => CloseBtn.IsElementPresent());
     CloseBtn.Click();
     WaitUntil.ConditionIsMet(x => !CloseBtn.IsElementPresent());
 }