/// <summary> /// Selects navigation widget display mode in the widget designer /// </summary> /// <param name="mode">Navigation display mode</param> public void SelectNavigationWidgetDisplayMode(string mode) { HtmlDiv optionsDiv = EM.Navigation.NavigationWidgetEditScreen.DislayModeList .AssertIsPresent("Navigation div"); List <HtmlDiv> navDivs = optionsDiv.Find.AllByExpression <HtmlDiv>("tagname=div", "class=radio").ToList <HtmlDiv>(); foreach (var div in navDivs) { if (div.InnerText.Contains(mode)) { HtmlInputRadioButton optionButton = div.Find.ByExpression <HtmlInputRadioButton>("tagname=input", "type=radio"); if (optionButton != null && optionButton.IsVisible()) { optionButton.Click(); } } } }
/// <summary> /// Selects profile widget display mode in the widget designer /// </summary> /// <param name="mode">Profile display mode</param> public void SelectDisplayModeWhenChangesAreSaved(string mode) { HtmlDiv optionsDiv = EM.Identity.ProfileEditScreen.WhenChangesAreSavedDiv .AssertIsPresent("Profile div"); List <HtmlDiv> profileDivs = optionsDiv.Find.AllByExpression <HtmlDiv>("tagname=div", "class=radio").ToList <HtmlDiv>(); foreach (var div in profileDivs) { if (div.InnerText.Contains(mode)) { HtmlInputRadioButton optionButton = div.Find.ByExpression <HtmlInputRadioButton>("tagname=input", "type=radio"); if (optionButton != null && optionButton.IsVisible()) { optionButton.Click(); } } } }