Test elements
You are here: UserManual >> TestElements

Test Tasks and their Configuration

All tasks/elements have the following two properties:

  • a name, which is a short description of what's happening in this element (e.g. a FillForm task could have the name "login", if it fills username and password). This property is optional, you can use it for your convenience, or you can leave it empty.
  • enabled: if this element shall be executed during a test run. You can use this for example to disable the PageChecker which you need only during test design, but not test execution. Disabling elements is easier than deleting elements and then later re-creating them in case you need them again.
  • Task-specific properties are described below, next to the task.

Currently there are the following test elements/tasks:

  • Init : go to the given URL
  • FillForm : put data into a form and submit it.
    • fields: the names of the fields to fill in, comma-separated and with curly braces around them, e.g. {loginUser, loginPass} would fill the fields with the names "loginUser" and "loginPass"
    • contents: the contents of the fields, also comma-separated and with curly braces, e.g. {1234567, password}. Special case: if you want to fill a single field with an empty String, use this: { , }
    • formIndex: the index of the form on the page, in case there's more than one form on the page
    • index of submit button: in case there's more than one submit button on the form. default is 0 (the first one).
  • FollowLink : follow a link
    • linkName: the text between and
  • ClickButton : click on a button
  • PageChecker : prints links, forms and buttons on a page (useful to find out what the next test step shall be)
  • OpenURL : open page in browser
  • RegexpMatcher : check if page contains some specific text
    • pattern: the regular expression to look for. See here for the syntax of java regular expressions. example: to find the text "nxErrorBox" on the page, enter ".*nxErrorBox.*" (the .* means there may be other text before and after the text you're looking for).
    • match: if true, the test is successful if a match is found. If false, the test is successful if NO match is found. This is useful to make sure there's no occurence of nxErrorBox or "Exception" or whatever you don't want to see on a page.