示例#1
0
        public void UserProfileNotVisible()
        {
            //   System.Threading.Thread.Sleep(5000);
            bool elementPresent = IsElementPresent(HelperFactory.SelectorByAttributeValue("data-qa", "signin-link"));

            Assert.IsTrue(elementPresent);
        }
示例#2
0
        public void UserLoggedOut()
        {
            Actions action  = new Actions(driver);
            var     element = driver.FindElement(HelperFactory.SelectorByAttributeValue("data-qa", "popupwindow-icon-userprofile"));

            action.MoveToElement(element).Perform();
            ClickTheButtonByAttributeValue(String.Empty, "data-qa", "popupwindow-link-logout");
        }
示例#3
0
        public void EnterTextIntoTextField(string text, string textFieldName, string atribute, string atrributeValue)
        {
            var WebDriverExtensions = new WebDriverExtensions(driver);
            var textField           = WebDriverExtensions.FindElement(HelperFactory.SelectorByAttributeValue(atribute, atrributeValue));

            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
            textField.SendKeys(text);
        }
示例#4
0
        public void UserProfileVisible()
        {
            CheckIfElementContainsText("You don't have any websites yet. Click Get Started to create your first website.", "h5");
            Actions action  = new Actions(driver);
            var     element = driver.FindElement(HelperFactory.SelectorByAttributeValue("data-qa", "popupwindow-icon-userprofile"));

            action.MoveToElement(element).Perform();
            bool elementPresent = IsElementPresent(HelperFactory.SelectorByAttributeValue("class", "user-name"));

            Assert.IsTrue(elementPresent);
        }
示例#5
0
        public void ClickTheButtonByAttributeValue(string buttonName, string atribute, string atrributeValue)
        {
            var button = driver.FindElement(HelperFactory.SelectorByAttributeValue(atribute, atrributeValue));

            button.Click();
        }