com.atlassian.pageobjects
Interface PageBinder

All Known Implementing Classes:
InjectPageBinder

public interface PageBinder

Creates and binds the page objects to the page. Also supports special page navigation. Implementations should use any defined overrides in preference to passed class instances.


Method Summary
<P> P
bind(Class<P> pageClass, Object... args)
          Builds and binds the page object to the page.
<P> DelayedBinder<P>
delayedBind(Class<P> pageClass, Object... args)
          Creates a delayed binder that gives the caller full control over the lifecycle of the page object.
<P extends Page>
P
navigateToAndBind(Class<P> pageClass, Object... args)
          Constructs the page object, changes the browser URL to the desired page URL, then binds the object to the page.
<P> void
override(Class<P> oldClass, Class<? extends P> newClass)
          Overrides a page object
 

Method Detail

navigateToAndBind

<P extends Page> P navigateToAndBind(Class<P> pageClass,
                                     Object... args)
Constructs the page object, changes the browser URL to the desired page URL, then binds the object to the page.

Type Parameters:
P - The page type
Parameters:
pageClass - The page class
args - Arguments to pass to the page object constructor.
Returns:
The constructed and fully loaded page with the browser set accordingly

bind

<P> P bind(Class<P> pageClass,
           Object... args)
Builds and binds the page object to the page.

Type Parameters:
P - The page type
Parameters:
pageClass - The page object class
args - Arguments to pass to the page object constructor.
Returns:
The constructed and loaded page object with the browser set accordingly

delayedBind

<P> DelayedBinder<P> delayedBind(Class<P> pageClass,
                                 Object... args)
Creates a delayed binder that gives the caller full control over the lifecycle of the page object. The page object will not even be instantiated until the DelayedBinder methods are called.

Type Parameters:
P - The page type
Parameters:
pageClass - The page object class
args - The arguments to pass to the page object constructor
Returns:
A delayed binder instance

override

<P> void override(Class<P> oldClass,
                  Class<? extends P> newClass)
Overrides a page object

Type Parameters:
P - The old class type
Parameters:
oldClass - The old class that would have normally been constructed
newClass - An subclass of the old class to be substituted


Copyright © 2014 Atlassian. All rights reserved.