IsControlPresent() public method

public IsControlPresent ( ) : bool
return bool
Example #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);
        }
Example #2
0
        public WebControl GetControl(Locator aLocator)
        {
            WebControl aWebCustomControl = new WebControl(myBrowser, aLocator);

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

            return(aWebCustomControl);
        }