Canoo Webtest WebTest Canoo

Step Index

A

alert
Provides the ability to set expectations in relation to user responses to JavaScript Alert Dialog boxes. Must be nested within the expectDialogs step.
antWrapper
DEPRECATED as native ant tasks are handled transparently. Behaves just like the group step
applyFilters
Applies one or more filters to the current response and treats the result as if it was a new response.

C

clickButton
This step is used to locate a form button and then click it.
clickElement
Clicks an HTML element identified by its id or xpath. If the click triggers the load of a new page, then this page becomes the current one.
clickLink
This step tries to locate a link (like <a href='thisIsAnotherPage.html'>Follow me</a>) and to click on it. The page where this click leads to will be the current one for further actions.
closeWindow
Closes the current top level window. The content of the last previously opened window will become the current response.
config
This is a nested task of webtest and is used to configure the target host system to use for a particular webtest and several other features such as reporting of test results and printing of debug information.
confirm
Provides the ability to set expectations in relation to user responses to JavaScript Confirm Dialog boxes. Must be nested within the expectDialogs step.
contentStripper
Removes all content within well-formed XML/XHTML leaving only tags.
countWebtestResults
This ANT task counts the WebTest results in the provided result file and can produce a build failure when some webtests have failed

D

dataDriven
This is an Ant task that calls its nested element as often as specified by the tableContainer. In each run a new set of properties from the the tableContainer is made available to the nested steps
dragAndDrop
Drags an element to an other one

E

emailDeleteMessage
Deletes a message with a given messageId.
emailMessageContentFilter
Returns the content associated with a message (or message Part) as the current response.
emailMessageStructureFilter
Returns the structure (expressed in XML) associated with a particular message as the current response.
emailSetConfig
Sets Email Configuration information.
emailStoreHeader
Stores the value of a message (or message part) header field into a property.
emailStoreMessageCount
Stores the number of messages (optionally matching provided criteria) into a property.
emailStoreMessageId
Stores the message id (optionally matching specific criteria) of a particular message.
emailStoreMessageType
Stores a string representing the message type, either 'Simple' or 'MultiPart'.
emailStorePartCount
Stores the number of parts found within a message. For old-style (non-MIME) uuencoded messages, this returns the number of uuencoded attachments. For new style MIME messages, it returns the number of MIME parts found.
emailStorePartFilename
Stores the filename of a message part. Fails if the message contains no parts or if the partIndex is invalid or if the part is an inline part with no filename.
enableJavaScript
Provides the ability to activate / deactivate JavaScript support. (Javascript support is enabled by default)
excelFindRow
This step allows you to find a specific row on a sheet. This is useful for using with repeat when you don't know how many rows there will be on a table. It starts from a specified cell and searches down for a row matching the given text in an Excel spreadsheet and saves the resulting row as a property.
excelSelectSheet
Provides the ability to select the current sheet. Any subsequent calls to excel steps will use the selected sheet if not overridden
excelStoreCellValue
Provides the ability to store the value of a cell in a property for later checking. Note that this step tests the actual stored value of the cell, not what is displayed in the spreadsheet. In particular, formulas will not be evaluated.
excelStructureFilter
Extracts the structure of the current XLS document, as a xml file.
excelVerifyCellStyle
This step verifies the style of a specified cell in an Excel spreadsheet. Only those properties set will be checked.
excelVerifyCellSum
This step verifies that a cell represents the sum of a range of cells, either as a formula (=SUM(<range>)) or numeric value.
excelVerifyCellValue
This step verifies the value of a specified cell in an Excel spreadsheet. Note that this step tests the actual stored value of the cell, not what is displayed in the spreadsheet. In particular, formulas will not be evaluated.
expectDialog
Provides the ability to set expectations in relation to user responses to JavaScript Dialog boxes (Alert, Confirm and Prompt dialogs).
expectDialogs
Provides the ability to set expectations in relation to user responses to JavaScript Dialog boxes (Alert, Confirm and Prompt dialogs). Supports nested dialog steps such as alert, confirm and prompt. See also the verifyNoDialogs step.

F

followFrame
Locates a frame by its name (e.g. <FRAME NAME='myFrame' SRC='myPage.jsp'>) and defines it as the "current" response for the next steps.
forceHiddenInputField
Sets the value of a hidden input field. An example usage would be for a hidden input field that would normally be set by some unsupported JavaScript.
forceInputFieldAttribute
Sets (or removes) the attribute value of a selected input field. An example usage would be to enable a disabled input field (perhaps to mimic some unsupported JavaScript).

G

groovy
Executes the provided Groovy script (the binding is the same for all groovy steps within a webtest).
group
This step allows grouping and giving a description to a sequence of nested steps. Any kind of step can be nested.

I

ifStep
Step which allows conditional execution of inner steps.
invoke
This step executes a request to a particular URL.

L

lineSeparatorFilter
Replaces all line.separator combinations within (part of) a response by a LF to support platform independent content processing. For use with steps which take a ContentFilter.

M

matchLinesFilter
Removes or keeps lines which match a regular expression. For use with steps which take a ContentFilter.
mouseOut
Triggers a mouseOut event on the HTML element identified by its id or xpath. If this triggers the load of a new page, then this page becomes the current one.
mouseOver
Triggers a mouseOver event on the HTML element identified by its id or xpath. If this triggers the load of a new page, then this page becomes the current one.

N

normalizeXml
Normalizes XML content.
not
This step encapsulates one or more test steps that are ALL expected to fail. Any kind of step can be nested.

P

pdfDecryptDocument
This step decrypts the current PDF document. It fails if the PDF document is not encrypted or if the password is wrong. After decrypting the PDF document, it will be available in its decrypted state for later PDF test steps.
pdfToBookmarksFilter
Extracts all bookmarks from within the current PDF document.
pdfToFontsFilter
Extracts all font information from within the current PDF document.
pdfToLinksFilter
Extracts all links from within the current PDF document.
pdfToTextFilter
Extracts all text content from within the current PDF document.
pdfVerifyBookmark
This step verifies the existence of a bookmark within a PDF document.
pdfVerifyCheckboxField
This step verifies a checkbox field in a PDF document. According to the PDF specification, fields with the same name must have the same value.
pdfVerifyEncryption
This step verifies whether a PDF document is encrypted and whether the user password and owner password are correct. This step should only be executed before (and not after) decrypting an encrypted PDF document.
pdfVerifyEncryptionPermissions
This step verifies encryption permissions of an encrypted PDF document.
pdfVerifyEncryptionProperty
This step verifies a property of the encrypt dictionary from an encrypted PDF document. The step must either verify the existence of the encrypt dictionary property key or it must verify its value.
pdfVerifyEncryptionStrength
This step verifies the encryption strength of an encrypted PDF document.
pdfVerifyField
This step verifies the existence of a field in a PDF document.
pdfVerifyFieldCount
This step verifies the number of fields in the PDF document.
pdfVerifyFont
This step verifies the existence of a font within the current PDF document.
pdfVerifyInfoProperty
This step verifies a property from the info dictionary of the current PDF document. The step must either verify the existence of the info dictionary property key or it must verify its value.
pdfVerifyLink
This step verifies the existence of a link within a PDF document.
pdfVerifyPageCount
This step verifies the number of fields in the PDF document.
pdfVerifyReadOnlyField
This step verifies the read-only status of a field in the PDF document.
pdfVerifyText
This step verifies the existence of the specified text in the PDF document.
pdfVerifyTextField
Verifies a text field in the PDF document. According to the PDF specification, fields with the same name must have the same value.
pdfVerifyTitle
This step verifies the title of the PDF document.
previousResponse
This step provides the ability to revert to the previously loaded response for further testing of the previous page if testing of the current response is complete.
prompt
Provides the ability to set expectations in relation to user responses to JavaScript Prompt Dialog boxes. Must be nested within the expectDialogs step.

R

repeat
This step encapsulates one or more test steps that shall be repeated a certain number of times. Any kind of step can be nested.
replaceFilter
Replaces part of a response with some constant data. For use with steps which take a ContentFilter.
reportLinks
Spider-like visit of all the pages.
reportSite
This step is used to test a complete site.
retry
This step encapsulates one or more test steps that should pass eventually but may fail initially. Any kind of step can be nested.

S

scriptStep
Provides the ability to use scripting code in your tests.
selectForm
This step can be used to specify a form in the document as the current form. The current form is given precedence when locating the form to use in form-related steps.
selectLinesFilter
Removes or keeps lines starting at a start regular expression until a stop regular expression. For use with steps which take a ContentFilter.
selectWebClient
Selects the WebClient to navigate with, creating it if none exists with this name. Useful when a test sequence requires actions to be performed by different users (e.g. an admin and an normal user). If used with nested steps, the previously selected WebClient is selected again when the execution of the nested tests ends.
selectWindow
Selects the content of a window as the current response. Useful when a test sequence causes many windows to open. Only one from 'name', 'title', or 'index' can be specified.
setCheckbox
Provides the ability to check and uncheck checkboxes in HTML forms.
setFileField
Provides the ability to set an <input type="file" ...> form field.
setInputField
Provides the ability to update text-oriented input fields in HTML forms (supports input fields of type text and password as well as textareas).
setRadioButton
Provides the ability to check radio buttons in HTML forms.
setSelectField
Provides the ability to update select fields in HTML forms.
steps
This is a nested task of webtest and is used to define the sequence of test steps to be executed.
storeCookie
Provides the ability to store an HTTP Cookie value for later checking.
storeDigest
Stores a digest value for the response (or part of the response) into a property. This is useful when you don't care what the value within a response is but you want to ensure that the generated content hasn't changed. If any single character in the response changes, so will the digest. Supports content filters such as lineSeparatorFilter and replaceFilter to allow you to filter out changes that you don't care about and the table locator step if you are interested in content within a table.
storeElementAttribute
Retrieves a particular attribute value of an element. E.g. the style attribute could be retrieved for an HTML element such as <TD style='color:green' ...>
storeHeader
Provides the ability to store an HTTP Header value for later checking
storeInputFieldAttribute
Retrieves the attribute value of a selected input field. Can be used to check whether an input field is enabled.
storeLength
Stores a length value for the response (or part of the response) into a property. This is useful when you don't care about the content within a response but wish to ensure that at least the length hasn't changed from some expected value. Supports content filters such as lineSeparatorFilter and replaceFilter to allow you to filter out content that you are not interested in and the table locator step if you are interested in content within a table.
storeLinkParameter
Extracts the value of the specified parameter in the link and stores it as a property.
storeProperty
Provides the ability to store a given value into a property. It supports both dynamic properties and traditional ant properties.
storeRandom
Provides the ability to store a random number, string or token value for later processing. Useful to avoid setting (and maintaining) large numbers of properties containing test data when specific test values aren't important.
storeRegEx
This step stores the result of a regular expression into a property. By specifying a particular group of the regular expression it is easily to extract only a subset of a given regular expression.
storeResponseCode
Provides the ability to store the HTTP Response Code value for later checking.
storeXPath
This step stores the result of an XPath expression into a property.

T

tagStripper
Removes all tags within well-formed XML/XHTML content.
testInfo
Provides the ability to display 'static' information in report. This step does nothing. It just gets reported as it (with its attributes) in the report.
timedGroup
This step allows nesting of other steps. Any kind of step can be nested. Execution of the group is deemed successful if all the nested steps are executed successfully and the total execution time for the group is less than the time given by the maxSeconds or maxMillis parameters.

V

verifyCheckbox
This step is used to verify the state of a checkbox (checked/unchecked). A particular checkbox can be specified via name and optionally value (or alternatively by fieldIndex).
verifyContent
Compares the current response with an expected file. Supports content filters such as lineSeparatorFilter and replaceFilter and the nested table step.
verifyCookie
Provides the ability to check an HTTP Cookie value.
verifyDocumentURL
This step verifies that the document URL matches the supplied text (potentially using a regular expression).
verifyElement
This step verifies the existence of a particular HTML element (tag) in the result page. It is identified by its HTML element type (e.g. TITLE, HEAD, etc.) and the text value of the NAME attribute.
verifyElementText
This step verifies whether the HTML element specified by htmlId or type and optional name encloses text between its opening and closing tags.
verifyHeader
Verifies that the current response contains the specified HTTP Header.
verifyImages
Verifies that all images referenced in the current response are available. May not correctly detect images referenced in JavaScript or CSS files or images set by JavaScript.
verifyInputField
This step verifies the value of a particular input field. It is typically used to check that input field defaults are correctly set.
verifyLinkedContent
Verify all selected links on a page for existence and, optionally, mime-type.
verifyLinks
This step checks the validity of all links on the current page. Non-HTML pages (CSS, JavaScript, XML files) are not checked for internal links. Non-HTTP links (mail addresses, ftp etc.) are not checked or followed.
verifyNoDialogs
Used in conjunction with the expectDialog and expectDialogs steps when dealing with JavaScript Dialog boxes. This step checks that all user responses expected were in fact "consumed" by JavaScript.
verifyProperty
This step verifies whether the value of a webtest dynamic property or an ant property matches an expected text value. The text value can represent a regular expression. If the text value is omitted, the step simply checks for the presence of the property.
verifyRadioButton
This step is used to verify the state of a radio button (checked/unchecked). A particular radio button can be specified via name and optionally value (or alternatively by fieldIndex).
verifySelectField
This step verifies whether a particular SELECT - Option Selector exists and is marked as selected. The option selector may be chosen by either its value attribute or the text associated with the selector.
verifyText
This step verifies the existence of the specified string somewhere in the response received from server (ie the changes that may have occured since the page has been loaded are not seen by this step). The text could represent an HTML fragment like "<BODY>" or a arbitrary static text in the page ("An application error has occurred!").
verifyTextarea
This step is a "shortcut" for <verifyElementText type="TEXTAREA" ...>.
verifyTitle
This step verifies whether the text enclosed by the HTML title tag (<TITLE> ... </TITLE>) matches some specified text. The specified text can represent a regular expression.
verifyXPath
This step verifies that an XPath expression is true or has a certain value. Useful for XML and HTML pages.

W

webtest
This ANT task provides the ability to specify and execute functional tests for web-based applications. The steps of the test specification to execute are defined as a sequence of nested test steps. Each <webtest> task is executed in its own web session, i.e. two subsequent <webtest> tasks are executed in different sessions. This task was previously named "testSpec". For compatibility reasons, both names will work.

news

Latest build: development
Posted: 19-Jul-2016 17:36

WebTest 3.0 released, featuring upgrades to Java 5, Groovy 1.6, and HtmlUnit 2.4.
The release includes support for maven integration, IDE-integration like for unit tests, capturing of background JavaScript errors, new steps for mouseOver and mouseOut events, better parallel execution of tests and - as usual - lots of handling improvements.
Posted: 5 March 2009

WebTest @ JavaOne
Dierk König presented "Functional testing of web applications: scaling with Java" on Wed May 7, 13:30 at JavaOne 2008 in the Tools and Scripting Languages track.
Posted: 8 May 2008

New WebTest screencast available:
Data Driven WebTest
Posted: 13 November 2007

First WebTest screencast available:
Creating a first Webtest Project

Extend WebTest with Groovy! Groovy in Action is available in every good bookstore.
Groovy in Action
Posted: 29 January 2007