public static UIACondition GetCondition(AppModel model, string conditionString) { string nodeName = conditionString; ITestObject testObject = model.GetTestObject(nodeName); return(GetCondition(testObject)); }
protected T GetTo <T>(string nodeName) where T : IWebElement, new() { IWebElement webElement = _ccs[nodeName]; if (webElement == null) { AppModel model = AppModel.Current; SETestObject seTO = model.GetTestObject(nodeName) as SETestObject; seTO.WebDriver = BrowserHoster.getInstance().WebDriver; webElement = new T(); webElement.RelayObject = seTO; } return((T)webElement); }
public WebPage WebPage(string nodeName) { WebPage webPage = _pageCollections[nodeName] as WebPage; if (null == webPage) { webPage = new WebPage(); webPage.ObjectName = nodeName; _pageCollections[nodeName] = webPage; AppModel model = AppModel.Current; webPage.RelayObject = model.GetTestObject(nodeName) as SETestObject; // webPage.RelayObject.WebDriver = BrowserHoster.getInstance().WebDriver; // BrowserHoster.getInstance().SwithToURL(webPage.RelayObject.Properties[WebControlKeys.URL]); LPWebObjects.Controls.WebPage.SwitchTo(webPage); } return(webPage); }