Exemple #1
0
        public static void ScrollIntoViewAndClick(By locator)
        {
            IWebElement element = GenericHelper.GetElement(locator);

            ExecuteScript("arguments[0].scrollIntoView()", element);
            ExecuteScript("arguments[0].click();", element);
            Thread.Sleep(300);
        }
Exemple #2
0
        public static void ScrollToAndClick(By locator)
        {
            IWebElement element = GenericHelper.GetElement(locator);

            ExecuteScript("window.scrollTo(0," + element.Location.Y + ")");
            Thread.Sleep(300);
            element.Click();
        }
Exemple #3
0
        public static bool IsRadioButtonSelected(By locator)
        {
            element = GenericHelper.GetElement(locator);
            string flag = element.GetAttribute("checked");

            if (flag == null)
            {
                return(false);
            }
            else
            {
                return(flag.Equals("true") || flag.Equals("checked"));
            }
        }
Exemple #4
0
 public static void ClickRadioButton(By locator)
 {
     element = GenericHelper.GetElement(locator);
     element.Click();
 }
 public static void ClearTextBox(By locator)
 {
     element = GenericHelper.GetElement(locator);
     element.Clear();
 }
 public static void TypeInTextBox(By locator, string text)
 {
     element = GenericHelper.GetElement(locator);
     element.SendKeys(text);
 }
Exemple #7
0
 public static void ClickButton(By locator)
 {
     _element = GenericHelper.GetElement(locator);
     _element.Click();
 }
Exemple #8
0
 public static void ClickLink(By Locator)
 {
     element = GenericHelper.GetElement(Locator);
     element.Click();
 }