public class XWikiWebDriver
extends org.openqa.selenium.remote.RemoteWebDriver
WebDriver
instance and adds new APIs useful for XWiki tests.org.openqa.selenium.remote.RemoteWebDriver.RemoteTargetLocator, org.openqa.selenium.remote.RemoteWebDriver.RemoteWebDriverOptions, org.openqa.selenium.remote.RemoteWebDriver.When
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 |
---|
XWikiWebDriver(org.openqa.selenium.remote.RemoteWebDriver wrappedDriver) |
Modifier and Type | Method and Description |
---|---|
void |
addPageNotYetReloadedMarker()
Adds a marker in the DOM of the browser that will only be available until we leave or reload the current page.
|
void |
close() |
org.openqa.selenium.interactions.Actions |
createActions()
Utility method to build a proper instance of
Actions . |
void |
dragAndDrop(org.openqa.selenium.WebElement source,
org.openqa.selenium.WebElement target)
Utility method to perform a drag & drop by using the appropriate WebDriver.
|
Object |
executeAsyncScript(String script,
Object... args) |
Object |
executeJavascript(String javascript,
Object... arguments) |
Object |
executeScript(String script,
Object... args) |
org.openqa.selenium.WebElement |
findElement(org.openqa.selenium.By by) |
org.openqa.selenium.WebElement |
findElementByClassName(String using) |
org.openqa.selenium.WebElement |
findElementByCssSelector(String using) |
org.openqa.selenium.WebElement |
findElementById(String using) |
org.openqa.selenium.WebElement |
findElementByLinkText(String using) |
org.openqa.selenium.WebElement |
findElementByName(String using) |
org.openqa.selenium.WebElement |
findElementByPartialLinkText(String using) |
org.openqa.selenium.WebElement |
findElementByTagName(String using) |
org.openqa.selenium.WebElement |
findElementByXPath(String using) |
List<org.openqa.selenium.WebElement> |
findElements(org.openqa.selenium.By by) |
List<org.openqa.selenium.WebElement> |
findElementsByClassName(String using) |
List<org.openqa.selenium.WebElement> |
findElementsByCssSelector(String using) |
List<org.openqa.selenium.WebElement> |
findElementsById(String using) |
List<org.openqa.selenium.WebElement> |
findElementsByLinkText(String using) |
List<org.openqa.selenium.WebElement> |
findElementsByName(String using) |
List<org.openqa.selenium.WebElement> |
findElementsByPartialLinkText(String using) |
List<org.openqa.selenium.WebElement> |
findElementsByTagName(String using) |
List<org.openqa.selenium.WebElement> |
findElementsByXPath(String using) |
List<org.openqa.selenium.WebElement> |
findElementsWithoutWaiting(org.openqa.selenium.By by) |
List<org.openqa.selenium.WebElement> |
findElementsWithoutWaiting(org.openqa.selenium.WebElement element,
org.openqa.selenium.By by) |
org.openqa.selenium.WebElement |
findElementWithoutScrolling(org.openqa.selenium.By by)
Same as
findElement(By) but don't scroll to make the element visible. |
org.openqa.selenium.WebElement |
findElementWithoutWaiting(org.openqa.selenium.By by) |
org.openqa.selenium.WebElement |
findElementWithoutWaiting(org.openqa.selenium.WebElement element,
org.openqa.selenium.By by) |
org.openqa.selenium.WebElement |
findElementWithoutWaitingWithoutScrolling(org.openqa.selenium.By by)
Same as
findElementWithoutWaiting(By) but don't scroll to make the element visible. |
void |
get(String s) |
org.openqa.selenium.Capabilities |
getCapabilities() |
org.openqa.selenium.remote.CommandExecutor |
getCommandExecutor() |
String |
getCurrentUrl() |
org.openqa.selenium.remote.ErrorHandler |
getErrorHandler() |
org.openqa.selenium.remote.FileDetector |
getFileDetector() |
org.openqa.selenium.interactions.Keyboard |
getKeyboard() |
org.openqa.selenium.interactions.Mouse |
getMouse() |
String |
getPageSource() |
<X> X |
getScreenshotAs(org.openqa.selenium.OutputType<X> outputType) |
org.openqa.selenium.remote.SessionId |
getSessionId() |
int |
getTimeout() |
String |
getTitle() |
String |
getWindowHandle() |
Set<String> |
getWindowHandles() |
org.openqa.selenium.remote.RemoteWebDriver |
getWrappedDriver() |
boolean |
hasElement(org.openqa.selenium.By by)
Should be used when the result is supposed to be true (otherwise you'll incur the timeout and an error will be
raised!).
|
boolean |
hasElement(org.openqa.selenium.WebElement element,
org.openqa.selenium.By by)
Should be used when the result is supposed to be true (otherwise you'll incur the timeout).
|
boolean |
hasElementWithoutWaiting(org.openqa.selenium.By by) |
boolean |
hasElementWithoutWaiting(org.openqa.selenium.WebElement element,
org.openqa.selenium.By by) |
boolean |
hasElementWithoutWaitingWithoutScrolling(org.openqa.selenium.By by)
Same as
hasElementWithoutWaiting(By) but don't scroll to make the element visible. |
void |
makeAlertDialogSilent() |
void |
makeConfirmDialogSilent(boolean accept)
There is no easy support for alert/confirm window methods yet, see -
http://code.google.com/p/selenium/issues/detail?id=27 -
http://www.google.com/codesearch/p?hl=en#2tHw6m3DZzo/branches
/merge/common/test/java/org/openqa/selenium/AlertsTest.java The aim is :
Alert alert = this.getDriver().switchTo().alert();
alert.accept();
Until then, the following hack does override the confirm method in Javascript to return the given value. |
void |
makeElementVisible(org.openqa.selenium.By locator)
Shows hidden elements, as if they would be shown on hover.
|
void |
makeElementVisible(org.openqa.selenium.WebElement element) |
org.openqa.selenium.WebDriver.Options |
manage() |
org.openqa.selenium.interactions.Actions |
moveToTopLeftCornerOfTargetWithOffset(org.openqa.selenium.WebElement target,
int offsetX,
int offsetY,
org.openqa.selenium.interactions.Actions chainFrom)
Same as
Actions.moveToElement(WebElement, int, int) except that the target is the top-left corner of the
target, instead of the center. |
org.openqa.selenium.WebDriver.Navigation |
navigate() |
void |
quit() |
void |
scrollTo(int xCoord,
int yCoord)
Instantaneously scrolls to the given coordinates inside the web page.
|
org.openqa.selenium.WebElement |
scrollTo(org.openqa.selenium.WebElement element) |
void |
setDriverImplicitWait()
Forces the driver to wait for a
getTimeout() number of seconds when looking up page elements
before declaring that it cannot find them. |
void |
setDriverImplicitWait(int timeout)
Forces the driver to wait for passed number of seconds when looking up page elements before declaring that it
cannot find them.
|
void |
setErrorHandler(org.openqa.selenium.remote.ErrorHandler handler) |
void |
setFileDetector(org.openqa.selenium.remote.FileDetector detector) |
void |
setLogLevel(Level level) |
void |
setTextInputValue(org.openqa.selenium.WebElement textInputElement,
String newTextValue)
Compared to using clear() + sendKeys(), this method ensures that an "input" event is triggered on the JavaScript
side for an empty ("") value.
|
void |
setTimeout(int timeout) |
org.openqa.selenium.WebDriver.TargetLocator |
switchTo() |
String |
toString() |
<T> void |
waitUntilCondition(org.openqa.selenium.support.ui.ExpectedCondition<T> condition) |
<T> void |
waitUntilCondition(org.openqa.selenium.support.ui.ExpectedCondition<T> condition,
int timeout) |
void |
waitUntilElementContainsAttributeValue(org.openqa.selenium.By locator,
String attributeName,
String expectedValue)
Waits until the given element contain a certain value for an attribute.
|
void |
waitUntilElementDisappears(org.openqa.selenium.By locator)
Waits until the given locator corresponds to either a hidden or a deleted element.
|
void |
waitUntilElementDisappears(org.openqa.selenium.WebElement parentElement,
org.openqa.selenium.By locator)
Waits until the given locator corresponds to either a hidden or a deleted element.
|
void |
waitUntilElementEndsWithAttributeValue(org.openqa.selenium.By locator,
String attributeName,
String expectedValue)
Waits until the given element ends with a certain value for an attribute.
|
void |
waitUntilElementHasAttributeValue(org.openqa.selenium.By locator,
String attributeName,
String expectedValue)
Waits until the given element has a certain value for an attribute.
|
void |
waitUntilElementHasNonEmptyAttributeValue(org.openqa.selenium.By locator,
String attributeName)
Waits until the given element has a non-empty value for an attribute.
|
void |
waitUntilElementHasTextContent(org.openqa.selenium.By locator,
String expectedValue)
Waits until the given element has a certain value as its inner text.
|
void |
waitUntilElementIsEnabled(org.openqa.selenium.WebElement element)
Waits until the given element is enabled.
|
void |
waitUntilElementIsVisible(org.openqa.selenium.By locator)
Wait until the element given by the locator is displayed.
|
void |
waitUntilElementIsVisible(org.openqa.selenium.By locator,
int timeout)
Wait until the element given by the locator is displayed.
|
void |
waitUntilElementIsVisible(org.openqa.selenium.WebElement parentElement,
org.openqa.selenium.By locator)
Wait until the element specified by the locator is displayed.
|
void |
waitUntilElementsAreVisible(org.openqa.selenium.By[] locators,
boolean all)
Wait until one or all of an array of element locators are displayed.
|
void |
waitUntilElementsAreVisible(org.openqa.selenium.WebElement parentElement,
org.openqa.selenium.By[] locators,
boolean all)
Wait until one or all of an array of element locators are displayed.
|
void |
waitUntilJavascriptCondition(String booleanExpression,
Object... arguments)
Waits until the provided javascript expression returns
true . |
void |
waitUntilPageIsReloaded()
Waits until the previously added marker is no longer found on the current page, signaling that the page has been
changed or reloaded.
|
public XWikiWebDriver(org.openqa.selenium.remote.RemoteWebDriver wrappedDriver)
public org.openqa.selenium.WebElement findElementWithoutWaiting(org.openqa.selenium.By by)
public org.openqa.selenium.WebElement findElementWithoutWaitingWithoutScrolling(org.openqa.selenium.By by)
findElementWithoutWaiting(By)
but don't scroll to make the element visible. Useful for example
whenverifying that the page has finished loading (and thus there's no element visible and we cannot scroll to
it).public List<org.openqa.selenium.WebElement> findElementsWithoutWaiting(org.openqa.selenium.By by)
public org.openqa.selenium.WebElement findElementWithoutWaiting(org.openqa.selenium.WebElement element, org.openqa.selenium.By by)
public List<org.openqa.selenium.WebElement> findElementsWithoutWaiting(org.openqa.selenium.WebElement element, org.openqa.selenium.By by)
public boolean hasElement(org.openqa.selenium.By by)
public boolean hasElementWithoutWaiting(org.openqa.selenium.By by)
public boolean hasElementWithoutWaitingWithoutScrolling(org.openqa.selenium.By by)
hasElementWithoutWaiting(By)
but don't scroll to make the element visible. Useful for example
whenverifying that the page has finished loading (and thus there's no element visible and we cannot scroll to
it).public boolean hasElementWithoutWaiting(org.openqa.selenium.WebElement element, org.openqa.selenium.By by)
public boolean hasElement(org.openqa.selenium.WebElement element, org.openqa.selenium.By by)
public <T> void waitUntilCondition(org.openqa.selenium.support.ui.ExpectedCondition<T> condition, int timeout)
public <T> void waitUntilCondition(org.openqa.selenium.support.ui.ExpectedCondition<T> condition)
public void setDriverImplicitWait()
getTimeout()
number of seconds when looking up page elements
before declaring that it cannot find them.public void setDriverImplicitWait(int timeout)
public int getTimeout()
public void setTimeout(int timeout)
timeout
- the number of seconds after which we consider the action to have failedpublic void waitUntilElementIsVisible(org.openqa.selenium.By locator)
locator
- the locator for the element to look for.public void waitUntilElementIsVisible(org.openqa.selenium.WebElement parentElement, org.openqa.selenium.By locator)
parentElement
- where to look for the specified element, null
to look everywherelocator
- the locator for the element to look forpublic void waitUntilElementIsVisible(org.openqa.selenium.By locator, int timeout)
Only use this API if you absolutely need a longer timeout than the default, otherwise use
waitUntilElementIsVisible(org.openqa.selenium.By)
.
locator
- the locator for the element to look fortimeout
- the timeout after which to give uppublic void waitUntilElementsAreVisible(org.openqa.selenium.By[] locators, boolean all)
locators
- the array of element locators to look forall
- if true then don't return until all elements are found. Otherwise return after finding onepublic void waitUntilElementsAreVisible(org.openqa.selenium.WebElement parentElement, org.openqa.selenium.By[] locators, boolean all)
parentElement
- where to look for the specified elements, null
to look everywherelocators
- the array of element locators to look forall
- if true then don't return until all elements are found. Otherwise return after finding onepublic void waitUntilElementDisappears(org.openqa.selenium.By locator)
locator
- the locator to wait forpublic void waitUntilElementDisappears(org.openqa.selenium.WebElement parentElement, org.openqa.selenium.By locator)
parentElement
- the element from which to start the searchlocator
- the locator to wait forpublic void makeElementVisible(org.openqa.selenium.By locator)
RuntimeException
if the web driver does not support JavaScript or JavaScript is disabled.locator
- locator used to find the element, in case multiple elements are found, the first is usedpublic void makeElementVisible(org.openqa.selenium.WebElement element)
public void waitUntilElementHasNonEmptyAttributeValue(org.openqa.selenium.By locator, String attributeName)
locator
- the element to wait onattributeName
- the name of the attribute to checkpublic void waitUntilElementIsEnabled(org.openqa.selenium.WebElement element)
element
- the element to wait onpublic void waitUntilElementHasAttributeValue(org.openqa.selenium.By locator, String attributeName, String expectedValue)
locator
- the element to wait onattributeName
- the name of the attribute to checkexpectedValue
- the attribute value to wait forpublic void waitUntilElementEndsWithAttributeValue(org.openqa.selenium.By locator, String attributeName, String expectedValue)
locator
- the element to wait onattributeName
- the name of the attribute to checkexpectedValue
- the attribute value to wait forpublic void waitUntilElementContainsAttributeValue(org.openqa.selenium.By locator, String attributeName, String expectedValue)
locator
- the element to wait on.attributeName
- the name of attribute to check.expectedValue
- the value that should be contained in the attribute.public void waitUntilElementHasTextContent(org.openqa.selenium.By locator, String expectedValue)
locator
- the element to wait onexpectedValue
- the content value to wait forpublic void makeConfirmDialogSilent(boolean accept)
Alert alert = this.getDriver().switchTo().alert();
alert.accept();
Until then, the following hack does override the confirm method in Javascript to return the given value.accept
- true
to accept the confirmation dialog, false
to cancel itpublic void makeAlertDialogSilent()
makeConfirmDialogSilent(boolean)
public void waitUntilJavascriptCondition(String booleanExpression, Object... arguments) throws IllegalArgumentException
true
.
The wait is done while the expression returns false
.
booleanExpression
- the javascript expression to wait for to return true
. The expression must have a
return
statement on the last line, e.g. "return window.jQuery != null"
arguments
- any arguments passed to the javascript expressionIllegalArgumentException
- if the evaluated expression does not return a boolean resultexecuteJavascript(String, Object...)
public void get(String s)
get
in interface org.openqa.selenium.WebDriver
get
in class org.openqa.selenium.remote.RemoteWebDriver
public String getCurrentUrl()
getCurrentUrl
in interface org.openqa.selenium.WebDriver
getCurrentUrl
in class org.openqa.selenium.remote.RemoteWebDriver
public String getTitle()
getTitle
in interface org.openqa.selenium.WebDriver
getTitle
in class org.openqa.selenium.remote.RemoteWebDriver
public List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.By by)
findElements
in interface org.openqa.selenium.SearchContext
findElements
in interface org.openqa.selenium.WebDriver
findElements
in class org.openqa.selenium.remote.RemoteWebDriver
public org.openqa.selenium.WebElement scrollTo(org.openqa.selenium.WebElement element)
public void scrollTo(int xCoord, int yCoord)
WebElement
, see scrollTo(WebElement)
.xCoord
- is the pixel along the horizontal axis of the web page that you want displayed in the upper
leftyCoord
- is the pixel along the vertical axis of the web page that you want displayed in the upper leftscrollTo(WebElement)
public org.openqa.selenium.WebElement findElement(org.openqa.selenium.By by)
findElement
in interface org.openqa.selenium.SearchContext
findElement
in interface org.openqa.selenium.WebDriver
findElement
in class org.openqa.selenium.remote.RemoteWebDriver
public String getPageSource()
getPageSource
in interface org.openqa.selenium.WebDriver
getPageSource
in class org.openqa.selenium.remote.RemoteWebDriver
public void close()
close
in interface org.openqa.selenium.WebDriver
close
in class org.openqa.selenium.remote.RemoteWebDriver
public void quit()
quit
in interface org.openqa.selenium.WebDriver
quit
in class org.openqa.selenium.remote.RemoteWebDriver
public Set<String> getWindowHandles()
getWindowHandles
in interface org.openqa.selenium.WebDriver
getWindowHandles
in class org.openqa.selenium.remote.RemoteWebDriver
public String getWindowHandle()
getWindowHandle
in interface org.openqa.selenium.WebDriver
getWindowHandle
in class org.openqa.selenium.remote.RemoteWebDriver
public org.openqa.selenium.WebDriver.TargetLocator switchTo()
switchTo
in interface org.openqa.selenium.WebDriver
switchTo
in class org.openqa.selenium.remote.RemoteWebDriver
public org.openqa.selenium.WebDriver.Navigation navigate()
navigate
in interface org.openqa.selenium.WebDriver
navigate
in class org.openqa.selenium.remote.RemoteWebDriver
public org.openqa.selenium.WebDriver.Options manage()
manage
in interface org.openqa.selenium.WebDriver
manage
in class org.openqa.selenium.remote.RemoteWebDriver
public void setFileDetector(org.openqa.selenium.remote.FileDetector detector)
setFileDetector
in class org.openqa.selenium.remote.RemoteWebDriver
public org.openqa.selenium.remote.SessionId getSessionId()
getSessionId
in class org.openqa.selenium.remote.RemoteWebDriver
public org.openqa.selenium.remote.ErrorHandler getErrorHandler()
getErrorHandler
in class org.openqa.selenium.remote.RemoteWebDriver
public void setErrorHandler(org.openqa.selenium.remote.ErrorHandler handler)
setErrorHandler
in class org.openqa.selenium.remote.RemoteWebDriver
public org.openqa.selenium.remote.CommandExecutor getCommandExecutor()
getCommandExecutor
in class org.openqa.selenium.remote.RemoteWebDriver
public org.openqa.selenium.Capabilities getCapabilities()
getCapabilities
in interface org.openqa.selenium.HasCapabilities
getCapabilities
in class org.openqa.selenium.remote.RemoteWebDriver
public <X> X getScreenshotAs(org.openqa.selenium.OutputType<X> outputType) throws org.openqa.selenium.WebDriverException
getScreenshotAs
in interface org.openqa.selenium.TakesScreenshot
getScreenshotAs
in class org.openqa.selenium.remote.RemoteWebDriver
org.openqa.selenium.WebDriverException
public org.openqa.selenium.WebElement findElementById(String using)
findElementById
in interface org.openqa.selenium.internal.FindsById
findElementById
in class org.openqa.selenium.remote.RemoteWebDriver
public List<org.openqa.selenium.WebElement> findElementsById(String using)
findElementsById
in interface org.openqa.selenium.internal.FindsById
findElementsById
in class org.openqa.selenium.remote.RemoteWebDriver
public org.openqa.selenium.WebElement findElementByLinkText(String using)
findElementByLinkText
in interface org.openqa.selenium.internal.FindsByLinkText
findElementByLinkText
in class org.openqa.selenium.remote.RemoteWebDriver
public List<org.openqa.selenium.WebElement> findElementsByLinkText(String using)
findElementsByLinkText
in interface org.openqa.selenium.internal.FindsByLinkText
findElementsByLinkText
in class org.openqa.selenium.remote.RemoteWebDriver
public org.openqa.selenium.WebElement findElementByPartialLinkText(String using)
findElementByPartialLinkText
in interface org.openqa.selenium.internal.FindsByLinkText
findElementByPartialLinkText
in class org.openqa.selenium.remote.RemoteWebDriver
public List<org.openqa.selenium.WebElement> findElementsByPartialLinkText(String using)
findElementsByPartialLinkText
in interface org.openqa.selenium.internal.FindsByLinkText
findElementsByPartialLinkText
in class org.openqa.selenium.remote.RemoteWebDriver
public org.openqa.selenium.WebElement findElementByTagName(String using)
findElementByTagName
in interface org.openqa.selenium.internal.FindsByTagName
findElementByTagName
in class org.openqa.selenium.remote.RemoteWebDriver
public List<org.openqa.selenium.WebElement> findElementsByTagName(String using)
findElementsByTagName
in interface org.openqa.selenium.internal.FindsByTagName
findElementsByTagName
in class org.openqa.selenium.remote.RemoteWebDriver
public org.openqa.selenium.WebElement findElementByName(String using)
findElementByName
in interface org.openqa.selenium.internal.FindsByName
findElementByName
in class org.openqa.selenium.remote.RemoteWebDriver
public List<org.openqa.selenium.WebElement> findElementsByName(String using)
findElementsByName
in interface org.openqa.selenium.internal.FindsByName
findElementsByName
in class org.openqa.selenium.remote.RemoteWebDriver
public org.openqa.selenium.WebElement findElementByClassName(String using)
findElementByClassName
in interface org.openqa.selenium.internal.FindsByClassName
findElementByClassName
in class org.openqa.selenium.remote.RemoteWebDriver
public List<org.openqa.selenium.WebElement> findElementsByClassName(String using)
findElementsByClassName
in interface org.openqa.selenium.internal.FindsByClassName
findElementsByClassName
in class org.openqa.selenium.remote.RemoteWebDriver
public org.openqa.selenium.WebElement findElementByCssSelector(String using)
findElementByCssSelector
in interface org.openqa.selenium.internal.FindsByCssSelector
findElementByCssSelector
in class org.openqa.selenium.remote.RemoteWebDriver
public List<org.openqa.selenium.WebElement> findElementsByCssSelector(String using)
findElementsByCssSelector
in interface org.openqa.selenium.internal.FindsByCssSelector
findElementsByCssSelector
in class org.openqa.selenium.remote.RemoteWebDriver
public org.openqa.selenium.WebElement findElementByXPath(String using)
findElementByXPath
in interface org.openqa.selenium.internal.FindsByXPath
findElementByXPath
in class org.openqa.selenium.remote.RemoteWebDriver
public List<org.openqa.selenium.WebElement> findElementsByXPath(String using)
findElementsByXPath
in interface org.openqa.selenium.internal.FindsByXPath
findElementsByXPath
in class org.openqa.selenium.remote.RemoteWebDriver
public Object executeScript(String script, Object... args)
executeScript
in interface org.openqa.selenium.JavascriptExecutor
executeScript
in class org.openqa.selenium.remote.RemoteWebDriver
public Object executeAsyncScript(String script, Object... args)
executeAsyncScript
in interface org.openqa.selenium.JavascriptExecutor
executeAsyncScript
in class org.openqa.selenium.remote.RemoteWebDriver
public void setLogLevel(Level level)
setLogLevel
in class org.openqa.selenium.remote.RemoteWebDriver
public org.openqa.selenium.interactions.Keyboard getKeyboard()
getKeyboard
in interface org.openqa.selenium.interactions.HasInputDevices
getKeyboard
in class org.openqa.selenium.remote.RemoteWebDriver
public org.openqa.selenium.interactions.Mouse getMouse()
getMouse
in interface org.openqa.selenium.interactions.HasInputDevices
getMouse
in class org.openqa.selenium.remote.RemoteWebDriver
public org.openqa.selenium.remote.FileDetector getFileDetector()
getFileDetector
in class org.openqa.selenium.remote.RemoteWebDriver
public String toString()
toString
in class org.openqa.selenium.remote.RemoteWebDriver
public void setTextInputValue(org.openqa.selenium.WebElement textInputElement, String newTextValue)
textInputElement
- an element accepting text inputnewTextValue
- the new text value to setpublic void addPageNotYetReloadedMarker()
To be used mainly before waitUntilPageIsReloaded()
.
public void waitUntilPageIsReloaded()
To be used always after addPageNotYetReloadedMarker()
.
public org.openqa.selenium.WebElement findElementWithoutScrolling(org.openqa.selenium.By by)
findElement(By)
but don't scroll to make the element visible. Useful for example when
verifying that the page has finished loading (and thus there's no element visible and we cannot scroll to it).public org.openqa.selenium.remote.RemoteWebDriver getWrappedDriver()
RemoteWebDriver
created for selenium tests.
The original driver should be used for custom Actions
.public void dragAndDrop(org.openqa.selenium.WebElement source, org.openqa.selenium.WebElement target)
source
- the element to dragtarget
- the element where to droppublic org.openqa.selenium.interactions.Actions createActions()
Actions
.Actions
.public org.openqa.selenium.interactions.Actions moveToTopLeftCornerOfTargetWithOffset(org.openqa.selenium.WebElement target, int offsetX, int offsetY, org.openqa.selenium.interactions.Actions chainFrom)
Actions.moveToElement(WebElement, int, int)
except that the target is the top-left corner of the
target, instead of the center.target
- the element for which we want to reach the offset from the top-left corner.offsetX
- the offset on the right of the top-left corner to move tooffsetY
- the offset on the bottom of the top-left corner to move tochainFrom
- the existing actions to be chain to, or null to create a dedicated chain of actions.Copyright © 2004–2021 XWiki. All rights reserved.