keywordListing

Keyword Listing

addText(String identifier, String text)

  • Add text into a text field, leaving the current text intact.
  • use: addText|identifier|text where identifier is the id, label name, or name of the text field and text is the string to be entered.

captureText(String leftText, String rightText, String varName)

  • stores all text between leftText and rightText into a variable
  • use: captureText|leftText|rightText|varName. Stored in the variables file, as specified in the your paramters file.

click(String identifier, [Integer Iteration])

  • clicks on an interface element.
  • use: click|identifier where identifier is the id, name or label of an element to be clicked on.
  • Iteration is optional.  This allows you to specify the 2nd, 3rd, etc instance of an object to be clicked on.

clickXPath(String xPath)

  • clicks on an interface element.
  • This is useful when you need to specify an xpath that doesn't seem to be natively handled by the click method.  Click should handle most controls, this exists for those it doesn't
  • use: click|xPath where xPath is the specific xPath to the element being clicked on.

closePopUp()

  • close a pop up window and return to the main window
  • use: closePopUp|

comment(String CommentText)

  • Provide a comment in the script, typically for explanatory purposes
  • use: comment|CommentText

enterText(String identifier, String text)

  • enter text into a text field
  • use: enterText|identifier|text where identifier is an identifier for the text field and text is the string to be entered.

fckEnter(String label, String text)

  • Enter text to the an fckEditor.
  • use: fckEnter|label|text where label is the text of the label preceding the fckEditor and text is the text string to be entered.

loopWhile(String varName)

  • Executes the following block of code x number of times as specified by the value of varName
  • use:
  • loopWhile|varName
  • loop|click|sample button name
  • loop|verifyText|sample text to verify
  • endloop

mceEnter(String label, String text)

  • Enter text to the an mceEditor.
  • use: mceEnter|label|text where label is the text of the label preceding the mceEditor and text is the text string to be entered.

modalClick(String command)

  • clicks on a modal window.  These will typically pop-up from a browser to show security concerns or file handling.  For clicking on anything within the browser, use the click method.
  • use: click|command where command is ok, which confirms the modal window, or anything, which essentially clicks the cancel button.

openUrl(String url)

  • opens the url of the application to test.
  • use: openUrl|url

selectCheckbox(String checkBox)

  • Click within a given checkbox, identified either by the ID or label of the box.
  • Will either select or de-select, depending on the original value.
  • use: selectCheckbox|checkBox

selectList(String selectId, String selectedOption)

  • Select a given value from a drop-down list box, which is specified by id, name or text of the label associated with the list
  • use: selectList|IDofListBox|SelectedOption

selectRadio(String radio)

  • Select a radio button, which is specified by its label, id or name.
  • use: selectRadio|labelOfRadio

selectWindow(Integer index)

  • select a given open window
  • use: selectWindow|windowIndex where windowIndex is the chronological index of the browser window (e.g. base browser would be 0, first pop-up would be 1, second pop-up would be 2, etc.)
  • Note: for pop-up windows, the waitFor|popup is a better choice. This will wait for the page to load and put the focus on the pop-up. When you are done with a pop-up (and it needs to
  • be explicitly closed), use the closePopUp keyword.
  • selectWindow is best used when the user has to navigate between multiple windows.

setVariable(String varName, String value)

  • Sets a variable to a certain value, for use later in the current script, or in a subsequent script.
  • use: setVariable|varName|value. Stored in the variables file, as specified in the your paramters file.

uploadFile(String fileName)

  • Within sakai, this will browse to a file within the files directory and upload it.
  • use: uploadFile|fileName

verifyFile(String identifier, String baselineFileName)

  • Downloads a file from a sakai site and compare its size against a known baseline copy of that file. The baseline copy must reside in the downloadDirectory, specified in the parameters file.
  • The identifier string corresponds to the displayed link or button which will start the download of a file.
  • use: verifyFile|identifier|baselineFileName

verifyText(String text)

  • Scans a page for a text string as specified by text. This is the most widely used verification method within automated tests, as it
  • look for labels, descriptive text, headers. Sprinkle these liberally throughout your script to ensure your page has loaded correctly.
  • use: verifyText|text

verifyTextNotPresent(String text)

  • Scans a page for a text string as specified by text. This is the most widely used verification method within automated tests, as it
  • look for labels, descriptive text, headers.
  • use: verifyText|text

verifyContents(String identifier, String value)

  • Confirms that drop-down listboxes contain a certain value.
  • use: verifyContents|identifier|value

verifyValue(String identifier, String value)

  • Will confirm that a given control, as specified by 'identifier', currently has a given 'value'. Useful for confirming that checkboxes are either
  • checked (true) or un-checked (false), radio buttons are clicked (true), or that drop-down listboxes have the expected selected values.
  • use: verifyValue|identifier|value

wait(Integer timeToWait)

  • Waits a given amount of time before proceeding.  timeToWait is in seconds.
  • use: wait|timeToWait

waitForPopUp(Integer timeout)

  • Wait for pop-up windows to appear. The timeout is the time in seconds you are willing to wait for the window to appear.
  • This command will also put the focus on the pop-up window, so you can interact with controls on the page.