Ejemplo n.º 1
0
 /// <summary>
 /// Adds content to the module specified.
 /// Content will be added through the basic text editor.
 /// </summary>
 /// <param name="contentString">The content to add to the module.</param>
 /// <param name="moduleNum">The index of the module on the page. To find the action menu image for the first module on the page use 0.</param>
 public void AddContentToModule(string contentString, int moduleNum)
 {
     try
     {
         GetEditModuleContentLink(moduleNum).ClickNoWait();
         Thread.Sleep(2500);
         CurrentContentLink.ClickNoWait();
         Thread.Sleep(2500);
         if (!MainContentSectionLink.ClassName.Contains("SectionExpanded"))
         {
             MainContentSectionLink.ClickNoWait();
         }
         Thread.Sleep(3500);
         BasicTextBoxRadioButton.Click();
         Thread.Sleep(3500);
         ModuleTextBox.Value = contentString;
         Thread.Sleep(2500);
         SaveContentLink.ClickNoWait();
         Thread.Sleep(3500);
     }
     catch (Exception exc)
     {
         Console.Write(exc.Message);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Adds and publishes content to the html module.
 /// Content will be added using the basic text editor.
 /// </summary>
 /// <param name="content">The content to add to the HTML module.</param>
 /// <param name="moduleNum">The index of the module on the current page. To reference the first module on the page enter 0 as the moduleNum.</param>
 public void AddContentToModulePublishModule(string content, int moduleNum)
 {
     GetEditModuleContentLink(moduleNum).Click();
     SelectTextEditorStyleByName("BASIC");
     ModuleTextBox.Value     = content;
     PublishCheckBox.Checked = true;
     SaveContentLink.Click();
 }