Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.runtime.test.runner.web
Class WebPage

java.lang.Object
  extended by org.nuxeo.runtime.test.runner.web.WebPage

public abstract class WebPage
extends Object

Author:
Bogdan Stefanescu

Field Summary
static int BIG_TIMEOUT
           
static int DEFAULT_TIMEOUT
          Can be used by tests as default timeouts.
 
Constructor Summary
WebPage()
           
 
Method Summary
 WebPage ensureLoaded()
          Should be overridden by dynamic page (using ajax) to wait until the page is completely loaded By default nothing is done (page is assumed to be loaded)
 org.openqa.selenium.WebElement findElement(org.openqa.selenium.By by)
           
 org.openqa.selenium.WebElement findElement(org.openqa.selenium.By by, int timeOutInSeconds)
           
 List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.By by)
           
static void flushPageCache()
           
 Configuration getConfiguration()
           
 org.openqa.selenium.WebDriver getDriver()
           
<T extends WebPage>
T
getPage(Class<T> type)
           
 FeaturesRunner getRunner()
           
 boolean hasElement(org.openqa.selenium.By by)
           
 boolean hasElement(org.openqa.selenium.By by, int timeoutInSeconds)
           
 void home()
           
 void to(String path)
           
 org.openqa.selenium.WebElement waitUntilElementFound(org.openqa.selenium.By by, int timeOutInSeconds)
           
 void waitUntilElementNotFound(org.openqa.selenium.By by, int timeOutInSeconds)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TIMEOUT

public static int DEFAULT_TIMEOUT
Can be used by tests as default timeouts. This way you can change these values to change all the timeout in the tests. DEFAULT_TIMEOUT is used for regular timeouts (loading an ajax page an ajax dialog etc.) while BIG_TIMEOUT should be used for pages that are slower (like the home of a GWT application)


BIG_TIMEOUT

public static int BIG_TIMEOUT
Constructor Detail

WebPage

public WebPage()
Method Detail

ensureLoaded

public WebPage ensureLoaded()
Should be overridden by dynamic page (using ajax) to wait until the page is completely loaded By default nothing is done (page is assumed to be loaded)

Returns:
the page itself

getConfiguration

public Configuration getConfiguration()

getDriver

public org.openqa.selenium.WebDriver getDriver()

getRunner

public FeaturesRunner getRunner()

home

public void home()

to

public void to(String path)

hasElement

public boolean hasElement(org.openqa.selenium.By by)

hasElement

public boolean hasElement(org.openqa.selenium.By by,
                          int timeoutInSeconds)

findElement

public org.openqa.selenium.WebElement findElement(org.openqa.selenium.By by)

findElements

public List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.By by)

findElement

public org.openqa.selenium.WebElement findElement(org.openqa.selenium.By by,
                                                  int timeOutInSeconds)

waitUntilElementFound

public org.openqa.selenium.WebElement waitUntilElementFound(org.openqa.selenium.By by,
                                                            int timeOutInSeconds)

waitUntilElementNotFound

public void waitUntilElementNotFound(org.openqa.selenium.By by,
                                     int timeOutInSeconds)

getPage

public <T extends WebPage> T getPage(Class<T> type)

flushPageCache

public static void flushPageCache()

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.