Exemplo n.º 1
0
        public override void ElementRun(IRootElement root, IWebBrowser browser, ITestElement control)
        {
            String xPath = null;

            if (Text != null)
            {
                xPath = $".//button[contains(@class,'dropdown-item')][normalize-space()={Text.XPathText()}]";
            }
            browser.Click(control.GetElementByXPath(xPath));
            browser.Escape();
        }
Exemplo n.º 2
0
        public void RunAll(IWebBrowser browser, Action <IRunScenario> run)
        {
            foreach (var d in Declarations)
            {
                DeclareVariable(d.Name, d.Value);
            }

            browser.Escape();
            foreach (var sc in Scenarios)
            {
                var helper = browser.StartScenario(sc.Name, sc.Description);
                try
                {
                    sc.Run(this, browser, browser);
                    helper.SetSuccess();
                }
                catch (Exception ex)
                {
                    helper.WriteException(ex);
                }
                run(helper);
            }
        }
Exemplo n.º 3
0
 public override void ElementRun(IRootElement root, IWebBrowser browser, ITestElement control)
 {
     browser.Escape();
 }