Example #1
0
 /// <summary>
 /// Adds a module to a page.
 /// </summary>
 /// <param name="moduleName">The name that will be given to the module. Entering "" as a name will not fill in the module title field.</param>
 /// <param name="moduleType">The type of module that will be added. Ex. HTML, Links, Dashboard etc.</param>
 public void AddModuleToPage(string moduleName, string moduleType)
 {
     ModuleSelect.Select(moduleType);
     if (!moduleName.Equals(""))
     {
         ModuleTitleField.Value = moduleName;
     }
     AddModuleLink.ClickNoWait();
 }
Example #2
0
 /// <summary>
 /// Adds an existing module to a page.
 /// </summary>
 /// <param name="pageName">The name of the page containing the existing module.</param>
 /// <param name="moduleName">The name of the existing module.</param>
 public void AddExistingModuleToPage(string pageName, string moduleName)
 {
     AddExistingModuleRadioButton.Checked = true;
     System.Threading.Thread.Sleep(3000);
     ExistingModulePageSelectList.Select(pageName);
     System.Threading.Thread.Sleep(1000);
     ExistingModuleSelectList.Select(moduleName);
     AddModuleLink.Click();
 }
Example #3
0
 /// <summary>
 /// Adds a module to a page and inserts it above or below another module.
 /// </summary>
 /// <param name="moduleName">The name that will be given to the module. Entering "" as a name will not fill in the module title field.</param>
 /// <param name="moduleType">The type of module that will be added. Ex. HTML, Links, Dashboard etc.</param>
 /// <param name="insert">How the module shoudl be inserted. "Above" or "Below".</param>
 /// <param name="otherModule">The module that the new module will be inserted relative to.</param>
 public void AddModuleToPageInsert(string moduleName, string moduleType, string insert, string otherModule)
 {
     ModuleSelect.Select(moduleName);
     if (!moduleName.Equals(""))
     {
         ModuleTitleField.Value = moduleName;
     }
     ModuleInsertSelect.Select(insert);
     if (insert.ToLower().Equals("above") || insert.ToLower().Equals("below"))
     {
         InsertRelativeSelectList.Select(otherModule);
     }
     AddModuleLink.Click();
 }
Example #4
0
        /// <summary>
        /// Adds a module to a page and adds content to the module.
        /// </summary>
        /// <param name="moduleName">The name that will be given to the module. Entering "" as a name will not fill in the module title field.</param>
        /// <param name="moduleType">The type of module that will be added. Ex. HTML, Links, Dashboard etc.</param>
        /// <param name="content">The content that will be added to the module.</param>
        /// <param name="moduleIndex">The index for the module on the page. Ex. if the module will be the first one on the page the index should be 0.</param>
        public void AddHTMLModuleToPageWithContent(string moduleName, string moduleType, string content, int moduleIndex)
        {
            ModuleSelect.Select(moduleType);
            if (!moduleName.Equals(""))
            {
                ModuleTitleField.Value = moduleName;
            }
            AddModuleLink.Click();

            System.Threading.Thread.Sleep(2000);
            var htmlModule = new HTMLModule(this);

            htmlModule.AddContentToModule(content, moduleIndex);
        }