public AssertItem(XElement item, XElement page, ISiteOwner siteOwner, Configuration.IConfiguration defaultConfiguration) { this._element = item; this._page = page; this._siteOwner = siteOwner; this._defaultConfiguration = defaultConfiguration; this.CurrentSite = siteOwner.DefineSite(this._page, defaultConfiguration); }
public override void Execute(XElement element, Context context, Configuration.IConfiguration configuration, ISite site = null, ISiteOwner siteOwner = null) { foreach (var input in element.Elements("input")) { IWebElement webElement = context.Driver.FindElement(By.Id(input.Attribute("id").Value)); webElement.SendKeys(input.Attribute("content").Value); } }
public virtual void Execute(XElement element, Context context, Configuration.IConfiguration configuration, ISite site = null, ISiteOwner siteOwner = null) { this.CurrentSite = siteOwner.DefineSite(element, configuration); if (this.CurrentSite == null) { this.CurrentSite = site; } }
/// <summary> /// Crée la bonne assertion /// </summary> public static IAssert Create(XElement page, XElement item, Configuration.IConfiguration configuration, ISiteOwner siteOwner) { IAssert assert = null; if (item.Element("title") != null) { assert = new TitleAssertItem(item, page, siteOwner, configuration); } else if (item.Element("content") != null) { assert = new ContentAssertItem(item, page, siteOwner, configuration); } else if (item.Element("count") != null) { assert = new CountAssertItem(item, page, siteOwner, configuration); } return(assert); }
public override void Execute(XElement element, Context context, Configuration.IConfiguration configuration, ISite site = null, ISiteOwner siteOwner = null) { const string FINDBY = "findby-"; XAttribute attribute = element.Element("input").Attribute(FINDBY + "xpath"); IWebElement webElement = null; if (attribute != null) { webElement = context.Driver.FindElement(By.XPath(attribute.Value)); } System.Threading.Thread.Sleep(100); if (webElement != null) { webElement.Click(); } }
public override void Execute(XElement element, Context context, Configuration.IConfiguration configuration, ISite site = null, ISiteOwner siteOwner = null) { base.Execute(element, context, configuration, site, siteOwner); string url = this.CurrentSite != null ? this.CurrentSite.DefaultUrl : string.Empty; context.Driver.Navigate().GoToUrl(url + element.Attribute("url").Value); }
public TitleAssertItem(XElement item, XElement page, ISiteOwner siteOwner, Configuration.IConfiguration defaultConfiguration) : base(item, page, siteOwner, defaultConfiguration) { }