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, urlFields inherited from class org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl
driver, injector, LABEL_TO_INPUT_XPATH, timeFields inherited from interface org.jenkinsci.test.acceptance.po.CapybaraPortingLayer
by -
Constructor Summary
ConstructorsModifierConstructorDescriptionConfigurablePageObject(com.google.inject.Injector injector, URL url) protectedConfigurablePageObject(PageObject context, URL url) -
Method Summary
Modifier and TypeMethodDescriptionvoidapply()voidOpen configuration page if not yet opened.voidconfigure(groovy.lang.Closure body) Edits this configurable page object using the specified closure.voidEdits this configurable page object using the specified configuration lambda.<T> TEdits this configurable page object using the specified callable.voidMakes sure that the browser is currently opening the configuration page.abstract URLvoidsave()Methods inherited from class org.jenkinsci.test.acceptance.po.PageObject
control, control, createPageArea, createRandomName, ensureOpen, getContext, getJenkins, open, toString, url, url, visitMethods 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, runThenHandleInputDialog, runThenHandleUserPrompt, 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
-
ensureConfigPage
public void ensureConfigPage()Makes sure that the browser is currently opening the configuration page. -
getConfigUrl
-
save
public void save() -
apply
public void apply()
-