public class SeleniumPage extends Object implements com.thoughtworks.selenium.Selenium
| Modifier and Type | Class and Description |
|---|---|
static class |
SeleniumPage.NonBlank |
| Modifier and Type | Field and Description |
|---|---|
protected com.thoughtworks.selenium.condition.ConditionRunner |
conditionRunner |
protected com.thoughtworks.selenium.Selenium |
selenium |
| Constructor and Description |
|---|
SeleniumPage(com.thoughtworks.selenium.Selenium selenium,
com.thoughtworks.selenium.condition.ConditionRunner conditionRunner) |
protected final com.thoughtworks.selenium.Selenium selenium
protected final com.thoughtworks.selenium.condition.ConditionRunner conditionRunner
public SeleniumPage(com.thoughtworks.selenium.Selenium selenium,
com.thoughtworks.selenium.condition.ConditionRunner conditionRunner)
public void open(String url)
open in interface com.thoughtworks.selenium.Seleniumpublic void openWindow(String url, String windowID)
openWindow in interface com.thoughtworks.selenium.Seleniumpublic void selectWindow(String windowID)
selectWindow in interface com.thoughtworks.selenium.Seleniumpublic void selectPopUp(String windowID)
selectPopUp in interface com.thoughtworks.selenium.Seleniumpublic void deselectPopUp()
deselectPopUp in interface com.thoughtworks.selenium.Seleniumpublic void selectFrame(String locator)
selectFrame in interface com.thoughtworks.selenium.Seleniumpublic boolean getWhetherThisFrameMatchFrameExpression(String currentFrameString, String target)
getWhetherThisFrameMatchFrameExpression in interface com.thoughtworks.selenium.Seleniumpublic boolean getWhetherThisWindowMatchWindowExpression(String currentWindowString, String target)
getWhetherThisWindowMatchWindowExpression in interface com.thoughtworks.selenium.Seleniumpublic void waitForPopUp(String windowID, String timeout)
waitForPopUp in interface com.thoughtworks.selenium.Seleniumpublic void chooseCancelOnNextConfirmation()
chooseCancelOnNextConfirmation in interface com.thoughtworks.selenium.Seleniumpublic void chooseOkOnNextConfirmation()
chooseOkOnNextConfirmation in interface com.thoughtworks.selenium.Seleniumpublic void answerOnNextPrompt(String answer)
answerOnNextPrompt in interface com.thoughtworks.selenium.Seleniumpublic void goBack()
goBack in interface com.thoughtworks.selenium.Seleniumpublic void refresh()
refresh in interface com.thoughtworks.selenium.Seleniumpublic void close()
close in interface com.thoughtworks.selenium.Seleniumpublic boolean isAlertPresent()
isAlertPresent in interface com.thoughtworks.selenium.Seleniumpublic boolean isPromptPresent()
isPromptPresent in interface com.thoughtworks.selenium.Seleniumpublic boolean isConfirmationPresent()
isConfirmationPresent in interface com.thoughtworks.selenium.Seleniumpublic String getAlert()
getAlert in interface com.thoughtworks.selenium.Seleniumpublic String getConfirmation()
getConfirmation in interface com.thoughtworks.selenium.Seleniumpublic String getPrompt()
getPrompt in interface com.thoughtworks.selenium.Seleniumpublic String getLocation()
getLocation in interface com.thoughtworks.selenium.Seleniumpublic String getTitle()
getTitle in interface com.thoughtworks.selenium.Seleniumpublic String getBodyText()
getBodyText in interface com.thoughtworks.selenium.Seleniumpublic String getValue(String locator)
getValue in interface com.thoughtworks.selenium.Seleniumpublic String getText(String locator)
getText in interface com.thoughtworks.selenium.Seleniumpublic void highlight(String locator)
highlight in interface com.thoughtworks.selenium.Seleniumpublic String getEval(String script)
getEval in interface com.thoughtworks.selenium.Seleniumpublic boolean isChecked(String locator)
isChecked in interface com.thoughtworks.selenium.Seleniumpublic String getTable(String tableCellAddress)
getTable in interface com.thoughtworks.selenium.Seleniumpublic String[] getSelectedLabels(String selectLocator)
getSelectedLabels in interface com.thoughtworks.selenium.Seleniumpublic String getSelectedLabel(String selectLocator)
getSelectedLabel in interface com.thoughtworks.selenium.Seleniumpublic String[] getSelectedValues(String selectLocator)
getSelectedValues in interface com.thoughtworks.selenium.Seleniumpublic String getSelectedValue(String selectLocator)
getSelectedValue in interface com.thoughtworks.selenium.Seleniumpublic String[] getSelectedIndexes(String selectLocator)
getSelectedIndexes in interface com.thoughtworks.selenium.Seleniumpublic String getSelectedIndex(String selectLocator)
getSelectedIndex in interface com.thoughtworks.selenium.Seleniumpublic String[] getSelectedIds(String selectLocator)
getSelectedIds in interface com.thoughtworks.selenium.Seleniumpublic String getSelectedId(String selectLocator)
getSelectedId in interface com.thoughtworks.selenium.Seleniumpublic boolean isSomethingSelected(String selectLocator)
isSomethingSelected in interface com.thoughtworks.selenium.Seleniumpublic String[] getSelectOptions(String selectLocator)
getSelectOptions in interface com.thoughtworks.selenium.Seleniumpublic String getAttribute(String attributeLocator)
getAttribute in interface com.thoughtworks.selenium.Seleniumpublic boolean isTextPresent(String pattern)
isTextPresent in interface com.thoughtworks.selenium.Seleniumpublic boolean isElementPresent(String locator)
isElementPresent in interface com.thoughtworks.selenium.Seleniumpublic boolean isVisible(String locator)
isVisible in interface com.thoughtworks.selenium.Seleniumpublic boolean isEditable(String locator)
isEditable in interface com.thoughtworks.selenium.Seleniumpublic String[] getAllButtons()
getAllButtons in interface com.thoughtworks.selenium.Seleniumpublic String[] getAllLinks()
getAllLinks in interface com.thoughtworks.selenium.Seleniumpublic String[] getAllFields()
getAllFields in interface com.thoughtworks.selenium.Seleniumpublic String[] getAttributeFromAllWindows(String attributeName)
getAttributeFromAllWindows in interface com.thoughtworks.selenium.Seleniumpublic void dragdrop(String locator, String movementsString)
dragdrop in interface com.thoughtworks.selenium.Seleniumpublic void setMouseSpeed(String pixels)
setMouseSpeed in interface com.thoughtworks.selenium.Seleniumpublic Number getMouseSpeed()
getMouseSpeed in interface com.thoughtworks.selenium.Seleniumpublic void dragAndDrop(String locator, String movementsString)
dragAndDrop in interface com.thoughtworks.selenium.Seleniumpublic void dragAndDropToObject(String locatorOfObjectToBeDragged, String locatorOfDragDestinationObject)
dragAndDropToObject in interface com.thoughtworks.selenium.Seleniumpublic void windowFocus()
windowFocus in interface com.thoughtworks.selenium.Seleniumpublic void windowMaximize()
windowMaximize in interface com.thoughtworks.selenium.Seleniumpublic String[] getAllWindowIds()
getAllWindowIds in interface com.thoughtworks.selenium.Seleniumpublic String[] getAllWindowNames()
getAllWindowNames in interface com.thoughtworks.selenium.Seleniumpublic String[] getAllWindowTitles()
getAllWindowTitles in interface com.thoughtworks.selenium.Seleniumpublic String getHtmlSource()
getHtmlSource in interface com.thoughtworks.selenium.Seleniumpublic void setCursorPosition(String locator, String position)
setCursorPosition in interface com.thoughtworks.selenium.Seleniumpublic Number getElementIndex(String locator)
getElementIndex in interface com.thoughtworks.selenium.Seleniumpublic boolean isOrdered(String locator1, String locator2)
isOrdered in interface com.thoughtworks.selenium.Seleniumpublic Number getElementPositionLeft(String locator)
getElementPositionLeft in interface com.thoughtworks.selenium.Seleniumpublic Number getElementPositionTop(String locator)
getElementPositionTop in interface com.thoughtworks.selenium.Seleniumpublic Number getElementWidth(String locator)
getElementWidth in interface com.thoughtworks.selenium.Seleniumpublic Number getElementHeight(String locator)
getElementHeight in interface com.thoughtworks.selenium.Seleniumpublic Number getCursorPosition(String locator)
getCursorPosition in interface com.thoughtworks.selenium.Seleniumpublic String getExpression(String expression)
getExpression in interface com.thoughtworks.selenium.Seleniumpublic Number getXpathCount(String xpath)
getXpathCount in interface com.thoughtworks.selenium.Seleniumpublic Number getCssCount(String css)
getCssCount in interface com.thoughtworks.selenium.Seleniumpublic void assignId(String locator, String identifier)
assignId in interface com.thoughtworks.selenium.Seleniumpublic void allowNativeXpath(String allow)
allowNativeXpath in interface com.thoughtworks.selenium.Seleniumpublic void ignoreAttributesWithoutValue(String ignore)
ignoreAttributesWithoutValue in interface com.thoughtworks.selenium.Seleniumpublic void waitForCondition(String script, String timeout)
waitForCondition in interface com.thoughtworks.selenium.Seleniumpublic void setTimeout(String timeout)
setTimeout in interface com.thoughtworks.selenium.Seleniumpublic void waitForPageToLoad(String timeout)
waitForPageToLoad in interface com.thoughtworks.selenium.Seleniumpublic void waitForFrameToLoad(String frameAddress, String timeout)
waitForFrameToLoad in interface com.thoughtworks.selenium.Seleniumpublic String getCookie()
getCookie in interface com.thoughtworks.selenium.Seleniumpublic String getCookieByName(String name)
getCookieByName in interface com.thoughtworks.selenium.Seleniumpublic boolean isCookiePresent(String name)
isCookiePresent in interface com.thoughtworks.selenium.Seleniumpublic void createCookie(String nameValuePair, String optionsString)
createCookie in interface com.thoughtworks.selenium.Seleniumpublic void deleteCookie(String name, String optionsString)
deleteCookie in interface com.thoughtworks.selenium.Seleniumpublic void deleteAllVisibleCookies()
deleteAllVisibleCookies in interface com.thoughtworks.selenium.Seleniumpublic void setBrowserLogLevel(String logLevel)
setBrowserLogLevel in interface com.thoughtworks.selenium.Seleniumpublic void runScript(String script)
runScript in interface com.thoughtworks.selenium.Seleniumpublic void addLocationStrategy(String strategyName, String functionDefinition)
addLocationStrategy in interface com.thoughtworks.selenium.Seleniumpublic void captureEntirePageScreenshot(String filename, String kwargs)
captureEntirePageScreenshot in interface com.thoughtworks.selenium.Seleniumpublic void rollup(String rollupName, String kwargs)
rollup in interface com.thoughtworks.selenium.Seleniumpublic void addScript(String scriptContent, String scriptTagId)
addScript in interface com.thoughtworks.selenium.Seleniumpublic void removeScript(String scriptTagId)
removeScript in interface com.thoughtworks.selenium.Seleniumpublic void useXpathLibrary(String libraryName)
useXpathLibrary in interface com.thoughtworks.selenium.Seleniumpublic void setContext(String context)
setContext in interface com.thoughtworks.selenium.Seleniumpublic void attachFile(String fieldLocator, String fileLocator)
attachFile in interface com.thoughtworks.selenium.Seleniumpublic void captureScreenshot(String filename)
captureScreenshot in interface com.thoughtworks.selenium.Seleniumpublic String captureScreenshotToString()
captureScreenshotToString in interface com.thoughtworks.selenium.Seleniumpublic String captureNetworkTraffic(String type)
captureNetworkTraffic in interface com.thoughtworks.selenium.Seleniumpublic void addCustomRequestHeader(String key, String value)
addCustomRequestHeader in interface com.thoughtworks.selenium.Seleniumpublic String captureEntirePageScreenshotToString(String kwargs)
captureEntirePageScreenshotToString in interface com.thoughtworks.selenium.Seleniumpublic void shutDownSeleniumServer()
shutDownSeleniumServer in interface com.thoughtworks.selenium.Seleniumpublic String retrieveLastRemoteControlLogs()
retrieveLastRemoteControlLogs in interface com.thoughtworks.selenium.Seleniumpublic void keyDownNative(String keycode)
keyDownNative in interface com.thoughtworks.selenium.Seleniumpublic void keyUpNative(String keycode)
keyUpNative in interface com.thoughtworks.selenium.Seleniumpublic void keyPressNative(String keycode)
keyPressNative in interface com.thoughtworks.selenium.Seleniumpublic void click(String locator)
click in interface com.thoughtworks.selenium.Seleniumpublic void doubleClick(String locator)
doubleClick in interface com.thoughtworks.selenium.Seleniumpublic void contextMenu(String locator)
contextMenu in interface com.thoughtworks.selenium.Seleniumpublic void clickAt(String locator, String coordString)
clickAt in interface com.thoughtworks.selenium.Seleniumpublic void doubleClickAt(String locator, String coordString)
doubleClickAt in interface com.thoughtworks.selenium.Seleniumpublic void contextMenuAt(String locator, String coordString)
contextMenuAt in interface com.thoughtworks.selenium.Seleniumpublic void fireEvent(String locator, String eventName)
fireEvent in interface com.thoughtworks.selenium.Seleniumpublic void focus(String locator)
focus in interface com.thoughtworks.selenium.Seleniumpublic void keyPress(String locator, String keySequence)
keyPress in interface com.thoughtworks.selenium.Seleniumpublic void shiftKeyDown()
shiftKeyDown in interface com.thoughtworks.selenium.Seleniumpublic void shiftKeyUp()
shiftKeyUp in interface com.thoughtworks.selenium.Seleniumpublic void metaKeyDown()
metaKeyDown in interface com.thoughtworks.selenium.Seleniumpublic void metaKeyUp()
metaKeyUp in interface com.thoughtworks.selenium.Seleniumpublic void altKeyDown()
altKeyDown in interface com.thoughtworks.selenium.Seleniumpublic void altKeyUp()
altKeyUp in interface com.thoughtworks.selenium.Seleniumpublic void controlKeyDown()
controlKeyDown in interface com.thoughtworks.selenium.Seleniumpublic void controlKeyUp()
controlKeyUp in interface com.thoughtworks.selenium.Seleniumpublic void keyDown(String locator, String keySequence)
keyDown in interface com.thoughtworks.selenium.Seleniumpublic void keyUp(String locator, String keySequence)
keyUp in interface com.thoughtworks.selenium.Seleniumpublic void mouseOver(String locator)
mouseOver in interface com.thoughtworks.selenium.Seleniumpublic void mouseOut(String locator)
mouseOut in interface com.thoughtworks.selenium.Seleniumpublic void mouseDown(String locator)
mouseDown in interface com.thoughtworks.selenium.Seleniumpublic void mouseDownRight(String locator)
mouseDownRight in interface com.thoughtworks.selenium.Seleniumpublic void mouseDownAt(String locator, String coordString)
mouseDownAt in interface com.thoughtworks.selenium.Seleniumpublic void mouseDownRightAt(String locator, String coordString)
mouseDownRightAt in interface com.thoughtworks.selenium.Seleniumpublic void mouseUp(String locator)
mouseUp in interface com.thoughtworks.selenium.Seleniumpublic void mouseUpRight(String locator)
mouseUpRight in interface com.thoughtworks.selenium.Seleniumpublic void mouseUpAt(String locator, String coordString)
mouseUpAt in interface com.thoughtworks.selenium.Seleniumpublic void mouseUpRightAt(String locator, String coordString)
mouseUpRightAt in interface com.thoughtworks.selenium.Seleniumpublic void mouseMove(String locator)
mouseMove in interface com.thoughtworks.selenium.Seleniumpublic void mouseMoveAt(String locator, String coordString)
mouseMoveAt in interface com.thoughtworks.selenium.Seleniumpublic void clickButton(String name)
public void clickLink(String name)
public void select(String locator, String option)
select in interface com.thoughtworks.selenium.Seleniumpublic void addSelection(String locator, String optionLocator)
addSelection in interface com.thoughtworks.selenium.Seleniumpublic void removeSelection(String locator, String optionLocator)
removeSelection in interface com.thoughtworks.selenium.Seleniumpublic void removeAllSelections(String locator)
removeAllSelections in interface com.thoughtworks.selenium.Seleniumpublic void submit(String formLocator)
submit in interface com.thoughtworks.selenium.Seleniumpublic void open(String url, String ignoreResponseCode)
open in interface com.thoughtworks.selenium.Seleniumpublic void type(String locator, String value)
type in interface com.thoughtworks.selenium.Seleniumpublic void typeKeys(String locator, String value)
typeKeys in interface com.thoughtworks.selenium.Seleniumpublic void setSpeed(String value)
setSpeed in interface com.thoughtworks.selenium.Seleniumpublic String getSpeed()
getSpeed in interface com.thoughtworks.selenium.Seleniumpublic String getLog()
getLog in interface com.thoughtworks.selenium.Seleniumpublic void check(String locator)
check in interface com.thoughtworks.selenium.Seleniumpublic void uncheck(String locator)
uncheck in interface com.thoughtworks.selenium.Seleniumpublic void textIsVisible(String text)
public void textIsNotVisible(String text)
public void waitFor(com.thoughtworks.selenium.condition.Condition condition)
public void waitForPageToLoad()
public void waitForPageToLoad(int seconds)
public static void waitFor(int seconds)
public void setExtensionJs(String extensionJs)
setExtensionJs in interface com.thoughtworks.selenium.Seleniumpublic void start()
start in interface com.thoughtworks.selenium.Seleniumpublic void start(String optionsString)
start in interface com.thoughtworks.selenium.Seleniumpublic void start(Object optionsObject)
start in interface com.thoughtworks.selenium.Seleniumpublic void stop()
stop in interface com.thoughtworks.selenium.Seleniumpublic void showContextualBanner()
showContextualBanner in interface com.thoughtworks.selenium.SeleniumCopyright © 2013. All Rights Reserved.