Class GrouperUiBrowserTemplateRun

java.lang.Object
edu.internet2.middleware.grouper.app.browser.GrouperUiBrowser
edu.internet2.middleware.grouper.app.browser.GrouperUiBrowserTemplateRun

public class GrouperUiBrowserTemplateRun extends GrouperUiBrowser
This class is used to programmatically run a GSH template. This class can run templates on groups, stems, or in the GSH templates page in Miscellaneous.

Run Gsh template in misellaneous>gsh templates. Add desired input values. Store each of the error, info, and success message outputs as lists.

    GrouperUiBrowserTemplateRun grouperUiBrowserTemplateRun = new GrouperUiBrowserTemplateRun(
      grouperPage).assignGshTemplateConfigId("validateGrouper").
      assignSecondsToWait(20).addInputValue("gsh_input_expectedVersion", "1.2.3").
      addInputValue("gsh_input_textarea", "textAreaInput").
      addInputValue("gsh_input_dropdown", "first").
      addInputValue("gsh_input_password", "passwordInput").browse();
    List messageErrors = rouperUiBrowserTemplateRun.getGrouperUiBrowserDaemonErrors();
    List messageInfos = rouperUiBrowserTemplateRun.getGrouperUiBrowserDaemonErrors();
    List messageSuccesses = rouperUiBrowserTemplateRun.getGrouperUiBrowserDaemonErrors();
 

  • Constructor Details

    • GrouperUiBrowserTemplateRun

      public GrouperUiBrowserTemplateRun(GrouperPage grouperPage)
  • Method Details

    • assignGroupToExecuteInName

      public GrouperUiBrowserTemplateRun assignGroupToExecuteInName(String groupToExecuteInName)
      Id Path in UI
      Parameters:
      groupToExecuteInName -
      Returns:
      this object
    • assignGroupToExecuteInId

      public GrouperUiBrowserTemplateRun assignGroupToExecuteInId(String groupToExecuteInId)
      Uuid of the group
      Parameters:
      groupToExecuteInName -
      Returns:
      this object
    • assignGroupToExecuteIn

      public GrouperUiBrowserTemplateRun assignGroupToExecuteIn(Group group)
      Pass in a group object
      Parameters:
      groupToExecuteInName -
      Returns:
      this object
    • assignStemToExecuteInName

      public GrouperUiBrowserTemplateRun assignStemToExecuteInName(String stemToExecuteInName)
      Folder in UI
      Parameters:
      stemToExecuteInName -
      Returns:
      this object
    • assignGshTemplateConfigId

      public GrouperUiBrowserTemplateRun assignGshTemplateConfigId(String gshTemplateConfigId)
    • assignStemToExecuteIn

      public GrouperUiBrowserTemplateRun assignStemToExecuteIn(Stem stem)
      Pass in a stem object
      Parameters:
      groupToExecuteInName -
      Returns:
      this object
    • addInputValue

      public GrouperUiBrowserTemplateRun addInputValue(String inputName, String value)
      For the template inputs
      Parameters:
      inputName -
      value -
      Returns:
    • assignSecondsToWait

      public GrouperUiBrowserTemplateRun assignSecondsToWait(int secondsToWait)
      Default amount of seconds to wait for the template to run. We found no other way to verify this.
    • getMessageContentSuccesses

      public List<String> getMessageContentSuccesses()
      The success messages (green). The user can check each sorted messge contents to view desired outputs.
      Returns:
    • getMessageContentInfos

      public List<String> getMessageContentInfos()
      The info messages (blue). The user can check each sorted messge contents to view desired outputs.
      Returns:
    • getMessageContentErrors

      public List<String> getMessageContentErrors()
      The error messages. The user can check each sorted messge contents to view desried outputs.
      Returns:
    • browse

      public GrouperUiBrowserTemplateRun browse()
      This method starts off by running the correct template in the correct place (stem, group, misc>gsh templates). It then fills in the previously mapped inputs, and then clicks submit and waits the desired time with a default of 40 seconds. After this, it sorts the messages into lists based on success, info, and error.
      Returns: