public void Execute(IActor actor) { var driver = actor.Artifacts.Get <IWebDriver>(); var element = _selector.Find(driver, driver); element.SendKeys(_text); }
public void Execute(IActor actor) { if (actor == null) { throw new ArgumentNullException(nameof(actor)); } var context = actor.Artifacts.Get <IWebDriver>(); _elementSelector.Find(context, context).Submit(); }
public static IDisposable UseFrame(this IWebDriver driver, IElementSelector selector) { if (driver == null) { throw new ArgumentNullException(nameof(driver)); } if (selector == null) { throw new ArgumentNullException(nameof(selector)); } driver.SwitchTo().Frame(selector.Find(driver, driver)); return(new DisposableAction(() => driver.SwitchTo().DefaultContent())); }
public void Execute(IActor actor) { if (actor == null) { throw new ArgumentNullException(nameof(actor)); } var driver = actor.Artifacts.Get <IWebDriver>(); var element = _selector.Find(driver, driver); if (element == null) { throw new ExpectationException("Can't find element: " + _selector.GetElementDescription()); } element.Click(); }
public void Execute(IActor actor) { if (actor == null) { throw new ArgumentNullException(nameof(actor)); } var driver = actor.Artifacts.Get <IWebDriver>(); if (_elementSelector != null) { driver.SwitchTo().Frame(_elementSelector.Find(driver, driver)); return; } if (_useDefaultContent) { driver.SwitchTo().DefaultContent(); } }