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(); }
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); } }
public override void ElementRun(IRootElement root, IWebBrowser browser, ITestElement control) { browser.Escape(); }