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();"))); } }
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(); }
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();"))); }
private string ExecuteEditorCommand(string command) { if (HomePage.PopUpFrame != null) { return(HomePage.PopUpFrame.Eval(command)); } return(IEInstance.Eval(command)); }
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();"))); } }
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();"))); }
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();"))); }
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();"))); } }
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(); }
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();"))); }
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();"))); }
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(); }
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();"))); }
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();"))); }
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();"))); }
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();"))); }
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(); }
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();"))); }
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(); }
public void WhenIClickTheCreateSiteLink() { SiteManagementPage.CreateSiteLink.Click(); SiteManagementPage.CreateSiteLink.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();"))); }
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); }
public void IClickUpdateButton() { SecurityRolesPage.UpdateLink.Click(); SecurityRolesPage.UpdateLink.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();"))); Thread.Sleep(2000); }
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); }
public void WhenIClickUpdateButton() { UserProfilePage.ProfileUpdateLink.Click(); UserProfilePage.ProfileUpdateLink.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();"))); }
public void WhenIUpdateSiteSettings() { SiteSettingsPage.UpdateLink.Click(); SiteSettingsPage.UpdateLink.WaitUntil(p => !Convert.ToBoolean(IEInstance.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();"))); }