|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.webdriver.DefaultAtlassianWebDriver
public class DefaultAtlassianWebDriver
Exposes a set of common functions to use.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.openqa.selenium.WebDriver |
|---|
org.openqa.selenium.WebDriver.ImeHandler, org.openqa.selenium.WebDriver.Navigation, org.openqa.selenium.WebDriver.Options, org.openqa.selenium.WebDriver.TargetLocator, org.openqa.selenium.WebDriver.Timeouts, org.openqa.selenium.WebDriver.Window |
| Constructor Summary | |
|---|---|
DefaultAtlassianWebDriver(org.openqa.selenium.WebDriver driver,
Browser browser)
|
|
| Method Summary | |
|---|---|
void |
close()
|
void |
dumpSourceTo(File dumpFile)
Writes the source of the last loaded page to the specified file. |
boolean |
elementExists(org.openqa.selenium.By locator)
Whether an element is present on the page. |
boolean |
elementExistsAt(org.openqa.selenium.By locator,
org.openqa.selenium.SearchContext context)
Whether an element is present within a search context. |
boolean |
elementIsVisible(org.openqa.selenium.By locator)
Whether an element is visible on the page. |
boolean |
elementIsVisibleAt(org.openqa.selenium.By locator,
org.openqa.selenium.SearchContext context)
Whether an element is visible within a given search context. |
Object |
executeAsyncScript(String s,
Object... objects)
|
Object |
executeScript(String script)
|
Object |
executeScript(String script,
Object... args)
|
org.openqa.selenium.WebElement |
findElement(org.openqa.selenium.By by)
|
List<org.openqa.selenium.WebElement> |
findElements(org.openqa.selenium.By by)
|
void |
get(String url)
WebDriver implementation below |
Browser |
getBrowser()
Get browser associated with this component. |
String |
getCurrentUrl()
|
org.openqa.selenium.WebDriver |
getDriver()
Gets the underlying WebDriver. |
org.openqa.selenium.interactions.Keyboard |
getKeyboard()
|
org.openqa.selenium.interactions.Mouse |
getMouse()
|
String |
getPageSource()
|
String |
getTitle()
|
String |
getWindowHandle()
|
Set<String> |
getWindowHandles()
|
org.openqa.selenium.WebDriver |
getWrappedDriver()
|
boolean |
isJavascriptEnabled()
|
org.openqa.selenium.WebDriver.Options |
manage()
|
org.openqa.selenium.WebDriver.Navigation |
navigate()
|
void |
quit()
Quits this driver, closing every associated window. |
org.openqa.selenium.WebDriver.TargetLocator |
switchTo()
|
void |
takeScreenshotTo(File destFile)
Saves screen shot of the browser to the specified file. |
void |
waitUntil(com.google.common.base.Function<org.openqa.selenium.WebDriver,Boolean> isTrue)
Waits for condition to evaluate to true until default timeout. |
void |
waitUntil(com.google.common.base.Function<org.openqa.selenium.WebDriver,Boolean> isTrue,
int timeoutInSeconds)
Waits for condition to evaluate to true until given timeout. |
void |
waitUntilElementIsLocated(org.openqa.selenium.By elementLocator)
Wait until element is present on the page. |
void |
waitUntilElementIsLocatedAt(org.openqa.selenium.By elementLocator,
org.openqa.selenium.SearchContext at)
Wait until element is present within a search context. |
void |
waitUntilElementIsNotLocated(org.openqa.selenium.By elementLocator)
Wait until element is not present on the page. |
void |
waitUntilElementIsNotLocatedAt(org.openqa.selenium.By elementLocator,
org.openqa.selenium.SearchContext at)
Wait until element is not present within a search context. |
void |
waitUntilElementIsNotVisible(org.openqa.selenium.By elementLocator)
Wait until element is not visible on the page. |
void |
waitUntilElementIsNotVisibleAt(org.openqa.selenium.By elementLocator,
org.openqa.selenium.SearchContext at)
Wait until element is not visible within a search context. |
void |
waitUntilElementIsVisible(org.openqa.selenium.By elementLocator)
Wait until element is visible on the page. |
void |
waitUntilElementIsVisibleAt(org.openqa.selenium.By elementLocator,
org.openqa.selenium.SearchContext at)
Wait until element is visible within search context. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
@Inject
public DefaultAtlassianWebDriver(org.openqa.selenium.WebDriver driver,
Browser browser)
| Method Detail |
|---|
public Browser getBrowser()
BrowserAware
getBrowser in interface BrowserAwarepublic org.openqa.selenium.WebDriver getWrappedDriver()
getWrappedDriver in interface org.openqa.selenium.internal.WrapsDriverpublic org.openqa.selenium.WebDriver getDriver()
AtlassianWebDriver
getDriver in interface AtlassianWebDriverpublic void quit()
AtlassianWebDriver
quit in interface AtlassianWebDriverquit in interface org.openqa.selenium.WebDriverpublic void waitUntil(com.google.common.base.Function<org.openqa.selenium.WebDriver,Boolean> isTrue)
AtlassianWebDriverIf the condition does not become true within default timeout, this method will throw a TimeoutException.
waitUntil in interface AtlassianWebDriverisTrue - Function that evaluates true if waiting is complete.
public void waitUntil(com.google.common.base.Function<org.openqa.selenium.WebDriver,Boolean> isTrue,
int timeoutInSeconds)
AtlassianWebDriverIf the condition does not become true within given timeout, this method will throw a TimeoutException.
waitUntil in interface AtlassianWebDriverisTrue - Function that evaluates true if waiting is complete.timeoutInSeconds - Timeout in seconds to wait for condition to return true.public void dumpSourceTo(File dumpFile)
AtlassianWebDriver
dumpSourceTo in interface AtlassianWebDriverdumpFile - File to write the source to.public void takeScreenshotTo(File destFile)
AtlassianWebDriver
takeScreenshotTo in interface AtlassianWebDriverdestFile - File to save screen shot.
public void waitUntilElementIsVisibleAt(org.openqa.selenium.By elementLocator,
org.openqa.selenium.SearchContext at)
AtlassianWebDriver
waitUntilElementIsVisibleAt in interface AtlassianWebDriverelementLocator - Locator strategy for the element.at - SearchContext to use when locating.public void waitUntilElementIsVisible(org.openqa.selenium.By elementLocator)
AtlassianWebDriver
waitUntilElementIsVisible in interface AtlassianWebDriverelementLocator - Locator strategy for the element.
public void waitUntilElementIsNotVisibleAt(org.openqa.selenium.By elementLocator,
org.openqa.selenium.SearchContext at)
AtlassianWebDriver
waitUntilElementIsNotVisibleAt in interface AtlassianWebDriverelementLocator - Locator strategy for the element.at - SearchContext to use when locating.public void waitUntilElementIsNotVisible(org.openqa.selenium.By elementLocator)
AtlassianWebDriver
waitUntilElementIsNotVisible in interface AtlassianWebDriverelementLocator - Locator strategy for the element.
public void waitUntilElementIsLocatedAt(org.openqa.selenium.By elementLocator,
org.openqa.selenium.SearchContext at)
AtlassianWebDriver
waitUntilElementIsLocatedAt in interface AtlassianWebDriverelementLocator - Locator strategy for the element.at - SearchContext to use when locating.public void waitUntilElementIsLocated(org.openqa.selenium.By elementLocator)
AtlassianWebDriver
waitUntilElementIsLocated in interface AtlassianWebDriverelementLocator - Locator strategy for the element.
public void waitUntilElementIsNotLocatedAt(org.openqa.selenium.By elementLocator,
org.openqa.selenium.SearchContext at)
AtlassianWebDriver
waitUntilElementIsNotLocatedAt in interface AtlassianWebDriverelementLocator - Locator strategy for the element.at - Parent element to use when locating.public void waitUntilElementIsNotLocated(org.openqa.selenium.By elementLocator)
AtlassianWebDriver
waitUntilElementIsNotLocated in interface AtlassianWebDriverelementLocator - Locator strategy for the element.public boolean elementExists(org.openqa.selenium.By locator)
AtlassianWebDriver
elementExists in interface AtlassianWebDriverlocator - Locator strategy for the element.
public boolean elementExistsAt(org.openqa.selenium.By locator,
org.openqa.selenium.SearchContext context)
AtlassianWebDriver
elementExistsAt in interface AtlassianWebDriverlocator - Locator strategy for the element.context - SearchContext to use when locating.
public boolean elementIsVisible(org.openqa.selenium.By locator)
AtlassianWebDriver
elementIsVisible in interface AtlassianWebDriverlocator - Locator strategy for the element.
public boolean elementIsVisibleAt(org.openqa.selenium.By locator,
org.openqa.selenium.SearchContext context)
AtlassianWebDriver
elementIsVisibleAt in interface AtlassianWebDriverlocator - Locator strategy for the element.context - SearchContext to use when locating.
public void get(String url)
get in interface org.openqa.selenium.WebDriverpublic String getCurrentUrl()
getCurrentUrl in interface org.openqa.selenium.WebDriverpublic String getTitle()
getTitle in interface org.openqa.selenium.WebDriverpublic List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.By by)
findElements in interface org.openqa.selenium.SearchContextfindElements in interface org.openqa.selenium.WebDriverpublic org.openqa.selenium.WebElement findElement(org.openqa.selenium.By by)
findElement in interface org.openqa.selenium.SearchContextfindElement in interface org.openqa.selenium.WebDriverpublic String getPageSource()
getPageSource in interface org.openqa.selenium.WebDriverpublic void close()
close in interface org.openqa.selenium.WebDriverpublic Set<String> getWindowHandles()
getWindowHandles in interface org.openqa.selenium.WebDriverpublic String getWindowHandle()
getWindowHandle in interface org.openqa.selenium.WebDriverpublic org.openqa.selenium.WebDriver.TargetLocator switchTo()
switchTo in interface org.openqa.selenium.WebDriverpublic org.openqa.selenium.WebDriver.Navigation navigate()
navigate in interface org.openqa.selenium.WebDriverpublic org.openqa.selenium.WebDriver.Options manage()
manage in interface org.openqa.selenium.WebDriverpublic Object executeScript(String script)
public Object executeScript(String script,
Object... args)
executeScript in interface org.openqa.selenium.JavascriptExecutor
public Object executeAsyncScript(String s,
Object... objects)
executeAsyncScript in interface org.openqa.selenium.JavascriptExecutorpublic boolean isJavascriptEnabled()
public org.openqa.selenium.interactions.Keyboard getKeyboard()
getKeyboard in interface org.openqa.selenium.interactions.HasInputDevicespublic org.openqa.selenium.interactions.Mouse getMouse()
getMouse in interface org.openqa.selenium.interactions.HasInputDevices
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||