internal string Execute(CommandParams param)
        {
            var         locatecommand = new GetVisibleElement();
            IWebElement element       = locatecommand.Execute(param);

            return(element.GetAttribute(param.InputData));
        }
        internal bool Execute(CommandParams param)
        {
            var         locatecommand = new GetVisibleElement();
            IWebElement element       = locatecommand.Execute(param);

            element.Clear();
            return(true);
        }
        internal bool Execute(CommandParams param)
        {
            var           locatecommand = new GetVisibleElement();
            IWebElement   element       = locatecommand.Execute(param);
            SelectElement select        = new SelectElement(element);

            select.SelectByText(param.InputData);
            return(true);
        }
        internal bool Execute(CommandParams param)
        {
            var         locatecommand = new GetVisibleElement();
            IWebElement element       = (IWebElement)locatecommand.Execute(param);
            var         driver        = param.Application.GetDriver();
            Actions     action        = new Actions(driver);

            action.MoveToElement(element).Build().Perform();
            return(true);
        }
        internal bool Execute(CommandParams param)
        {
            var         locatecommand = new GetVisibleElement();
            IWebElement element       = (IWebElement)locatecommand.Execute(param);

            element.Click();    //For IE
            element.Clear();
            element.SendKeys(param.InputData);
            element.SendKeys(Keys.Tab);     //For IE
            return(true);
        }
        internal bool Execute(CommandParams param)
        {
            var         locatecommand = new GetVisibleElement();
            IWebElement element       = locatecommand.Execute(param);

            if (!element.Displayed)
            {
                throw new ContinueRetryException("Element is not visible");
            }
            return(true);
        }
 internal string Execute(CommandParams param)
 {
     var locatecommand = new GetVisibleElement();
     IWebElement element = locatecommand.Execute(param);
     var text = element.Text;
     if (string.IsNullOrEmpty(text))
     {
         return text;
     }
     return text.Trim();
 }
        internal bool Execute(CommandParams param)
        {
            var         locatecommand = new GetVisibleElement();
            IWebElement element       = (IWebElement)locatecommand.Execute(param);
            string      text          = element.Text;

            if (!string.IsNullOrEmpty(text))
            {
                element.SendKeys(param.InputData);
            }
            return(true);
        }
Example #9
0
        internal bool Execute(CommandParams param)
        {
            var click = new ClickElement();

            click.Execute(param);
            var locatecommand = new GetVisibleElement();
            var element       = locatecommand.Execute(new CommandParams()
            {
                Application = param.Application, Locator = By.CssSelector(param.InputData)
            });

            return(true);
        }
        internal bool Execute(CommandParams param)
        {
            var         locatecommand = new GetVisibleElement();
            IWebElement element       = locatecommand.Execute(param);
            double      expected      = double.Parse(param.InputData);
            string      textvalue     = element.Text;
            double      value         = Helpers.Keywords.ExtractNumberFromString(textvalue);

            if (value != expected)
            {
                throw new ContinueRetryException(string.Format("Numeric value not as expected, actual value is {0}", textvalue));
            }
            return(true);
        }
Example #11
0
        internal bool Execute(CommandParams param)
        {
            var         locatecommand = new GetVisibleElement();
            IWebElement element       = locatecommand.Execute(param);
            var         cssClasses    = element.GetAttribute("class");

            if (string.IsNullOrEmpty(cssClasses))
            {
                return(false);
            }
            else
            {
                return(cssClasses.Contains(param.InputData));
            }
        }
Example #12
0
        internal string Execute(CommandParams param)
        {
            var         locatecommand = new GetVisibleElement();
            IWebElement element       = locatecommand.Execute(param);
            string      textvalue     = element.Text;

            if (string.IsNullOrEmpty(textvalue))
            {
                throw new ContinueRetryException("Element has no text value");
            }
            textvalue = textvalue.Trim();
            if (string.IsNullOrEmpty(textvalue))
            {
                throw new ContinueRetryException("Element has no text value");
            }
            return(textvalue);
        }
 internal bool Execute(CommandParams param)
 {
     try
     {
         var         locatecommand = new GetVisibleElement();
         IWebElement element       = locatecommand.Execute(param);
         if (element.Displayed)
         {
             throw new ContinueRetryException("Element is currently displayed");
         }
         return(true);
     }
     catch (ElementNotVisibleException)
     {
         //swallow - if not found then consider it not visible
         //loop if different exception
         return(true);
     }
 }