コード例 #1
0
        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));
        }
コード例 #2
0
ファイル: CodedUIPage.cs プロジェクト: lkoorsse/specbind
        /// <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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 public static T Find <T>(this HtmlControl control, string idValue) where T : HtmlControl, new()
 {
     return(control.Find <T>(HtmlControl.PropertyNames.Id, idValue, PropertyExpressionOperator.EqualTo));
 }