com.unitedinternet.portal.selenium.utils.logging
Class LoggingDefaultSelenium

java.lang.Object
  extended by com.thoughtworks.selenium.DefaultSelenium
      extended by com.unitedinternet.portal.selenium.utils.logging.LoggingDefaultSelenium
All Implemented Interfaces:
com.thoughtworks.selenium.Selenium, LoggingSelenium

public class LoggingDefaultSelenium
extends com.thoughtworks.selenium.DefaultSelenium
implements LoggingSelenium

Adds ability to log comments to DefaultSelenium.

Author:
Robert Zimmermann $Id: LoggingDefaultSelenium.java 111 2008-04-18 15:21:02Z ralf2511 $

Field Summary
 
Fields inherited from class com.thoughtworks.selenium.DefaultSelenium
commandProcessor
 
Constructor Summary
LoggingDefaultSelenium(com.thoughtworks.selenium.CommandProcessor commandProcessor)
          Default Constructor.
 
Method Summary
 void logAssertion(java.lang.String assertionName, java.lang.String assertionMessage, java.lang.String assertionCondition)
          Log an assertion.
 void logAutomaticScreenshot(java.lang.String baseName)
          Take a screen shot and write the location to the log.
 void logComment(java.lang.String comment)
          Extension of Selenium to provide ability to log comments.
 void logResource(java.lang.String file, java.lang.String description)
          Log an resource (binary) file.
 
Methods inherited from class com.thoughtworks.selenium.DefaultSelenium
addLocationStrategy, addSelection, allowNativeXpath, altKeyDown, altKeyUp, answerOnNextPrompt, assignId, attachFile, captureEntirePageScreenshot, captureScreenshot, check, chooseCancelOnNextConfirmation, chooseOkOnNextConfirmation, click, clickAt, close, contextMenu, contextMenuAt, controlKeyDown, controlKeyUp, createCookie, deleteAllVisibleCookies, deleteCookie, doubleClick, doubleClickAt, dragAndDrop, dragAndDropToObject, dragdrop, fireEvent, focus, getAlert, getAllButtons, getAllFields, getAllLinks, getAllWindowIds, getAllWindowNames, getAllWindowTitles, getAttribute, getAttributeFromAllWindows, getBodyText, getConfirmation, getCookie, getCookieByName, getCursorPosition, getElementHeight, getElementIndex, getElementPositionLeft, getElementPositionTop, getElementWidth, getEval, getExpression, getHtmlSource, getLocation, 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, mouseMove, mouseMoveAt, mouseOut, mouseOver, mouseUp, mouseUpAt, open, openWindow, refresh, removeAllSelections, removeSelection, runScript, select, selectFrame, selectWindow, setBrowserLogLevel, setContext, setCursorPosition, setMouseSpeed, setSpeed, setTimeout, shiftKeyDown, shiftKeyUp, shutDownSeleniumServer, start, stop, submit, type, typeKeys, uncheck, waitForCondition, waitForFrameToLoad, waitForPageToLoad, waitForPopUp, windowFocus, windowMaximize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.thoughtworks.selenium.Selenium
addLocationStrategy, addSelection, allowNativeXpath, altKeyDown, altKeyUp, answerOnNextPrompt, assignId, attachFile, captureEntirePageScreenshot, captureScreenshot, check, chooseCancelOnNextConfirmation, chooseOkOnNextConfirmation, click, clickAt, close, contextMenu, contextMenuAt, controlKeyDown, controlKeyUp, createCookie, deleteAllVisibleCookies, deleteCookie, doubleClick, doubleClickAt, dragAndDrop, dragAndDropToObject, dragdrop, fireEvent, focus, getAlert, getAllButtons, getAllFields, getAllLinks, getAllWindowIds, getAllWindowNames, getAllWindowTitles, getAttribute, getAttributeFromAllWindows, getBodyText, getConfirmation, getCookie, getCookieByName, getCursorPosition, getElementHeight, getElementIndex, getElementPositionLeft, getElementPositionTop, getElementWidth, getEval, getExpression, getHtmlSource, getLocation, 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, mouseMove, mouseMoveAt, mouseOut, mouseOver, mouseUp, mouseUpAt, open, openWindow, refresh, removeAllSelections, removeSelection, runScript, select, selectFrame, selectWindow, setBrowserLogLevel, setContext, setCursorPosition, setMouseSpeed, setSpeed, setTimeout, shiftKeyDown, shiftKeyUp, shutDownSeleniumServer, start, stop, submit, type, typeKeys, uncheck, waitForCondition, waitForFrameToLoad, waitForPageToLoad, waitForPopUp, windowFocus, windowMaximize
 

Constructor Detail

LoggingDefaultSelenium

public LoggingDefaultSelenium(com.thoughtworks.selenium.CommandProcessor commandProcessor)
Default Constructor.

Parameters:
commandProcessor - this CommandProcessor will be used to handle the real remote-control communication
Method Detail

logComment

public void logComment(java.lang.String comment)
Extension of Selenium to provide ability to log comments.

Specified by:
logComment in interface LoggingSelenium
Parameters:
comment - the comment to be handled by the used formatter

logAutomaticScreenshot

public void logAutomaticScreenshot(java.lang.String baseName)
Take a screen shot and write the location to the log. Will be used in case of an error (thrown exception).

Specified by:
logAutomaticScreenshot in interface LoggingSelenium
Parameters:
baseName - middle part of the generated filename. can be extended (with e.g. a timestamp) by the used LoggingResultsFormatter.

logAssertion

public void logAssertion(java.lang.String assertionName,
                         java.lang.String assertionMessage,
                         java.lang.String assertionCondition)
Log an assertion. Needed by LoggingAssert class, which wraps junit4 assertions.

Specified by:
logAssertion in interface LoggingSelenium
Parameters:
assertionName - Name of the thrown assertion
assertionMessage - Message of the thrown assertion
assertionCondition - Failed condition which led to this assertion.

logResource

public void logResource(java.lang.String file,
                        java.lang.String description)
Log an resource (binary) file. Normally use in case of error to add screen shot or more informations about test conditions to the log.

Specified by:
logResource in interface LoggingSelenium
Parameters:
file - A text that describes the reource
description - Full path and file to the resource


Copyright © 2009. All Rights Reserved.