public bool IsElementVisible(GrabByType grabbytype, string grabberstring, int allowedWaitTimeInSeconds = 1)
        {
            try
            {
                GrabBy grabber = GrabBy.Create(grabbytype, grabberstring);
                By     by      = grabber.GetBy();

                System.TimeSpan timeToWait             = new TimeSpan(0, 0, allowedWaitTimeInSeconds);
                WebDriverWait   wait                   = new WebDriverWait(CTest.Driver, timeToWait);
                IWebElement     clickableElementOnPage = wait.Until(ExpectedConditions.ElementToBeClickable(by));

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Example #2
0
 public void Change(GrabByType type, string selectorstring)
 {
     GrabByType = type;
     selector   = selectorstring;
 }
Example #3
0
 public GrabBy(GrabByType type, string selectorstring)
 {
     GrabByType = type;
     selector   = selectorstring;
 }
Example #4
0
 public static GrabBy Create(GrabByType type, string selectorstring)
 {
     return(new GrabBy(type, selectorstring));
 }
Example #5
0
        public void SetOnPageLoadWaitForVisibilityOfThisElement(GrabByType bytype, string elementgrabberstring)
        {
            GrabBy by = GrabBy.Create(bytype, elementgrabberstring);

            OnPageLoadWaitForVisibilityOfThisElement = by;
        }
        public IWebElement FindClickableElement(IWebElement element, GrabByType type, string elementgrabber, int allowedWaitTimeInSeconds = DefaultWaitTime)
        {
            GrabBy by = GrabBy.Create(type, elementgrabber);

            return(GenericFindClickableElement(element, by, allowedWaitTimeInSeconds));
        }