com.atlassian.jira.webtest.framework.core
Interface PageObjectFactory

All Known Implementing Classes:
SeleniumPageObjectFactory

public interface PageObjectFactory

Responsible for creating page objects being the entry point into the framework.

Since:
v4.3

Method Summary
<T extends GlobalPage>
T
createGlobalPage(Class<T> pageType)
          Create a global page of given pageType.
 Locator createLocator(LocatorType type, String value)
          Create locator given a locator type and value.
<P extends PageObject>
P
createPageObject(Class<P> type)
          Create any page object component of the framework
 

Method Detail

createGlobalPage

<T extends GlobalPage> T createGlobalPage(Class<T> pageType)
Create a global page of given pageType.

Type Parameters:
T - type of the global page to create
Parameters:
pageType - class representing the interface of the desired global page.
Returns:
a global page instance that is a valid implementation of the GlobalPage interface in the test context represented by this factory
Throws:
IllegalArgumentException - if pageType does not represent an abstract interface of the desired global page, or this factory is not able to provide implementations of the interface represented by pageType. At the very least, every factory should support default global pages specified in the GlobalPages enumeration
See Also:
GlobalPages

createLocator

Locator createLocator(LocatorType type,
                      String value)
Create locator given a locator type and value.

Parameters:
type - type of the desired locator
value - value of the desired locator
Returns:
new locator
Throws:
IllegalArgumentException - if type is not recoginzed by this factory, or type and value are deemed incompatible for the locator created by this factory
See Also:
Locator

createPageObject

<P extends PageObject> P createPageObject(Class<P> type)
Create any page object component of the framework

Type Parameters:
P - type of the component
Parameters:
type - component class
Returns:
component instance
Throws:
IllegalArgumentException - if component type P is not supported by this factory


Copyright © 2002-2013 Atlassian. All Rights Reserved.