Ejemplo n.º 1
0
        public static void ClickTabByName(string tabName)
        {
            By tabSelector = null;

            if (tabName == "Settings")
            {
                tabSelector = By.CssSelector("nav > a:nth-child(7)");
            }
            else if (tabName == "Pull requests")
            {
                tabSelector = By.CssSelector("nav > span:nth-child(3) > a > span:nth-child(2)");
            }

            Waiter.UntilElementIsClickable(tabSelector, 5);
            Clicker.Click(tabSelector);
        }
Ejemplo n.º 2
0
 public static void SignIn()
 {
     Waiter.UntilElementIsClickable(By.LinkText("Sign in"), 10);
     Clicker.Click(By.LinkText("Sign in"));
 }
Ejemplo n.º 3
0
 public static void SignOut()
 {
     Waiter.UntilElementIsClickable(By.XPath(ProfileMenuXPath), 5);
     driver.FindElement(By.XPath(ProfileMenuXPath)).Click();
     driver.FindElement(By.CssSelector("button[type='submit'")).Click();
 }
Ejemplo n.º 4
0
        private static string PrefixOfElementsToSelect = "//*[@id='user-links']/li[2]/details/ul/a"; //must add the index at the end f.ex. [1]

        public static void CreateRepository()
        {
            Waiter.UntilElementIsClickable(By.XPath(AddElementXPath), 5);
            driver.FindElement(By.XPath(AddElementXPath)).Click();
            driver.FindElement(By.XPath(PrefixOfElementsToSelect + "[1]")).Click();
        }