IsControlPresent() public method

public IsControlPresent ( ) : bool
return bool
示例#1
0
        public WebControl GetControl(Locator aLocator, ControlType aControlType)
        {
            WebControl aWebCustomControl;

            switch (aControlType)
            {
            case ControlType.Button:
                aWebCustomControl = new WebButton(myBrowser, aLocator);
                break;

            case ControlType.EditBox:
                aWebCustomControl = new WebEditBox(myBrowser, aLocator);
                break;

            default:
                aWebCustomControl = new WebControl(myBrowser, aLocator);
                break;
            }

            if (aWebCustomControl.IsControlPresent())
            {
                aWebCustomControl.GetControl();
            }

            return(aWebCustomControl);
        }
示例#2
0
        public WebControl GetControl(Locator aLocator)
        {
            WebControl aWebCustomControl = new WebControl(myBrowser, aLocator);

            if (aWebCustomControl.IsControlPresent())
            {
                aWebCustomControl.GetControl();
            }

            return(aWebCustomControl);
        }