/// <summary> /// Selects option in sorting dropdown /// </summary> /// <param name="sortingOption">sorting option</param> public void SelectSortingOption(string sortingOption) { HtmlSelect sortingOptionsDropdown = this.EM.Lists.ListsWidgetEditScreen.SortDropdown.AssertIsPresent("Sorting option dropdown"); sortingOptionsDropdown.SelectByText(sortingOption); sortingOptionsDropdown.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.click); sortingOptionsDropdown.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.change); }
/// <summary> /// Selects option from dropdown field /// </summary> public void SelectDropdownOption(string choice) { HtmlSelect dropdown = ActiveBrowser.Find.ByExpression <HtmlSelect>("tagname=select", "data-sf-role=dropdown-list-field-select"); dropdown.SelectByText(choice); dropdown.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.click); dropdown.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.change); }
/// <summary> /// Selects users and role provider dropdown /// </summary> /// <param name="userProfile">users and roles provider</param> public void SelectProvider(string provider) { HtmlSelect userProfileDropdown = this.EM.Selectors.SelectorsScreen.ProvidersDropdown.AssertIsPresent("Users and roles provider dropdown"); userProfileDropdown.SelectByText(provider); userProfileDropdown.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.click); userProfileDropdown.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.change); }
/// <summary> /// Selects user profile in dropdown /// </summary> /// <param name="userProfile">user profile name</param> public void SelectUserProfile(string userProfile) { HtmlSelect userProfileDropdown = this.EM.Identity.UsersListEditScreen.ProfileDropdown.AssertIsPresent("User profile dropdown"); userProfileDropdown.SelectByText(userProfile); userProfileDropdown.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.click); userProfileDropdown.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.change); }
/// <summary> /// Selects option in list details template /// </summary> /// <param name="templateName">template name</param> public void SelectListDetailsTemplate(string templateName) { HtmlSelect listDetailsTemplateDropdown = this.EM.Lists.ListsWidgetEditScreen.ListDetailsTemplateDropdown.AssertIsPresent("List details template dropdown"); listDetailsTemplateDropdown.SelectByText(templateName); listDetailsTemplateDropdown.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.click); listDetailsTemplateDropdown.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.change); }
/// <summary> /// Selects the option in list template selector. /// </summary> /// <param name="optionValue">The option value.</param> public void SelectOptionInListTemplateSelector(string optionValue) { HtmlSelect selector = this.EM.Widgets.WidgetDesignerContentScreen.ListTemplateSelector .AssertIsPresent("List template selector"); selector.SelectByValue(optionValue); selector.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.click); selector.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.change); }
/// <summary> /// Sorts the options selector. /// </summary> /// <param name="optionValue">The option value.</param> public void SelectOptionInSortingSelector(string optionValue) { HtmlSelect selector = this.EM.Widgets.WidgetDesignerContentScreen.SortImagesSelector .AssertIsPresent("sorting selector"); selector.SelectByValue(optionValue); selector.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.click); selector.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.change); }
/// <summary> /// Selects the provider. /// </summary> /// <param name="providerName">Name of the provider.</param> public void SelectProvider(string providerName) { HtmlSelect providerDropDown = this.EM.Widgets.WidgetDesignerContentScreen.ProviderDropDown .AssertIsPresent("Provider DropDown"); providerDropDown.SelectByText(providerName); providerDropDown.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.click); providerDropDown.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.change); }
/// <summary> /// Selects the option in default calendar view selector. /// </summary> /// <param name="optionValue">The option value.</param> public void SelectOptionInDefaultCalendarViewSelector(string optionValue) { HtmlSelect selector = this.EM.Widgets.WidgetDesignerCalendarScreen.DefaultViewDropdown .AssertIsPresent("default view selector"); selector.SelectByValue(optionValue); selector.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.click); selector.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.change); }
/// <summary> /// Selects template in dropdown /// </summary> /// <param name="templateName">template name to select</param> public void SelectTemplate(string templateName) { this.EM.Search.SearchResultsWidgetEditScreen.TemplateLabel.AssertIsPresent("Template label"); HtmlSelect templateDropdown = this.EM.Search.SearchResultsWidgetEditScreen.TemplateDropdown.AssertIsPresent("Template dropdown"); templateDropdown.SelectByText(templateName); templateDropdown.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.click); templateDropdown.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.change); }
/// <summary> /// Selects sorting option in dropdown /// </summary> /// <param name="sortingOption">sorting option name</param> public void SelectSortingOption(string sortingOption) { this.EM.Search.SearchResultsWidgetEditScreen.SortResultsLabel.AssertIsPresent("Sorting label"); HtmlSelect sortingOptionDropdown = this.EM.Search.SearchResultsWidgetEditScreen.SortingOptionsDropdown.AssertIsPresent("Sorting option dropdown"); sortingOptionDropdown.SelectByText(sortingOption); sortingOptionDropdown.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.click); sortingOptionDropdown.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.change); }
/// <summary> /// Selects search index in dropdown /// </summary> /// <param name="searchIndex">search index name</param> public void SelectSearchIndex(string searchIndex) { this.EM.Search.SearchBoxWidgetEditScreen.WhereToSearchLabel.AssertIsPresent("Where to search label"); HtmlSelect searchIndexesDropdown = this.EM.Search.SearchBoxWidgetEditScreen.SearchIndexesDropdown.AssertIsPresent("Search indexes dropdown"); searchIndexesDropdown.SelectByText(searchIndex); searchIndexesDropdown.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.click); searchIndexesDropdown.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.change); }
/// <summary> /// Selects the quality option. /// </summary> /// <param name="optionValue">The option value.</param> public void SelectQualityOption(string optionValue) { HtmlSelect selector = this.EM.Media.ImagePropertiesScreen.QualitySelector .AssertIsPresent("Quality selector"); selector.SelectByText(optionValue); selector.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.click); selector.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.change); }
/// <summary> /// Selects option from aspect ratio selector. /// </summary> /// <param name="optionValue">Option value.</param> public void SelectOptionAspectRatioSelector(string optionValue) { HtmlSelect selector = this.EM.Media.VideoPropertiesScreen.AspectRatioSelector .AssertIsPresent("aspect ration selector"); selector.SelectByText(optionValue); selector.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.click); selector.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.change); }
/// <summary> /// Select detail template /// </summary> public void SelectDetailTemplate(string templateName) { HtmlSelect selectDetailTemplate = this.EM.Widgets.WidgetDesignerContentScreen.SelectDetailTemplate .AssertIsPresent("Detail template select"); selectDetailTemplate.Click(); selectDetailTemplate.SelectByValue(templateName); selectDetailTemplate.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.click); selectDetailTemplate.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.change); }
/// <summary> /// Selects the sorting option. /// </summary> /// <param name="option">The option.</param> public void SelectSortingOption(string option) { HtmlSelect sortingDropdown = this.EM.Widgets.WidgetDesignerContentScreen.SortingOptionsDropdown .AssertIsPresent("Sorting dropdown"); sortingDropdown.Click(); sortingDropdown.SelectByValue(option); sortingDropdown.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.click); sortingDropdown.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.change); }
/// <summary> /// Select sorting option /// </summary> /// <param name="sortingOption">sorting option to select</param> public void SelectSortingOption(string sortingOption) { HtmlSelect sortingOptionsDropdown = this.EM.Search.SearchFrontend.SortingOptionsDropdown.AssertIsPresent("Sorting option dropdown"); sortingOptionsDropdown.SelectByText(sortingOption); sortingOptionsDropdown.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.click); sortingOptionsDropdown.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.change); ActiveBrowser.WaitUntilReady(); ActiveBrowser.WaitForAsyncJQueryRequests(); }
/// <summary> /// Selects option from thumbnail selector. /// </summary> /// <param name="optionValue">Option value.</param> public void SelectResizeImageOption(string optionValue) { HtmlFindExpression expression = new HtmlFindExpression("class=modal-title", "InnerText=Custom thumbnail size"); ActiveBrowser.WaitForElement(expression, 30000, false); HtmlSelect selector = this.EM.Media.ImagePropertiesScreen.ResizeImageSelector .AssertIsPresent("resize image selector"); selector.SelectByText(optionValue); selector.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.click); selector.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.change); }
/// <summary> /// Selects option from thumbnail selector. /// </summary> /// <param name="optionValue">Option value.</param> public void SelectOptionInThumbnailSelector(string optionValue, bool isListSettingsTabSelected = true) { HtmlSelect selector = null; if (isListSettingsTabSelected) { selector = this.EM.Widgets.WidgetDesignerContentScreen.ThumbnailSelector.FirstOrDefault().AssertIsPresent("Thumbnail selector"); } else { selector = this.EM.Widgets.WidgetDesignerContentScreen.ThumbnailSelector.LastOrDefault().AssertIsPresent("Image selector"); } selector.SelectByText(optionValue); selector.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.click); selector.AsjQueryControl().InvokejQueryEvent(jQueryControl.jQueryControlEvents.change); }