public abstract class SmartClientWebDriver
WebDriver
interface providing SmartClient specific
enhancements. Additionally several extra methods are provided to correspond one to one with classic
Selenium's "Selenese" test language. This, in combination with SeleneseRunner
allows the
running of Selenese test files with WebDriver.Modifier and Type | Method and Description |
---|---|
boolean |
assertEval(java.lang.String javaScript,
java.lang.Boolean value)
Assert condition.
|
SmartClientWebDriver |
click(org.openqa.selenium.By by)
Send a single click to the element specified by the scLocator by
|
SmartClientWebDriver |
clickAndHold(org.openqa.selenium.By by)
Equivalent of our "mouseDown", sent to the element specified by the scLocator by
|
SmartClientWebDriver |
controlKeyDown()
To Support Selenese.
|
SmartClientWebDriver |
controlKeyUp()
To Support Selenese.
|
SmartClientWebDriver |
doubleClick(org.openqa.selenium.By by)
Send a double click to the element specified by the scLocator by
|
SmartClientWebDriver |
dragAndDrop(org.openqa.selenium.By sourceBy,
org.openqa.selenium.By targetBy)
Simulate a drag-and-drop from the source scLocator to the target scLocator
|
SmartClientWebDriver |
dragAndDrop(org.openqa.selenium.By sourceBy,
java.lang.String offset)
Simulate a drag-and-drop from the source scLocator to the offset coordinates
|
SmartClientWebDriver |
dragAndDropBy(org.openqa.selenium.By sourceBy,
int xOffset,
int yOffset)
Simulate a drag-and-drop from the source scLocator to the offset coordinates
|
void |
get(java.lang.String relativeUrl)
Fetch a URL relative to the baseURL
|
SmartClientWebDriver |
keyDown(org.openqa.selenium.By by,
org.openqa.selenium.Keys theKey)
Send a modifer key down event to the element specified by the scLocator by
|
SmartClientWebDriver |
keyDown(org.openqa.selenium.By by,
java.lang.Long charToSend)
Send a modifer key down event to the element specified by the scLocator by
|
SmartClientWebDriver |
keyPress(org.openqa.selenium.By by,
java.lang.Long charToSend)
Similar to
sendKeys to support selenese conversion |
SmartClientWebDriver |
keyPress(org.openqa.selenium.By by,
java.lang.String keysToSend)
Similar to
sendKeys to support selenese conversion |
SmartClientWebDriver |
keyUp(org.openqa.selenium.By by,
org.openqa.selenium.Keys theKey)
Send a modifer key up event to the element specified by the scLocator by
|
SmartClientWebDriver |
keyUp(org.openqa.selenium.By by,
java.lang.Long charToSend)
Send a modifer key up event to the element specified by the scLocator by
|
SmartClientWebDriver |
mouseMove(org.openqa.selenium.By by)
Simulate a mouseOver for the element specified by the scLocator by
|
SmartClientWebDriver |
release(org.openqa.selenium.By by)
Equivalent of our "mouseUp", sent to the element specified by the scLocator by
|
SmartClientWebDriver |
secondClick(org.openqa.selenium.By by)
Send a second click to the element specified by the scLocator by
|
SmartClientWebDriver |
sendKeys(org.openqa.selenium.By by,
java.lang.CharSequence[] keysToSend)
Send a sequence of keys to the element specified by the scLocator by
|
void |
setBaseUrl(java.lang.String baseUrl)
Set the Base URL against which tests will run
|
SmartClientWebDriver |
shiftKeyDown()
To Support Selenese.
|
SmartClientWebDriver |
shiftKeyUp()
To Support Selenese.
|
void |
showConsole()
Show the developer console
|
SmartClientWebDriver |
type(org.openqa.selenium.By by)
Similar to
sendKeys to support selenese conversion
Clears existing content |
SmartClientWebDriver |
type(org.openqa.selenium.By by,
java.lang.Long keysToSend)
Similar to
sendKeys to support selenese conversion
Clears and replaces existing content |
SmartClientWebDriver |
type(org.openqa.selenium.By by,
java.lang.String keysToSend)
Similar to
sendKeys to support selenese conversion
Clears and replaces existing content |
boolean |
verifyText(org.openqa.selenium.By scLocator,
java.lang.String string)
Assert condition.
|
boolean |
verifyValue(org.openqa.selenium.By scLocator,
java.lang.Boolean b)
Assert condition.
|
boolean |
verifyValue(org.openqa.selenium.By scLocator,
java.lang.Long val)
Assert condition.
|
boolean |
verifyValue(org.openqa.selenium.By scLocator,
java.lang.String string)
Assert condition.
|
boolean |
waitForCondition(java.lang.String javascript,
java.lang.Long timeout)
Wait for a javascript condition to be true
|
boolean |
waitForElementClickable(org.openqa.selenium.By by)
Wait until a given element responds positively to the isElementClickable() call.
|
boolean |
waitForElementNotPresent(org.openqa.selenium.By by)
Wait until a given element is no longer present.
|
boolean |
waitForFrameToLoad(java.lang.String frameLocator,
int secondsMax)
Wait until a frame has loaded
|
boolean |
waitForGridDone(org.openqa.selenium.By by)
Wait until a given element responds positively to the isGridDone() call.
|
boolean |
waitForText(org.openqa.selenium.By by,
java.lang.String string)
The same as
waitForText below. |
boolean |
waitForText(java.lang.String string,
org.openqa.selenium.By by)
Wait until a given element has a particular text value.
|
public boolean waitForElementClickable(org.openqa.selenium.By by)
public boolean waitForFrameToLoad(java.lang.String frameLocator, int secondsMax)
public boolean waitForElementNotPresent(org.openqa.selenium.By by)
public boolean waitForText(org.openqa.selenium.By by, java.lang.String string)
waitForText
below. It would appear selenese does it
either way round so we need to implement both!public boolean waitForText(java.lang.String string, org.openqa.selenium.By by)
public boolean waitForGridDone(org.openqa.selenium.By by)
public boolean waitForCondition(java.lang.String javascript, java.lang.Long timeout)
timeout
- currently ignoredpublic void setBaseUrl(java.lang.String baseUrl)
public void get(java.lang.String relativeUrl)
public void showConsole()
public SmartClientWebDriver sendKeys(org.openqa.selenium.By by, java.lang.CharSequence[] keysToSend)
by
- Indicates the element concerned. If null then the previous elementpublic SmartClientWebDriver type(org.openqa.selenium.By by)
sendKeys
to support selenese conversion
Clears existing contentby
- Indicates the element concerned. If null then the previous elementpublic SmartClientWebDriver type(org.openqa.selenium.By by, java.lang.String keysToSend)
sendKeys
to support selenese conversion
Clears and replaces existing contentby
- Indicates the element concerned. If null then the previous elementpublic SmartClientWebDriver type(org.openqa.selenium.By by, java.lang.Long keysToSend)
sendKeys
to support selenese conversion
Clears and replaces existing contentby
- Indicates the element concerned. If null then the previous elementpublic SmartClientWebDriver keyPress(org.openqa.selenium.By by, java.lang.Long charToSend)
sendKeys
to support selenese conversionby
- Indicates the element concerned. If null then the previous elementpublic SmartClientWebDriver keyPress(org.openqa.selenium.By by, java.lang.String keysToSend)
sendKeys
to support selenese conversionby
- Indicates the element concerned. If null then the previous elementpublic SmartClientWebDriver keyDown(org.openqa.selenium.By by, java.lang.Long charToSend)
by
- Indicates the element concerned. If null then the previous elementcharToSend
- Javascript key code for a modifier keypublic SmartClientWebDriver keyUp(org.openqa.selenium.By by, java.lang.Long charToSend)
by
- Indicates the element concerned. If null then the previous elementcharToSend
- Javascript key code for a modifier keypublic SmartClientWebDriver keyDown(org.openqa.selenium.By by, org.openqa.selenium.Keys theKey)
by
- Indicates the element concerned. If null then the previous elementpublic SmartClientWebDriver keyUp(org.openqa.selenium.By by, org.openqa.selenium.Keys theKey)
by
- Indicates the element concerned. If null then the previous elementpublic SmartClientWebDriver shiftKeyDown()
public SmartClientWebDriver shiftKeyUp()
public SmartClientWebDriver controlKeyDown()
public SmartClientWebDriver controlKeyUp()
public SmartClientWebDriver click(org.openqa.selenium.By by)
by
- Indicates the element concerned. If null then the previous elementpublic SmartClientWebDriver secondClick(org.openqa.selenium.By by)
by
- Indicates the element concerned. If null then the previous elementpublic SmartClientWebDriver doubleClick(org.openqa.selenium.By by)
by
- Indicates the element concerned. If null then the previous elementpublic SmartClientWebDriver clickAndHold(org.openqa.selenium.By by)
by
- Indicates the element concerned. If null then the previous elementpublic SmartClientWebDriver release(org.openqa.selenium.By by)
by
- Indicates the element concerned. If null then the previous elementpublic SmartClientWebDriver mouseMove(org.openqa.selenium.By by)
by
- Indicates the element to move topublic SmartClientWebDriver dragAndDrop(org.openqa.selenium.By sourceBy, org.openqa.selenium.By targetBy)
sourceBy
- Indicates the element to drag. If null then the previous elementtargetBy
- The destinationpublic SmartClientWebDriver dragAndDrop(org.openqa.selenium.By sourceBy, java.lang.String offset)
sourceBy
- Indicates the element to drag. If null then the previous elementoffset
- Selenese compatible string arg. Eg: "-70/+0"public SmartClientWebDriver dragAndDropBy(org.openqa.selenium.By sourceBy, int xOffset, int yOffset)
sourceBy
- Indicates the element to drag. If null then the previous elementpublic boolean verifyValue(org.openqa.selenium.By scLocator, java.lang.Boolean b)
public boolean verifyValue(org.openqa.selenium.By scLocator, java.lang.Long val)
public boolean assertEval(java.lang.String javaScript, java.lang.Boolean value)
public boolean verifyValue(org.openqa.selenium.By scLocator, java.lang.String string)
public boolean verifyText(org.openqa.selenium.By scLocator, java.lang.String string)