private T OpenTab <T>(UbsWebElement ubsMainMenuWebElement, UbsWebElement tabItem) where T : new() { ubsMainMenuWebElement.Click(); tabItem.WaitForElementIsEnabled(); tabItem.Click(); return(new T()); }
private T OpenUbsLoginsTab <T>(params string[] tabItemNames) where T : new() { var tabItem = new UbsWebElement( By.XPath( $"{_ubsLoginsButton.Selector.GetLocator()}//following-sibling::ul//*[{XpathHelper.CombineFewTextPartsInOneWithOr(tabItemNames)}]")); return(OpenTab <T>(_ubsLoginsButton, tabItem)); }
private T OpenMainMenuTab <T>(UbsWebElement ubsMainMenuWebElement, params string[] tabItemNames) where T : new() { var tabItem = new UbsWebElement( By.XPath( $"{ubsMainMenuWebElement.Selector.GetLocator()}//following-sibling::div//a[{XpathHelper.CombineFewTextPartsInOneWithOr(tabItemNames)}]")); return(OpenTab <T>(ubsMainMenuWebElement, tabItem)); }