This following table describes some basic functions we used to perform various operations in UI tests.
|
Function |
Description |
|---|---|
|
(app’use viewPath1) |
Ensures that a control with the given semantic view path exists in the DOM, and sets it as the active control. |
|
(app’useXPath xPath 2) |
Sets the active control to a WebElement with the given XPath. |
|
(app’click) |
Performs a left click on the active control. |
|
(app’rclick) |
Performs a right click on the active control. |
|
(app’dblclick) |
Performs a double left click on the active control. |
|
(app'hover) |
Performs a mouseover on the active control. |
|
(app'drag path) |
Performs a drag and drop from the active control to the control represented by the given argument. |
|
(app'text) |
Retrieves the text content of the active control. |
|
(app’text text3) |
Writes text to the current active control. |
|
(app’clear) |
Clears the current control of text. |
|
(app'attribute name) |
Returns the value of the named attribute for the HTMLElement representing the active control. |
|
(app’assertText text4) |
Asserts that the text content of the current control is equivalent to the supplied text. |
|
(app’assertNotFound viewPath1) |
Ensures that a control with the given semantic view path does not exist in the DOM. |
|
(app’assertXPathNotFound xPath2) |
Ensures that a control with the given XPath does not exist in the DOM. |
|
(app’login username password) |
Logs into some application with the given username and password credentials. |
|
(app’navigate workspace5) |
Navigates to a visible workspace with the given caption. |
|
(app'scrollIntoView) |
Scrolls the active control into the center of the screen. |
|
(app’quit) |
Closes the browser instance associated with this application's WebDriver. |
|
(app’checked) |
Determines if the given checkbox is checked (returns #t or #f). |
|
(app’addAttachment fileName6 content) |
Adds a text attachment with the given file name and content to the active control. |
|
(app’addPDFAttachment fileName6 content) |
Adds a valid PDF attachment with the given file name and content to the active control. |
|
(app’addPNGAttachment fileName6 content) |
Adds a valid PNG attachment with the given file name and content to the active control. |
|
(app'waitUntil length) |
Wait until lambda function returns true. Useful for waiting on a server invocation before proceeding with test. Length of timeout is measured in milliseconds. Omit length to use default global timeout. |
|
(app'waitUntilStale) |
Wait until chosen view is stale. Useful for clicking action buttons on nested dialogs. |
|
(app'waitForMovement) |
Wait until the active control has stopped moving for 2 consecutive animation frames. |
|
(app'assertValue) |
Assert DOM property on selected view.
|
|
(app'get) |
Getter for DOM properties.
|
|
(app'executeJavascript) |
Advanced API for running JavaScript within a Scheme environment. |
|
(app'takeScreenshot fileName6) |
Takes a screenshot of the current screen. Omit the filename to set the filename to the current time. |
|
(app'back) |
Loads the previous URL in the history. |
|
(app'forward) |
Loads the next URL in the history. |
|
(app'refresh) |
Refreshes the page. |
|
(app'title) |
Returns the title of the current page. |
|
(app'currentURL) |
Returns the URL of the current page. |
|
(app'localize stringID) |
Returns the caption of the defined stringID in the local of the loaded browser. |
|
(app'localize stringID locale) |
Returns the caption of the defined stringID in the specified locale. |
|
(app'clickAssertSwitchNewTab) |
Opens a new tab by clicking on an active control. Switches to the new tab. |
|
(app'switchTab windowID) |
Navigates to another tab using the window ID. |
|
(app'windowID) |
Extracts the unique window ID for the current window. |
|
(app'closeTab closeWindowID targetWindowID) |
Closes a window based on window ID and navigates to another tab using the window ID |
|
(app'now) |
Returns the current time and day. Can be used with uitest.time and uitest.timezone customizations to return specific time and date. |
|
(app'today) |
Returns the current day. Can be used with uitest.time and uitest.timezone customizations to return specific date. |
1: The semantic viewpath of the control.
2: The XPath of control to be set as active.
3: The text that will be parsed and written into the control.
4: The expected text.
5: The caption of the workspace to navigate to.
6: The attached file name that will be added to the active control.