Class ConfigurablePageObject

All Implemented Interfaces:
CapybaraPortingLayer
Direct Known Subclasses:
ContainerPageObject, CredentialsPage, DomainPage, JenkinsConfig

public abstract class ConfigurablePageObject extends PageObject
PageObject that can be configured and saved.

There are 2 uses of this: - ContainerPageObject, PO that has /configure page associated - PO that is itself a config page, such as /configureSecurity

Author:
ogondza.
  • Constructor Details

    • ConfigurablePageObject

      protected ConfigurablePageObject(PageObject context, URL url)
    • ConfigurablePageObject

      public ConfigurablePageObject(com.google.inject.Injector injector, URL url)
  • Method Details

    • configure

      public void configure(Runnable body)
      Edits this configurable page object using the specified configuration lambda. Opens the configuration view, runs the specified body and saves the changes.
      Parameters:
      body - the additional configuration options for this page object
    • configure

      public void configure(groovy.lang.Closure body)
      Edits this configurable page object using the specified closure. Opens the configuration view, runs the specified body and saves the changes.
      Parameters:
      body - the additional configuration options for this page object
    • configure

      public <T> T configure(Callable<T> body)
      Edits this configurable page object using the specified callable. Opens the configuration view, runs the specified body and saves the changes.
      Parameters:
      body - the additional configuration options for this page object
      Returns:
      return value of the body
    • configure

      public void configure()
      Open configuration page if not yet opened.
      See Also:
    • getFormName

      public String getFormName()
    • getSubmitButtonText

      public String getSubmitButtonText()
    • ensureConfigPage

      public void ensureConfigPage()
      Makes sure that the browser is currently opening the configuration page.
    • getConfigUrl

      public abstract URL getConfigUrl()
    • save

      public void save()
    • apply

      public void apply()