|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.thoughtworks.selenium.DefaultSelenium
com.thoughtworks.selenium.webdriven.WebDriverBackedSelenium
org.unitils.selenium.ScreenshotTakingWebDriver
public class ScreenshotTakingWebDriver
Decorator for the WebDriverBackedSelenium class to handle screenshots.
| Field Summary |
|---|
| Fields inherited from class com.thoughtworks.selenium.DefaultSelenium |
|---|
commandProcessor |
| Constructor Summary | |
|---|---|
ScreenshotTakingWebDriver(com.google.common.base.Supplier<org.openqa.selenium.WebDriver> maker,
java.lang.String baseUrl)
Constructor. |
|
ScreenshotTakingWebDriver(org.openqa.selenium.WebDriver baseDriver,
java.lang.String baseUrl)
Constructor. |
|
| Method Summary | |
|---|---|
void |
clickWithScreenshot(java.lang.String locator)
Create a screenshot when a specified WebElement is clicked. |
void |
clickWithScreenshotAt(java.lang.String locator,
java.lang.String coordString)
Create a screenshot when a specified WebElement is clicked. |
void |
saveScreenshot()
Save a screenshot with a default name in the default folder. |
void |
saveScreenshot(java.io.File screenshotDir,
java.lang.String fileName)
Store a screenshot with a specified name in a specified folder. |
void |
saveScreenshot(java.lang.String fileName)
Save a screenshot with a specified name in the default folder. |
void |
waitForFrameToLoad(java.lang.String frameAddress,
java.lang.String timeout)
|
void |
waitForPageToLoad(java.lang.String timeout)
|
| Methods inherited from class com.thoughtworks.selenium.webdriven.WebDriverBackedSelenium |
|---|
getCapabilities, getWrappedDriver |
| Methods inherited from class com.thoughtworks.selenium.DefaultSelenium |
|---|
addCustomRequestHeader, addLocationStrategy, addScript, addSelection, allowNativeXpath, altKeyDown, altKeyUp, answerOnNextPrompt, assignId, attachFile, captureEntirePageScreenshot, captureEntirePageScreenshotToString, captureNetworkTraffic, captureScreenshot, captureScreenshotToString, check, chooseCancelOnNextConfirmation, chooseOkOnNextConfirmation, click, clickAt, close, contextMenu, contextMenuAt, controlKeyDown, controlKeyUp, createCookie, deleteAllVisibleCookies, deleteCookie, deselectPopUp, doubleClick, doubleClickAt, dragAndDrop, dragAndDropToObject, dragdrop, fireEvent, focus, getAlert, getAllButtons, getAllFields, getAllLinks, getAllWindowIds, getAllWindowNames, getAllWindowTitles, getAttribute, getAttributeFromAllWindows, getBodyText, getConfirmation, getCookie, getCookieByName, getCssCount, getCursorPosition, getElementHeight, getElementIndex, getElementPositionLeft, getElementPositionTop, getElementWidth, getEval, getExpression, getHtmlSource, getLocation, getLog, getMouseSpeed, getPrompt, getSelectedId, getSelectedIds, getSelectedIndex, getSelectedIndexes, getSelectedLabel, getSelectedLabels, getSelectedValue, getSelectedValues, getSelectOptions, getSpeed, getTable, getText, getTitle, getValue, getWhetherThisFrameMatchFrameExpression, getWhetherThisWindowMatchWindowExpression, getXpathCount, goBack, highlight, ignoreAttributesWithoutValue, isAlertPresent, isChecked, isConfirmationPresent, isCookiePresent, isEditable, isElementPresent, isOrdered, isPromptPresent, isSomethingSelected, isTextPresent, isVisible, keyDown, keyDownNative, keyPress, keyPressNative, keyUp, keyUpNative, metaKeyDown, metaKeyUp, mouseDown, mouseDownAt, mouseDownRight, mouseDownRightAt, mouseMove, mouseMoveAt, mouseOut, mouseOver, mouseUp, mouseUpAt, mouseUpRight, mouseUpRightAt, open, open, openWindow, refresh, removeAllSelections, removeScript, removeSelection, retrieveLastRemoteControlLogs, rollup, runScript, select, selectFrame, selectPopUp, selectWindow, setBrowserLogLevel, setContext, setCursorPosition, setExtensionJs, setMouseSpeed, setSpeed, setTimeout, shiftKeyDown, shiftKeyUp, showContextualBanner, showContextualBanner, shutDownSeleniumServer, start, start, start, stop, submit, type, typeKeys, uncheck, useXpathLibrary, waitForCondition, waitForPopUp, windowFocus, windowMaximize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ScreenshotTakingWebDriver(com.google.common.base.Supplier<org.openqa.selenium.WebDriver> maker,
java.lang.String baseUrl)
maker - : should be of type Supplier.baseUrl - : this is the url where the webdriver should start with.
public ScreenshotTakingWebDriver(org.openqa.selenium.WebDriver baseDriver,
java.lang.String baseUrl)
baseDriver - : should be of type WebDriver.baseUrl - : this is the url where the webdriver should start with.| Method Detail |
|---|
public void saveScreenshot()
public void saveScreenshot(java.lang.String fileName)
fileName - of the screenshot
public void saveScreenshot(java.io.File screenshotDir,
java.lang.String fileName)
screenshotDir - : the directory where the screenshots should be saved.fileName - : the name of the new screenshot.public void clickWithScreenshot(java.lang.String locator)
WebElement is clicked.
locator - (f.e. a button).
public void clickWithScreenshotAt(java.lang.String locator,
java.lang.String coordString)
WebElement is clicked.
locator - (f.e. a button).coordString - : the coördinations of that webelement.public void waitForPageToLoad(java.lang.String timeout)
waitForPageToLoad in interface com.thoughtworks.selenium.SeleniumwaitForPageToLoad in class com.thoughtworks.selenium.DefaultSelenium
public void waitForFrameToLoad(java.lang.String frameAddress,
java.lang.String timeout)
waitForFrameToLoad in interface com.thoughtworks.selenium.SeleniumwaitForFrameToLoad in class com.thoughtworks.selenium.DefaultSelenium
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||