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); }
public WebControl GetControl(Locator aLocator) { WebControl aWebCustomControl = new WebControl(myBrowser, aLocator); if (aWebCustomControl.IsControlPresent()) { aWebCustomControl.GetControl(); } return(aWebCustomControl); }