Package org.jenkinsci.test.acceptance.po
Class ConfigurablePageObject
java.lang.Object
org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl
org.jenkinsci.test.acceptance.po.PageObject
org.jenkinsci.test.acceptance.po.ConfigurablePageObject
- All Implemented Interfaces:
CapybaraPortingLayer
- Direct Known Subclasses:
ContainerPageObject
,CredentialsPage
,DomainPage
,JenkinsConfig
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl
CapybaraPortingLayerImpl.Finder<R>, CapybaraPortingLayerImpl.Resolver
-
Field Summary
Fields inherited from class org.jenkinsci.test.acceptance.po.PageObject
jsonParser, url
Fields inherited from class org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl
driver, injector, LABEL_TO_INPUT_XPATH, time
Fields inherited from interface org.jenkinsci.test.acceptance.po.CapybaraPortingLayer
by
-
Constructor Summary
ModifierConstructorDescriptionConfigurablePageObject
(com.google.inject.Injector injector, URL url) protected
ConfigurablePageObject
(PageObject context, URL url) -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply()
void
Open configuration page if not yet opened.void
configure
(groovy.lang.Closure body) Edits this configurable page object using the specified closure.void
Edits this configurable page object using the specified configuration lambda.<T> T
Edits this configurable page object using the specified callable.void
Makes sure that the browser is currently opening the configuration page.abstract URL
void
save()
Methods inherited from class org.jenkinsci.test.acceptance.po.PageObject
control, control, createPageArea, createRandomName, getContext, getJenkins, open, toString, url, url, visit
Methods inherited from class org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl
all, blur, check, check, check, choose, clickButton, clickLink, confirmAlert, elasticSleep, executeScript, fillIn, find, findCaption, findCaption, findIfNotVisible, getCurrentUrl, getCurrentUrlWithFragment, getElement, getPageContent, getPageSource, getPageSource, getPath, handleAlert, isHiddenOrStale, isStale, last, lastIfNotVisible, newInstance, resource, runThenConfirmAlert, runThenConfirmAlert, runThenHandleAlert, runThenHandleAlert, runThenHandleDialog, sleep, visit, waitFor, waitFor, waitFor, waitFor, waitFor, waitForCond, waitForCond
-
Constructor Details
-
ConfigurablePageObject
-
ConfigurablePageObject
-
-
Method Details
-
configure
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
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
-
getSubmitButtonText
-
ensureConfigPage
public void ensureConfigPage()Makes sure that the browser is currently opening the configuration page. -
getConfigUrl
-
save
public void save() -
apply
public void apply()
-