public class DefaultAtlassianWebDriver extends Object implements AtlassianWebDriver
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 and Description |
|---|
DefaultAtlassianWebDriver(org.openqa.selenium.WebDriver driver,
Browser browser) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
@Inject
public DefaultAtlassianWebDriver(org.openqa.selenium.WebDriver driver,
Browser browser)
public Browser getBrowser()
BrowserAwaregetBrowser in interface BrowserAwarepublic org.openqa.selenium.WebDriver getWrappedDriver()
getWrappedDriver in interface org.openqa.selenium.internal.WrapsDriverpublic org.openqa.selenium.WebDriver getDriver()
AtlassianWebDrivergetDriver in interface AtlassianWebDriverpublic void quit()
AtlassianWebDriverquit 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)
AtlassianWebDriverdumpSourceTo in interface AtlassianWebDriverdumpFile - File to write the source to.public void takeScreenshotTo(File destFile)
AtlassianWebDrivertakeScreenshotTo in interface AtlassianWebDriverdestFile - File to save screen shot.public void waitUntilElementIsVisibleAt(org.openqa.selenium.By elementLocator,
org.openqa.selenium.SearchContext at)
AtlassianWebDriverwaitUntilElementIsVisibleAt in interface AtlassianWebDriverelementLocator - Locator strategy for the element.at - SearchContext to use when locating.public void waitUntilElementIsVisible(org.openqa.selenium.By elementLocator)
AtlassianWebDriverwaitUntilElementIsVisible in interface AtlassianWebDriverelementLocator - Locator strategy for the element.public void waitUntilElementIsNotVisibleAt(org.openqa.selenium.By elementLocator,
org.openqa.selenium.SearchContext at)
AtlassianWebDriverwaitUntilElementIsNotVisibleAt in interface AtlassianWebDriverelementLocator - Locator strategy for the element.at - SearchContext to use when locating.public void waitUntilElementIsNotVisible(org.openqa.selenium.By elementLocator)
AtlassianWebDriverwaitUntilElementIsNotVisible in interface AtlassianWebDriverelementLocator - Locator strategy for the element.public void waitUntilElementIsLocatedAt(org.openqa.selenium.By elementLocator,
org.openqa.selenium.SearchContext at)
AtlassianWebDriverwaitUntilElementIsLocatedAt in interface AtlassianWebDriverelementLocator - Locator strategy for the element.at - SearchContext to use when locating.public void waitUntilElementIsLocated(org.openqa.selenium.By elementLocator)
AtlassianWebDriverwaitUntilElementIsLocated in interface AtlassianWebDriverelementLocator - Locator strategy for the element.public void waitUntilElementIsNotLocatedAt(org.openqa.selenium.By elementLocator,
org.openqa.selenium.SearchContext at)
AtlassianWebDriverwaitUntilElementIsNotLocatedAt in interface AtlassianWebDriverelementLocator - Locator strategy for the element.at - Parent element to use when locating.public void waitUntilElementIsNotLocated(org.openqa.selenium.By elementLocator)
AtlassianWebDriverwaitUntilElementIsNotLocated in interface AtlassianWebDriverelementLocator - Locator strategy for the element.public boolean elementExists(org.openqa.selenium.By locator)
AtlassianWebDriverelementExists in interface AtlassianWebDriverlocator - Locator strategy for the element.public boolean elementExistsAt(org.openqa.selenium.By locator,
org.openqa.selenium.SearchContext context)
AtlassianWebDriverelementExistsAt in interface AtlassianWebDriverlocator - Locator strategy for the element.context - SearchContext to use when locating.public boolean elementIsVisible(org.openqa.selenium.By locator)
AtlassianWebDriverelementIsVisible in interface AtlassianWebDriverlocator - Locator strategy for the element.public boolean elementIsVisibleAt(org.openqa.selenium.By locator,
org.openqa.selenium.SearchContext context)
AtlassianWebDriverelementIsVisibleAt 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, Object... args)
executeScript in interface org.openqa.selenium.JavascriptExecutorpublic 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.HasInputDevicesCopyright © 2015 Atlassian. All rights reserved.