public bool CheckPageTitle() { var uiTitle = new HtmlControl(browser); uiTitle.SearchProperties.Add(HtmlControl.PropertyNames.Id, PageTitlesConst.PAGE_TITLE_ID); uiTitle.Find(); uiTitle.WaitForControlReady(); return(uiTitle.InnerText.ToString().Equals(PageTitlesConst.INDEX_DAILY_PLAN_TITLE)); }
/// <summary> /// Checks to see if the element exists. /// Waits the appropriate timeout if necessary. /// </summary> /// <param name="element">The element.</param> /// <returns><c>true</c> if the element exists; otherwise <c>false</c></returns> public override bool ElementExistsCheck(HtmlControl element) { if (element.Exists) { return(true); } element.Find(); return(true); }
public MainObjects CheckLogin(string username) { HtmlDiv searchscopeButton = new HtmlDiv(_bw); searchscopeButton.SearchProperties.Add(HtmlDiv.PropertyNames.Class, "navbar-right"); searchscopeButton.Find(); HtmlControl text = new HtmlControl(searchscopeButton); text.SearchProperties.Add(HtmlTextArea.PropertyNames.InnerText, "Hello " + username + "!"); text.Find(); return(this); }
public static T Find <T>(this HtmlControl control, string idValue) where T : HtmlControl, new() { return(control.Find <T>(HtmlControl.PropertyNames.Id, idValue, PropertyExpressionOperator.EqualTo)); }