Example #1
0
        public void GivenIClickButton(string type)
        {
            var waitTilPostback = true;

            switch (type)
            {
            case "Next":
                ExtensionsPage.WizardNextLink.Click();
                break;

            case "Return":
                ExtensionsPage.WizardReturnLink.Click();
                waitTilPostback = false;
                break;

            case "Create Package":
                ExtensionsPage.CreatePackageLink.Click();
                break;
            }

            if (waitTilPostback)
            {
                ExtensionsPage.ContentPaneDiv.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
            }
        }
Example #2
0
        public void WhenIAddFolder(string folderType, string folderName)
        {
            //check folder is exists
            if (!IEInstance.Span(Find.ByTitle(folderName)).Exists)
            {
                var expandImg = IEInstance.Image(Find.ById(i => i.Contains("DNNTreeexpcoldnn")));
                expandImg.Click();
                expandImg.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
            }

            if (IEInstance.Span(Find.ByTitle(folderName)).Exists)
            {
                return;
            }

            //add folder
            if (!FileManagerPage.PortalRootSpan.ClassName.Contains("FileManagerTreeNodeSelected"))
            {
                FileManagerPage.PortalRootSpan.Click();
                FileManagerPage.PortalRootSpan.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
            }

            FileManagerPage.StorageLocationSelectList.Select(folderType);
            FileManagerPage.FolderNameTextField.Value = folderName;
            FileManagerPage.AddFolderButton.Click();
        }
Example #3
0
 public void GivenIExportTemplateOfThePage(string pageName)
 {
     NavigateToPage(pageName);
     RibbonBar.ExportPageLink.Click();
     ExportImportPage.TemplateDescriptionField.Value = pageName;
     ExportImportPage.ExportLink.Click();
     ExportImportPage.ExportLink.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
 }
Example #4
0
        private string ExecuteEditorCommand(string command)
        {
            if (HomePage.PopUpFrame != null)
            {
                return(HomePage.PopUpFrame.Eval(command));
            }

            return(IEInstance.Eval(command));
        }
Example #5
0
 public void WhenIEnableContentLocalizationSetting()
 {
     if (!HostSettingsPage.AllowContentLocalizationCheckbox.Checked)
     {
         HostSettingsPage.AllowContentLocalizationCheckbox.Checked = true;
         HostSettingsPage.UpdateLink.Click();
         HostSettingsPage.UpdateLink.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
     }
 }
Example #6
0
 public void ResetPageQuota()
 {
     IEInstance.GoTo(SiteUrl + "/logoff.aspx");
     GetPage <LoginPage>().LoginUser(TestUsers.Host.UserName, TestUsers.Host.Password, true, -1);
     IEInstance.GoTo(string.Format("{0}/Admin/SiteSettings.aspx", SiteUrl));
     SiteSettingsPage.PageQuotaField.Value = "0";
     SiteSettingsPage.UpdateLink.Click();
     SiteSettingsPage.UpdateLink.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
 }
Example #7
0
 public void WhenIClicktheFolder(string folderName)
 {
     if (!FileManagerPage.PortalRootSpan.ClassName.Contains("FileManagerTreeNodeSelected"))
     {
         FileManagerPage.PortalRootSpan.Click();
         FileManagerPage.PortalRootSpan.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
     }
     IEInstance.Span(Find.ByTitle(folderName)).Click();
     IEInstance.Span(Find.ByTitle(folderName)).WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
 }
Example #8
0
 public void WaitAjaxRequestComplete()
 {
     if (HomePage.PopUpFrame != null)
     {
         HomePage.PopUpFrame.Body.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
     }
     else
     {
         HomePage.ContentPaneDiv.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
     }
 }
Example #9
0
        public void WhenIAddNewLanguage(string name)
        {
            if (LanguagesPage.LanguageTable.Image(Find.BySrc(s => s.Contains(name))).Exists)
            {
                return;
            }

            LanguagesPage.AddNewLanguage(name, "en-US");
            LanguagesPage.UpdateLink.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
            Thread.Sleep(1000);
            IEInstance.WaitForComplete();
        }
Example #10
0
        private void SelectTreeNode(string nodeName)
        {
            if (!IEInstance.Span(Find.ByTitle(nodeName)).Exists)
            {
                var expandImg = IEInstance.Image(Find.ById(i => i.Contains("DNNTreeexpcoldnn")));
                expandImg.Click();
                expandImg.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
            }

            var node = IEInstance.Span(Find.ByTitle(nodeName));

            node.Click();
            node.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
        }
Example #11
0
        public void WhenIClickButton(string type)
        {
            switch (type)
            {
            case "Next":
                SiteWizardPage.NextButtonLink.Click();
                break;

            case "Finish":
                SiteWizardPage.FinishButtonLink.Click();
                break;
            }
            SiteWizardPage.ContentPaneDiv.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
        }
Example #12
0
        public void GivenIAddANewList(string listName)
        {
            if (ListPage.PageContentDiv.Span(Find.ByText(listName)).Exists)
            {
                return;
            }

            ListPage.AddListButton.Click();
            ListPage.AddListButton.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
            ListPage.ListEntryName.Value  = listName;
            ListPage.ListEntryText.Value  = listName + "Item";
            ListPage.ListEntryValue.Value = listName + "Item";
            ListPage.SaveButton.Click();
            IEInstance.WaitForComplete();
        }
Example #13
0
        public void WhenICreateANewChildPortal()
        {
            if (SiteManagementPage.GetPortalAliasCellByPortalName("Child") != null)
            {
                return;
            }

            SiteManagementPage.AddNewSiteLink.Click();
            SiteManagementPage.ChildRadioButton.Checked = true;
            Thread.Sleep(1000);
            SiteManagementPage.SiteAliasField.Value += "Child";
            SiteManagementPage.SiteNameField.Value   = "Child";
            SiteManagementPage.CreateSiteLink.Click();
            SiteManagementPage.CreateSiteLink.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
        }
Example #14
0
        public void WhenIAddTheChildPortalToTheGroup()
        {
            if (!SiteGroupPage.AvailablePortalSelectList.Exists)
            {
                return;
            }

            if (SiteGroupPage.AvailablePortalSelectList.Options.Count == 0)
            {
                throw new Exception("No portals available in Portal Select list");
            }

            SiteGroupPage.AvailablePortalSelectList.Option(Find.ByText("Child")).Select();
            SiteGroupPage.AddSiteToGroupButton.Click();

            SiteGroupPage.AddSiteToGroupButton.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
        }
Example #15
0
        public void GivenIAddNewItemToList(string itemName, string listName)
        {
            ListPage.PageContentDiv.Span(Find.ByText(listName)).Click();
            ListPage.PageContentDiv.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));

            if (ListPage.GetHostListRow(itemName) != null)
            {
                return;
            }

            ListPage.AddEntryButton.Click();
            ListPage.AddEntryButton.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));

            ListPage.ListEntryText.Value  = itemName;
            ListPage.ListEntryValue.Value = itemName;
            ListPage.SaveButton.Click();
            ListPage.SaveButton.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
        }
Example #16
0
        public void WhenITryToCreateLanguagePack(string type, string name)
        {
            //delete the language pack file if exist
            var langDir = Path.Combine(PhysicalPath, "Install\\Language");
            var packs   = Directory.GetFiles(langDir, string.Format("*{0}*.zip", name));

            if (packs.Length > 0)
            {
                Array.ForEach <string>(packs, File.Delete);
            }

            LanguagesPage.CreateLanguagePackLink.Click();
            LanguagesPage.SelectLanguagePackType(type);
            LanguagesPage.CreateLink.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));

            LanguagesPage.SelectModuleCheckbox(name);
            LanguagesPage.CreateLink.Click();
            LanguagesPage.CreateLink.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
        }
 public void WhenIClickManageServices()
 {
     UserProfilePage.ManageServicesTabLink.Click();
     UserProfilePage.ManageServicesTabLink.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
 }
Example #18
0
        public void WhenIEnableContentLocalizationOnThePortal()
        {
            if (!LanguagesPage.EnableLocalizedContentLink.Exists)
            {
                return;
            }

            LanguagesPage.EnableLocalizedContentLink.Click();
            LanguagesPage.EnableLocalizedContentConfirmation.Click();
            LanguagesPage.EnableLocalizedContentConfirmation.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
            Thread.Sleep(1000);
            IEInstance.WaitForComplete();
        }
Example #19
0
 public void WhenIClickPreviewEmail()
 {
     NewsletterPage.ContentPaneDiv.Link(Find.ByTitle("Preview Email")).Click();
     NewsletterPage.ContentPaneDiv.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
 }
Example #20
0
 public void WhenIChangeWorkflowToContentApproval(string name)
 {
     HTMLModule.WorkflowSelectList.Select(name);
     HTMLModule.WorkflowSelectList.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
     HTMLModule.UpdateLink.Click();
 }
Example #21
0
 public void WhenIClickTheCreateSiteLink()
 {
     SiteManagementPage.CreateSiteLink.Click();
     SiteManagementPage.CreateSiteLink.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
 }
Example #22
0
 public void WhenIRunScheduler(string name)
 {
     SchedulePage.GetScheduleItemEditButton(name).Click();
     HomePage.PopUpFrame.Link(Find.ByTitle("Run Now")).Click();
     HomePage.PopUpFrame.Link(Find.ByTitle("Run Now")).WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
     IEInstance.Refresh();
     Thread.Sleep(25000);
 }
Example #23
0
 public void IClickUpdateButton()
 {
     SecurityRolesPage.UpdateLink.Click();
     SecurityRolesPage.UpdateLink.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
     Thread.Sleep(2000);
 }
Example #24
0
 public void ThenModuleShouldDisplayAfterChangeModuleCatagory(string moduleName, string catagory)
 {
     RibbonBar.ModuleCategorySelectList.SelectByValue(catagory);
     RibbonBar.ModuleCategorySelectList.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
     Assert.IsTrue(RibbonBar.ModuleSelectDiv.ListItem(Find.ByText(t => t.Contains(moduleName))).Exists);
 }
Example #25
0
 public void WhenIClickUpdateButton()
 {
     UserProfilePage.ProfileUpdateLink.Click();
     UserProfilePage.ProfileUpdateLink.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
 }
Example #26
0
 public void WhenIUpdateSiteSettings()
 {
     SiteSettingsPage.UpdateLink.Click();
     SiteSettingsPage.UpdateLink.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();")));
 }