public void SetRequiredCheckboxField()
        {
            BAT.Macros().NavigateTo().Modules().Forms(this.Culture);
            BAT.Wrappers().Backend().Forms().FormsDashboard().OpenFormFromTheGrid(FormName);
            ActiveBrowser.WaitUntilReady();
            ActiveBrowser.WaitForAsyncOperations();
            ActiveBrowser.RefreshDomTree();
            BATFeather.Wrappers().Backend().Pages().PageZoneEditorWrapper().EditWidget(CheckboxesField);
            BATFeather.Wrappers().Backend().Forms().FormsContentScreenWrapper().CheckRequiredFieldCheckbox();
            BATFeather.Wrappers().Backend().Forms().FormsContentScreenWrapper().ChangeRequiredMessage(NewRequiredMessage);
            BATFeather.Wrappers().Backend().Widgets().WidgetDesignerWrapper().SaveChanges();
            BAT.Wrappers().Backend().Forms().FormsContentScreen().PublishForm();

            BAT.Macros().NavigateTo().CustomPage("~/" + PageName.ToLower(), true, this.Culture);
            BATFeather.Wrappers().Frontend().Forms().FormsWrapper().ClickSubmit();
            Assert.IsTrue(ActiveBrowser.ContainsText(NewRequiredMessage), "Text was not found on the page");
            BATFeather.Wrappers().Frontend().Forms().FormsWrapper().VerifyPageUrl(PageName);
            BATFeather.Wrappers().Frontend().Forms().FormsWrapper().SelectCheckbox(Choice);
            BATFeather.Wrappers().Frontend().Forms().FormsWrapper().SubmitForm();

            BAT.Macros().NavigateTo().Modules().Forms(this.Culture);
            BAT.Wrappers().Backend().Forms().FormsDashboard().ViewFormResponses(FormName);

            BATFeather.Wrappers().Backend().Forms().FormsWrapper().VerifyNumberOfResponses(ExpectedResponsesCount);
            BAT.Wrappers().Backend().Forms().FormsResponseScreen().SelectResponse(ResponseNumber);
            BATFeather.Wrappers().Backend().Forms().FormsWrapper().VerifyResponseAuthorUsername(ExpectedAuthorName);
            BATFeather.Wrappers().Backend().Forms().FormsWrapper().VerifyResponseSubmitDate();
            BATFeather.Wrappers().Backend().Forms().FormsWrapper().VerifyResponseCheckboxesAnswer(Choice);
        }
        /// <summary>
        /// Click select button
        /// </summary>
        public void ClickSelectButton()
        {
            ActiveBrowser.WaitUntilReady();
            ActiveBrowser.WaitForAsyncRequests();

            Manager.Wait.For(() => {
                ActiveBrowser.RefreshDomTree();
                return(EM.Widgets.WidgetDesignerContentScreen.SelectButtons.Any(b => b.IsVisible()));
            }, 10000);

            var selectButtons = EM.Widgets.WidgetDesignerContentScreen.SelectButtons;

            foreach (var button in selectButtons)
            {
                if (button.IsVisible())
                {
                    button.Click();
                    break;
                }
            }

            ActiveBrowser.WaitUntilReady();
            ActiveBrowser.WaitForAsyncOperations();
            ActiveBrowser.RefreshDomTree();
        }
Exemplo n.º 3
0
        /// <summary>
        /// Verifies if the items count is as expected.
        /// </summary>
        /// <param name="expected">The expected items count.</param>
        /// <returns>True or false depending on the items count.</returns>
        public bool CountItems(int expected)
        {
            ActiveBrowser.RefreshDomTree();
            var activeDialog = this.EM.Widgets.FeatherWidget.ActiveTab.AssertIsPresent("Content container");

            var items = activeDialog.Find.AllByExpression <HtmlDiv>("class=ng-binding", "ng-bind=~bindIdentifierField(item");
            int count = items.Count;

            if (count == 0)
            {
                items = activeDialog.Find.AllByExpression <HtmlDiv>("ng-click=itemClicked(item)");
                count = items.Count;
            }

            //// if items count is more than 12 elements, then you need to scroll
            if (count > 12)
            {
                items[count - 1].Wait.ForExists();
                items[count - 1].Wait.ForVisible();
                items[count - 1].ScrollToVisible();
            }

            bool isCountCorrect = expected == items.Count;

            return(isCountCorrect);
        }
Exemplo n.º 4
0
        public void ChangeAdvancedSettingsOfDropdownFieldAndSetCssClass()
        {
            BAT.Macros().NavigateTo().Modules().Forms(this.Culture);
            BAT.Wrappers().Backend().Forms().FormsDashboard().OpenFormFromTheGrid(FormName);
            BATFeather.Wrappers().Backend().Pages().PageZoneEditorWrapper().EditWidget(DropdownListField);
            BATFeather.Wrappers().Backend().Forms().FormsContentScreenWrapper().ApplyCssClasses(CssClassesToApply);
            BATFeather.Wrappers().Backend().ContentBlocks().ContentBlocksWrapper().SaveChanges();
            BAT.Wrappers().Backend().Forms().FormsContentScreen().PublishForm();
            BAT.Macros().NavigateTo().CustomPage("~/" + PageName.ToLower(), true, this.Culture);
            Assert.IsTrue(ActiveBrowser.ContainsText(CssClassesToApply), "Css class was not found on the page");

            BAT.Macros().NavigateTo().Modules().Forms(this.Culture);
            BAT.Wrappers().Backend().Forms().FormsDashboard().OpenFormFromTheGrid(FormName);
            BATFeather.Wrappers().Backend().Pages().PageZoneEditorWrapper().EditWidget(DropdownListField);
            ActiveBrowser.WaitUntilReady();
            ActiveBrowser.WaitForAsyncOperations();
            ActiveBrowser.RefreshDomTree();
            BATFeather.Wrappers().Backend().ModuleBuilder().DynamicWidgetAdvancedSettingsWrapper().ClickAdvancedSettingsButton();
            BATFeather.Wrappers().Backend().ModuleBuilder().DynamicWidgetAdvancedSettingsWrapper().ClickModelButton();
            BATFeather.Wrappers().Backend().Forms().FormsContentScreenWrapper().ChangeCssClassInAdvancedSettings(CssClassesToApplyNew);
            BATFeather.Wrappers().Backend().ContentBlocks().ContentBlocksWrapper().SaveChanges();
            BAT.Wrappers().Backend().Forms().FormsContentScreen().PublishForm();
            BAT.Macros().NavigateTo().CustomPage("~/" + PageName.ToLower(), true, this.Culture);
            Assert.IsTrue(ActiveBrowser.ContainsText(CssClassesToApplyNew), "Css class was not found on the page");
        }
        /// <summary>
        /// Selects the redirect to a page in form widget.
        /// </summary>
        public void SelectRedirectToAPageInFormWidget()
        {
            ActiveBrowser.RefreshDomTree();
            HtmlInputRadioButton redirectToAPage = this.EM.Forms.FormsBackend.RedirectToPage.AssertIsPresent("Redirect to a page");

            redirectToAPage.Click();
        }
        private bool IsCountOfFoldersCorrect(int expectedCount)
        {
            ActiveBrowser.RefreshDomTree();
            int divsCount = this.EM.Media.MediaSelectorScreen.MediaFolderDivs.Count;

            return(expectedCount == divsCount);
        }
        public void WaitingForMultiplePageChanges()
        {
            // Using the same example above but instead of only waiting for the new div by checking the h3
            // element and then we want to also wait for the backcolor of the div to change to red.

            // Wait for the h3 to be added.
            HtmlFindExpression h3 = new HtmlFindExpression("TagIndex=h3:0"); // Basically the first occurrence of an h3 element.

            // Wait for the div with index=1 to appear in addition to the style having partial value:
            // background-color: red
            HtmlFindExpression newDiv = new HtmlFindExpression("TagIndex=div:1", "style=~background-color: red");

            // Invoke the action
            Actions.Click(this.Elements.GetHtml("activationDiv"));

            // Wait for all changes using a chained Find Expression
            HtmlFindExpression expr = new HtmlFindExpression();

            expr.AppendClauses(false, newDiv.Clauses);
            expr.AppendChain(h3);
            ActiveBrowser.WaitForElement(expr, 4000, false);

            // All elements should be found at this point. To verify.
            ActiveBrowser.RefreshDomTree();

            Element h3Element = Find.ByExpression(h3); // find the element

            Assert.IsTrue(h3Element.InnerText.Equals("We are back!"));

            Element newDivElement = Find.ByExpression(newDiv);

            Assert.IsTrue(newDivElement.GetAttribute("style").Value.ToLower().
                          Contains("background-color: red"));
        }
Exemplo n.º 8
0
        /// <summary>
        /// Verifies if the items count is as expected.
        /// </summary>
        /// <param name="expected">The expected items count.</param>
        /// <returns>True or false depending on the items count.</returns>
        public bool ScrollToLatestItemAndCountItems(int expected)
        {
            ActiveBrowser.RefreshDomTree();
            var activeDialog = this.EM.Selectors.SelectorsScreen.ActiveTab.AssertIsPresent("Content container");

            var items     = activeDialog.Find.AllByExpression <HtmlControl>("ng-bind=~bindIdentifierField(item");
            int divsCount = items.Count;

            if (divsCount == 0)
            {
                items     = activeDialog.Find.AllByExpression <HtmlControl>("ng-click=itemClicked(item)");
                divsCount = items.Count;
            }

            // If items count is more than 12 elements, then you need to scroll
            if (divsCount > 12)
            {
                HtmlControl itemsList = EM.Widgets
                                        .WidgetDesignerContentScreen
                                        .ItemsList
                                        .AssertIsPresent("items list");

                List <HtmlControl> itemDiv = itemsList.Find
                                             .AllByExpression <HtmlControl>("class=~ng-scope list-group-item")
                                             .ToList <HtmlControl>();
                divsCount = itemDiv.Count;

                itemDiv[divsCount - 1].Wait.ForVisible();
                itemDiv[divsCount - 1].ScrollToVisible();
            }

            bool isCountCorrect = expected == divsCount;

            return(isCountCorrect);
        }
Exemplo n.º 9
0
        public void CreateBlog(string blogName)
        {
            ActiveBrowser.RefreshDomTree();
            ActiveBrowser.WaitUntilReady();
            BAT.Wrappers().Backend().Blogs().BlogsWrapper().ClickCreateBlogButton();
            ActiveBrowser.RefreshDomTree();
            ActiveBrowser.WaitUntilReady();
            var frame = Manager.Current.ActiveBrowser.WaitForFrame(new FrameInfo()
            {
                Name = "create"
            });

            Assert.IsNotNull(frame, "There is no create frame");
            frame.WaitForAsyncOperations();
            frame.WaitForAsyncRequests();
            var inp = frame.Find.ByIdEndingWith <HtmlInputText>("_textBox_write_0");

            if (inp != null)
            {
                inp.SimulateTextTyping(blogName);
            }

            HtmlAnchor publishBtn = frame.Find.ByExpression <HtmlAnchor>("class=sfLinkBtn sfSave").AssertIsPresent("Publish button");

            publishBtn.Click();
            ActiveBrowser.RefreshDomTree();
        }
        public void WaitingForSinglePageChange()
        {
            // The test page performs two operations async; each with 1 second delay
            // after the box is clicked:
            // 1.Creates a new Div with a child H3 element and adds it to the page.
            // 2.Changes the back color of the new div to red

            // Let's invoke the actions and wait for the H3 element to appear.

            // To do so, we will simply use the FindExpression object as described in FindingElements.cs
            // to define how an element should be identified.
            HtmlFindExpression h3 = new HtmlFindExpression("TagIndex=h3:0"); // Basically the first occurrence of an h3 element.

            // Initiate the action.
            Actions.Click(this.Elements.GetHtml("activationDiv"));

            // Wait for the element to appear on the page. Timeout: 2 seconds.
            ActiveBrowser.WaitForElement(h3, 3000, false);

            // Element should be found at this point. To verify.
            ActiveBrowser.RefreshDomTree();            // refresh the current DOM to reflect the javascript changes
            Element h3Element = Find.ByExpression(h3); // find the element

            Assert.IsTrue(h3Element.InnerText.Equals("We are back!"));
        }
        public void ChangeAdvancedSettingsOfPageBreak()
        {
            BAT.Macros().NavigateTo().Modules().Forms(this.Culture);
            BAT.Wrappers().Backend().Forms().FormsDashboard().OpenFormFromTheGrid(FormName);
            BATFeather.Wrappers().Backend().Forms().FormsContentScreenWrapper().WaitForFieldContent(NextStepOld, PageBreak);
            BATFeather.Wrappers().Frontend().Forms().FormsWrapper().VerifyNextStepText(NextStepOld);
            BATFeather.Wrappers().Backend().Pages().PageZoneEditorWrapper().EditWidget(PageBreak);
            ActiveBrowser.WaitUntilReady();
            ActiveBrowser.WaitForAsyncOperations();
            ActiveBrowser.RefreshDomTree();
            BATFeather.Wrappers().Backend().ModuleBuilder().DynamicWidgetAdvancedSettingsWrapper().ClickAdvancedSettingsButton();
            BATFeather.Wrappers().Backend().ModuleBuilder().DynamicWidgetAdvancedSettingsWrapper().ClickModelButton();
            BATFeather.Wrappers().Backend().Forms().FormsContentScreenWrapper().ChangeNextStepTextInAdvancedSettings(NextStepNew);
            BATFeather.Wrappers().Backend().ContentBlocks().ContentBlocksWrapper().SaveChanges();
            BATFeather.Wrappers().Backend().Forms().FormsContentScreenWrapper().WaitForFieldContent(NextStepNew, PageBreak);
            BATFeather.Wrappers().Frontend().Forms().FormsWrapper().VerifyNextStepText(NextStepNew);
            BAT.Wrappers().Backend().Forms().FormsContentScreen().PublishForm();

            BAT.Macros().NavigateTo().CustomPage("~/" + PageName.ToLower(), true, this.Culture);
            BATFeather.Wrappers().Frontend().Forms().FormsWrapper().VerifyNextStepText(NextStepNew);
            BATFeather.Wrappers().Frontend().Forms().FormsWrapper().SetTextboxContent(TextBoxContent);
            BATFeather.Wrappers().Frontend().Forms().FormsWrapper().ClickNextButton();
            BATFeather.Wrappers().Frontend().Forms().FormsWrapper().SelectRadioButton(Choice);
            BATFeather.Wrappers().Frontend().Forms().FormsWrapper().ClickSubmit();
        }
Exemplo n.º 12
0
 /// <summary>
 /// Navigate to pages.
 /// </summary>
 public void NavigateToPages()
 {
     BAT.Macros().NavigateTo().Pages();
     ActiveBrowser.WaitUntilReady();
     ActiveBrowser.WaitForAsyncOperations();
     ActiveBrowser.RefreshDomTree();
 }
        public void PureDesktopUIActions()
        {
            Manager.LaunchNewBrowser();
            ActiveBrowser.NavigateTo(Path.Combine(TestContext.TestDeploymentDir, TESTPAGE));

            Desktop.Mouse.HoverOver(this.Elements.GetHtml("Cell00").GetRectangle());
            Desktop.Mouse.HoverOver(this.Elements.GetHtml("Cell01").GetRectangle());
            Desktop.Mouse.HoverOver(this.Elements.GetHtml("Cell10").GetRectangle());
            Desktop.Mouse.HoverOver(this.Elements.GetHtml("Cell11").GetRectangle());

            // Now click inside the textbox.
            Desktop.Mouse.Click(MouseClickType.LeftClick, this.Elements.GetHtml("TextBox").GetRectangle());
            // Type some text
            Desktop.KeyBoard.TypeText("'Hello from Telerik Testing Framework'", 5);
            Desktop.KeyBoard.KeyPress(System.Windows.Forms.Keys.Tab);    // this to invoke the onchange event

            ActiveBrowser.WaitUntilReady();
            ActiveBrowser.RefreshDomTree();

            // Given that the DOM has changed. You can either Re-Find all elements
            // by forcing a call to Find.All() or simply refreshing the element you need:
            this.Elements.GetHtml("MessageLabel").Refresh();

            Assert.IsTrue(this.Elements.GetHtml("MessageLabel").InnerText.Contains("Telerik Testing Framework"));
        }
Exemplo n.º 14
0
        /// <summary>
        /// Verifies if the items count is as expected.
        /// </summary>
        /// <param name="expected">The expected items count.</param>
        /// <returns>True or false depending on the items count.</returns>
        public bool CountItems(int expected)
        {
            ActiveBrowser.RefreshDomTree();
            var items = this.EM.Widgets.FeatherWidget.Find.AllByExpression <HtmlAnchor>("ng-repeat=item in contentItems");

            return(expected == items.Count);
        }
Exemplo n.º 15
0
        /// <summary>
        /// Resizes the browser window to selected width.
        /// </summary>
        /// <param name="width">The window width.</param>
        public void ResizeBrowserWindow(int width)
        {
            Rectangle rect = new Rectangle(200, 200, width, 500);

            ActiveBrowser.ResizeContent(rect);
            ActiveBrowser.RefreshDomTree();
        }
Exemplo n.º 16
0
        /// <summary>
        /// Determines whether is image title present on detail master page.
        /// </summary>
        /// <param name="imageTitle">The image title.</param>
        /// <returns></returns>
        public bool IsImageTitlePresentOnDetailMasterPage(string imageTitle)
        {
            ActiveBrowser.RefreshDomTree();
            HtmlDiv frontendPageMainDiv = BAT.Wrappers().Frontend().Pages().PagesWrapperFrontend().GetPageContent();

            return(frontendPageMainDiv.InnerText.Contains(imageTitle));
        }
Exemplo n.º 17
0
 /// <summary>
 /// Deletes a grid widget from the editor
 /// </summary>
 public void DeleteGridElement()
 {
     BAT.Wrappers().Backend().Pages().PageZoneEditorWrapper().SelectExtraOptionForWidget(DeleteOperation);
     ActiveBrowser.WaitUntilReady();
     ActiveBrowser.WaitForAsyncRequests();
     ActiveBrowser.RefreshDomTree();
 }
Exemplo n.º 18
0
        /// <summary>
        /// Selects the content.
        /// </summary>
        /// <param name="isNewsSelector">True or false depending on the selector.</param>
        public void SelectContent(bool isNewsSelector = true)
        {
            if (isNewsSelector)
            {
                var contentSelector = this.GetContentSelectorByType("Telerik.Sitefinity.News.Model.NewsItem").As <HtmlControl>()
                                      .AssertIsPresent("selector directive");

                HtmlButton selectButton = contentSelector.Find.ById <HtmlButton>("openSelectorBtn").AssertIsPresent("select button");

                selectButton.Click();
                ActiveBrowser.WaitForAsyncRequests();
                ActiveBrowser.RefreshDomTree();
            }
            else
            {
                var contentSelector = this.GetContentSelectorByType("Telerik.Sitefinity.GenericContent.Model.ContentItem").As <HtmlControl>()
                                      .AssertIsPresent("selector directive");

                HtmlButton selectButton = contentSelector.Find.ById <HtmlButton>("openSelectorBtn").AssertIsPresent("select button");

                selectButton.Click();
                ActiveBrowser.WaitForAsyncRequests();
                ActiveBrowser.RefreshDomTree();
            }
        }
Exemplo n.º 19
0
        public void RegisterNewBackendUserWithAdministratorRole()
        {
            BAT.Macros().NavigateTo().Pages(this.Culture);
            BAT.Wrappers().Backend().Pages().PagesWrapper().OpenPageZoneEditor(RegistrationPage);
            BATFeather.Wrappers().Backend().Pages().PageZoneEditorWrapper().AddWidgetToPlaceHolderPureMvcMode(WidgetName);
            BATFeather.Wrappers().Backend().Pages().PageZoneEditorWrapper().EditWidget(WidgetName);
            BATFeather.Wrappers().Backend().Widgets().WidgetDesignerWrapper().ClickSelectButton();
            BATFeather.Wrappers().Backend().EmailCampaigns().SubscribeFormWrapper().SelectItemsInFlatSelector(SelectedRoles);
            BATFeather.Wrappers().Backend().Widgets().SelectorsWrapper().DoneSelecting();
            BATFeather.Wrappers().Backend().Widgets().WidgetDesignerWrapper().SaveChanges();
            BAT.Wrappers().Backend().Pages().PageZoneEditorWrapper().PublishPage();
            BAT.Macros().User().LogOut();
            ActiveBrowser.RefreshDomTree();
            BAT.Macros().NavigateTo().CustomPage("~/" + RegistrationPage.ToLower(), false, this.Culture);
            BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillFirstName(FirstName);
            BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillLastName(LastName);
            BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillEmail(Email);
            BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillPassword(Password);
            BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillRetypePassword(Password);
            BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().RegisterButton();
            BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().VerifySuccessfullyMessage();

            BAT.Macros().NavigateTo().CustomPage("~/" + LoginPage.ToLower());
            BAT.Wrappers().Backend().LoginView().LoginViewWrapper().SetUsername(Email);
            BAT.Wrappers().Backend().LoginView().LoginViewWrapper().SetPassword(Password);
            BAT.Wrappers().Backend().LoginView().LoginViewWrapper().ExecuteLogin();
            BAT.Macros().NavigateTo().UsersManagement().Users();
            Assert.IsTrue(BAT.Wrappers().Backend().Users().UsersWrapper().IsUserPresentInGrid(Email), "Registered user was not found in the grid");
            BAT.Macros().User().LogOut();
        }
        /// <summary>
        /// Edit widget by name
        /// </summary>
        /// <param name="widgetName">The widget name</param>
        /// <param name="dropZoneIndex">The drop zone index</param>
        public void EditWidget(string widgetName, int dropZoneIndex = 0, bool isMediaWidgetEdited = false)
        {
            ActiveBrowser.WaitUntilReady();
            ActiveBrowser.RefreshDomTree();
            ActiveBrowser.WaitUntilReady();
            var widgetHeader = ActiveBrowser
                               .Find
                               .AllByCustom <HtmlDiv>(d => d.CssClass.StartsWith("rdTitleBar") && d.ChildNodes.First().InnerText.Equals(widgetName))[dropZoneIndex]
                               .AssertIsPresent(widgetName);

            widgetHeader.ScrollToVisible();
            HtmlAnchor editLink = widgetHeader.Find
                                  .ByCustom <HtmlAnchor>(a => a.TagName == "a" && a.Title.Equals("Edit"))
                                  .AssertIsPresent("edit link");

            editLink.Focus();
            editLink.Click();
            ActiveBrowser.WaitUntilReady();
            ActiveBrowser.WaitForAsyncOperations();
            ActiveBrowser.WaitForAjax(TimeOut);
            ActiveBrowser.RefreshDomTree();

            if (!isMediaWidgetEdited)
            {
                HtmlFindExpression expression = new HtmlFindExpression("class=modal-title", "InnerText=" + widgetName);
                ActiveBrowser.WaitForElement(expression, TimeOut, false);
                Manager.Current.Wait.For(this.WaitForSaveButton, TimeOut);
            }
        }
Exemplo n.º 21
0
        /// <summary>
        /// Cancels the upload.
        /// </summary>
        public void CancelUpload()
        {
            HtmlButton cancelBtn = this.EM.Media.MediaUploadPropertiesScreen.CancelButton.AssertIsPresent("Cancel button");

            cancelBtn.Click();
            ActiveBrowser.WaitForAsyncRequests();
            ActiveBrowser.RefreshDomTree();
        }
Exemplo n.º 22
0
        /// <summary>
        /// Uploads the file.
        /// </summary>
        public void UploadMediaFile()
        {
            HtmlButton uploadBtn = this.EM.Media.MediaUploadPropertiesScreen.UploadButton.AssertIsPresent("Upload button");

            uploadBtn.Click();
            ActiveBrowser.WaitForAsyncRequests();
            ActiveBrowser.RefreshDomTree();
        }
Exemplo n.º 23
0
        /// <summary>
        /// Expands the categories and tags section.
        /// </summary>
        public void ExpandCategoriesAndTagsSection()
        {
            HtmlAnchor expandArrow = this.EM.Media.MediaUploadPropertiesScreen.CategoriesAndTagsArrow.AssertIsPresent("expand button");

            expandArrow.Click();
            ActiveBrowser.WaitForAsyncRequests();
            ActiveBrowser.RefreshDomTree();
        }
Exemplo n.º 24
0
        /// <summary>
        /// Clicks the select category button.
        /// </summary>
        public void ClickSelectCategoryButton()
        {
            HtmlSpan select = this.EM.Media.MediaUploadPropertiesScreen.SelectButtons.LastOrDefault().AssertIsPresent("select button");

            select.Click();
            ActiveBrowser.WaitForAsyncRequests();
            ActiveBrowser.RefreshDomTree();
        }
        /// <summary>
        /// Clicks Done button on media properties dialog.
        /// </summary>
        public void ConfirmMediaProperties()
        {
            HtmlButton doneBtn = this.EM.Media.MediaPropertiesBaseScreen.DoneButton.AssertIsPresent("Done button");

            doneBtn.Click();
            ActiveBrowser.WaitForAsyncOperations();
            ActiveBrowser.RefreshDomTree();
        }
        /// <summary>
        /// Edits all properties.
        /// </summary>
        public void EditAllProperties()
        {
            HtmlButton editBtn = this.EM.Media.MediaPropertiesBaseScreen.EditAllPropertiesButton.AssertIsPresent("Edit all properties button");

            editBtn.Click();
            ActiveBrowser.WaitForAsyncOperations();
            ActiveBrowser.RefreshDomTree();
        }
Exemplo n.º 27
0
        /// <summary>
        /// Selects the other checkbox button.
        /// </summary>
        public void SelectOtherCheckboxButton()
        {
            ActiveBrowser.RefreshDomTree();
            HtmlInputCheckBox checkbox = ActiveBrowser.Find.ByExpression <HtmlInputCheckBox>("tagname=input", "data-sf-checkboxes-role=other-choice-checkbox");

            checkbox.MouseClick();
            ActiveBrowser.WaitUntilReady();
        }
        /// <summary>
        /// Verifies if any Feather MVC widget is presented in pages toolbox section.
        /// </summary>
        /// <returns>true or false depending on the widgets presence in the toolbox.</returns>
        public bool IsAnyMvcWidgetPersentInToolbox()
        {
            ActiveBrowser.RefreshDomTree();
            RadPanelBar toolbox  = Manager.Current.ActiveBrowser.Find.ById <RadPanelBar>("~ControlToolboxContainer");
            var         mvcItems = toolbox.Find.AllByExpression("class=~sfMvcIcn");

            return(mvcItems != null && mvcItems.Count > 0);
        }
Exemplo n.º 29
0
        /// <summary>
        /// Removes the external URL.
        /// </summary>
        public void RemoveExternalUrl()
        {
            HtmlAnchor removeIcon = this.EM.Selectors.SelectorsScreen.RemoveExternalUrlsIcon.AssertIsPresent("remove icon");

            removeIcon.Click();
            ActiveBrowser.WaitForAsyncRequests();
            ActiveBrowser.RefreshDomTree();
        }
Exemplo n.º 30
0
        /// <summary>
        /// Opens the external urls tab.
        /// </summary>
        public void OpenExternalUrlsTab()
        {
            HtmlSpan externalUrlsTab = this.EM.Selectors.SelectorsScreen.ExternalUrlsTab.AssertIsPresent("external urls tab");

            externalUrlsTab.Click();
            ActiveBrowser.WaitForAsyncRequests();
            ActiveBrowser.RefreshDomTree();
        }