public interface Conductor<Test>
| Modifier and Type | Method and Description |
|---|---|
Test |
check(org.openqa.selenium.By by) |
Test |
check(String css)
Check a checkbox, or radio button
|
Test |
click(org.openqa.selenium.By by) |
Test |
click(String css)
Click an element.
|
Test |
closeWindow()
Closes the current active window.
|
Test |
closeWindow(String regex)
Close an open window.
|
String |
get(String key)
|
String |
get(String key,
String defaultValue)
Get a variable from the data warehouse.
|
String |
getAttribute(org.openqa.selenium.By by,
String attribute) |
String |
getAttribute(String css,
String attribute)
Get an attribute of an element
|
String |
getText(org.openqa.selenium.By by) |
String |
getText(String css)
Get the text of an element.
|
Test |
goBack()
Navigates the browser back one page.
|
Test |
hoverOver(org.openqa.selenium.By by) |
Test |
hoverOver(String css)
Hover over an element.
|
boolean |
isChecked(org.openqa.selenium.By by) |
boolean |
isChecked(String css)
Checks if the element is checked or not.
|
boolean |
isPresent(org.openqa.selenium.By by) |
boolean |
isPresent(String css)
Checks if the element is present or not.
|
Test |
log(Object object)
Log something as information
|
Test |
logDebug(Object object)
Log something as debug
|
Test |
logError(Object object)
Log something as an error
|
Test |
logFatal(Object object)
Log something as fatal
|
Test |
logInfo(Object object)
Log something as information
|
Test |
logWarn(Object object)
Log something as a warning
|
Test |
navigateTo(String url)
Navigates to an absolute or relative Url.
|
Test |
refresh()
Refresh the page
|
Test |
selectOptionByText(org.openqa.selenium.By by,
String text) |
Test |
selectOptionByText(String css,
String text)
Selects an option from a dropdown (<select> tag) based on the text displayed.
|
Test |
selectOptionByValue(org.openqa.selenium.By by,
String value) |
Test |
selectOptionByValue(String css,
String value)
Selects an option from a dropdown (<select> tag) based on the value.
|
Test |
setAndValidateText(org.openqa.selenium.By by,
String text)
Deprecated.
use
setText("selector", "text")
.validateText("selector", "text")
instead |
Test |
setAndValidateText(String css,
String text)
Deprecated.
use
setText("selector", "text")
.validateText("selector", "text")
instead |
Test |
setText(org.openqa.selenium.By by,
String text) |
Test |
setText(String css,
String text)
Clears the text from a text field, and sets it.
|
Test |
store(String key,
String value)
Put a variable in the data warehouse.
|
Test |
switchToDefaultContent()
Switch back to the default content (the first window / frame that you were on before switching)
|
Test |
switchToFrame(int index)
Switches to a frame based on the index it comes.
|
Test |
switchToFrame(String idOrName)
Switches to a frame or iframe.
|
Test |
switchToFrame(org.openqa.selenium.WebElement webElement)
Switches to a frame based on a found WebElement
|
Test |
switchToWindow(String regex)
Switch's to a window that is already in existance.
|
Test |
uncheck(org.openqa.selenium.By by) |
Test |
uncheck(String css)
Uncheck a checkbox, or radio button
|
Test |
validateAttribute(org.openqa.selenium.By by,
String attr,
String regex) |
Test |
validateAttribute(String css,
String attr,
String regex)
Validates an attribute of an element.
Example: <input type="text" id="test" /> .validateAttribute("input#test", "type", "text") // validates that the "type" attribute equals "test"
|
Test |
validateChecked(org.openqa.selenium.By by) |
Test |
validateChecked(String css)
Validate that a checkbox or a radio button is checked.
|
Test |
validateFalse(boolean condition)
Validates that a specific condition is false
|
Test |
validateNotPresent(org.openqa.selenium.By by) |
Test |
validateNotPresent(String css)
Validates that an element is not present.
|
Test |
validatePresent(org.openqa.selenium.By by) |
Test |
validatePresent(String css)
Validates that an element is present.
|
Test |
validateText(org.openqa.selenium.By by,
String text) |
Test |
validateText(String css,
String text)
Validate that the text of an element is correct.
|
Test |
validateTextNot(org.openqa.selenium.By by,
String text) |
Test |
validateTextNot(String css,
String text)
Validate that the text of an element is not matching text.
|
Test |
validateTextNotPresent(String text)
Validate that some text is nowhere on the page.
|
Test |
validateTextPresent(String text)
Validate that text is present somewhere on the page.
|
Test |
validateTrue(boolean condition)
Validates that a specific condition is true
|
Test |
validateUnchecked(org.openqa.selenium.By by) |
Test |
validateUnchecked(String css)
Validate that a checkbox or a radio button is unchecked.
|
Test |
validateUrl(String regex)
Validate the Url
|
Test |
waitForCondition(org.openqa.selenium.support.ui.ExpectedCondition<?> condition,
long timeOutInSeconds,
long sleepInMillis)
Wait for a specific condition before continuing
|
org.openqa.selenium.WebElement |
waitForElement(org.openqa.selenium.By by) |
Test |
waitForWindow(String regex)
Waits for a window to appear, then switches to it.
|
org.openqa.selenium.WebElement waitForElement(org.openqa.selenium.By by)
Test click(String css)
css/by - The element to click.Test click(org.openqa.selenium.By by)
Test setText(String css, String text)
css/by - The element to set the text of.text - The text that the element will have.Test hoverOver(String css)
css/by - The element to hover over.Test hoverOver(org.openqa.selenium.By by)
boolean isChecked(String css)
css/by - The checkboxtrue if the element is checked. and false if it's not.boolean isChecked(org.openqa.selenium.By by)
boolean isPresent(String css)
css/by - The elementtrue if the element is present. and false if it's not.boolean isPresent(org.openqa.selenium.By by)
String getText(String css)
This is a consolidated method that works on input's, as select boxes, and fetches the value rather than the innerHTMl.
css/by - The elementString getText(org.openqa.selenium.By by)
String getAttribute(String css, String attribute)
css/by - The element to get the attribute fromattribute - The attribute to getTest check(String css)
css/by - The element to checkTest check(org.openqa.selenium.By by)
Test uncheck(String css)
css/by - The element to uncheckTest uncheck(org.openqa.selenium.By by)
Test selectOptionByText(String css, String text)
css/by - The elementtext - The text that is displaying.selectOptionByValue(By, String)Test selectOptionByValue(String css, String value)
css/by - The elementvalue - The value attribute of the option.selectOptionByText(By, String)Test waitForWindow(String regex)
regex - Regex enabled. Url of the window, or title.Test switchToWindow(String regex)
regex - Regex enabled. Url of the window, or title.Test closeWindow(String regex)
switchToWindow(String) to switch back context.regex - The title of the window to close (regex enabled). You may specify null to close the active window. If you specify null then the context will switch back to the initial window.Test closeWindow()
Test switchToFrame(String idOrName)
idOrName - The id or name of the frame.Test switchToFrame(int index)
0)index - The index of the frame in which it appearsTest switchToFrame(org.openqa.selenium.WebElement webElement)
webElement - The WebElement object that was found.Test switchToDefaultContent()
Test validatePresent(String css)
css/by - The elementTest validatePresent(org.openqa.selenium.By by)
Test validateNotPresent(String css)
css/by - The elementTest validateNotPresent(org.openqa.selenium.By by)
Test validateText(String css, String text)
css/by - The element to validate the text of.text - The text the element should have.Test validateTextNot(String css, String text)
css/by - The element to validate the text of.text - The text the element should not have.Test validateTextPresent(String text)
text - The text to ensure is on the page.Test validateTextNotPresent(String text)
text - The text to ensure is not on the page.Test validateChecked(String css)
css/by - The elementTest validateChecked(org.openqa.selenium.By by)
Test validateUnchecked(String css)
css/by - The elementTest validateUnchecked(org.openqa.selenium.By by)
Test validateAttribute(String css, String attr, String regex)
<input type="text" id="test" />
.validateAttribute("input#test", "type", "text") // validates that the "type" attribute equals "test"
css/by - The elementattr - The attribute you'd like to validateregex - What the attribute should be. (this method supports regex)Test validateUrl(String regex)
regex - Regular expression to matchTest validateTrue(boolean condition)
condition - The condition that is expected to be trueTest validateFalse(boolean condition)
condition - The condition that is expected to be false@Deprecated Test setAndValidateText(String css, String text)
setText("selector", "text")
.validateText("selector", "text")
insteadcss/by - The element to set and validate the text of.text - The text to set and validate@Deprecated Test setAndValidateText(org.openqa.selenium.By by, String text)
setText("selector", "text")
.validateText("selector", "text")
insteadTest navigateTo(String url)
url - Use cases are:navigateTo("/login") // navigate to a relative url. slash meaning start fresh from the base url.
navigateTo("path") // navigate to a relative url. will simply append "path" to the current url.
navigateTo("http://google.com") // navigates to an absolute url.
Test goBack()
driver.navigate().back()Test refresh()
Test store(String key, String value)
key - The key to put.value - The value to put.String get(String key)
key - The key to fetch.String get(String key, String defaultValue)
key - The key to fetch.defaultValue - The value to return if the variable is not set.Test log(Object object)
object - What to log.Test logInfo(Object object)
object - What to logTest logWarn(Object object)
object - What to logTest logError(Object object)
object - What to logAutomationTest (for fluency)Test logDebug(Object object)
object - What to logTest logFatal(Object object)
object - What to logTest waitForCondition(org.openqa.selenium.support.ui.ExpectedCondition<?> condition, long timeOutInSeconds, long sleepInMillis)
condition - the condition to wait fortimeOutInSeconds - how long to waitsleepInMillis - the delay between waitsCopyright © 2016. All rights reserved.