|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.pageobjects.WebdriverUtils
public class WebdriverUtils
A utility class for webdriver tests.
| Constructor Summary | |
|---|---|
WebdriverUtils(com.atlassian.pageobjects.elements.PageElementFinder pageElementFinder,
org.openqa.selenium.JavascriptExecutor executor,
com.atlassian.pageobjects.elements.timeout.Timeouts timeouts,
com.atlassian.webdriver.waiter.Waiter waiter)
|
|
| Method Summary | |
|---|---|
String |
getMetadata(String name)
Returns the meta tag's content. |
long |
getMetadataLong(String name)
|
Long |
getPageRequestTime()
Returns the confluence request time served in the page's meta tag Note: this is done via javascript as the page can change during the time the elements are read |
void |
waitForNoPageReload(com.atlassian.pageobjects.elements.PageElement elementToClick)
|
void |
waitForPageChange(com.atlassian.pageobjects.elements.PageElement elementToClick)
This method is useful when a new page is loaded via javascript. |
void |
waitForPageChange(Runnable r)
Ensures that after running the given Runnable that the page did reload. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
@Inject
public WebdriverUtils(com.atlassian.pageobjects.elements.PageElementFinder pageElementFinder,
org.openqa.selenium.JavascriptExecutor executor,
com.atlassian.pageobjects.elements.timeout.Timeouts timeouts,
com.atlassian.webdriver.waiter.Waiter waiter)
| Method Detail |
|---|
public void waitForPageChange(Runnable r)
r - a runnable that will perform some action that should cause a page reload.for {@link #waitForPageChange(com.atlassian.pageobjects.elements.PageElement)}.public void waitForPageChange(com.atlassian.pageobjects.elements.PageElement elementToClick)
elementToClick - the element to click before waiting for the page to changepublic void waitForNoPageReload(com.atlassian.pageobjects.elements.PageElement elementToClick)
public Long getPageRequestTime()
public String getMetadata(String name)
name - name of the meta tag, excluding the ajs- prefix
public long getMetadataLong(String name)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||