public static void ScrollToAndClick(By locator)
        {
            IWebElement element = GenericHelper.GetElement(locator);

            ExecuteScript("window.scrollTo(0," + element.Location.Y + ")");
            Thread.Sleep(300);
            element.Click();
        }
        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"));
            }
        }
 public static void SelectElementByValue(By locator, string valueTexts)
 {
     select = new SelectElement(GenericHelper.GetElement(locator));
     select.SelectByValue(valueTexts);
 }
 public static void SelectElementByText(By locator, string visibletext)
 {
     select = new SelectElement(GenericHelper.GetElement(locator));
     Thread.Sleep(20000);
     select.SelectByText(visibletext);
 }
 //************************end of  WITH WAIT *******************************//
 public static void SelectElementByIndex(By locator, int index)
 {
     select = new SelectElement(GenericHelper.GetElement(locator));
     select.SelectByIndex(index);
 }
 public static IList <string> GetAllItem(By locator)
 {
     select = new SelectElement(GenericHelper.GetElement(locator));
     return(select.Options.Select((x) => x.Text).ToList());
 }
 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);
 }
        public static void ClickRadioButton(By locator)
        {
            element = GenericHelper.GetElement(locator);

            element.Click();
        }