Skip to content

User Interface "Manipulation" Commands

This category of commands allow the automaton to interact with (or manipulate or change values/state of) the user interface (UI) elements within your application under test.

Representative examples of such interactions include (but not limited to):
  • entering values
  • editing values
  • clearing or deleting values
  • submitting forms by clicking on buttons
  • pressing keys up or down
  • mouse up or down
  • clicking, double clicking on specific elements
  • scrolling (up or down, left or right)
  • storing values into variables
  • executing JavaScript code from within your test, and many more...
The table(s) below lists the commands in the ascending alphabetic order within each category along with a brief description of the purpose of the command. By clicking on the hyperlinked command name in the table(s) below, you can review more detailed information about a specific command that includes the syntax for you to follow when using the commands.

You can visit Commands for Native/Hybrid Mobile User Interface, to find the powerful command set that Worksoft SaaS has, to automate your Native/Hybrid Mobile Apps.  
Command Purpose
addLocationStrategy Defines a new function to locate elements on the page. For example, if you define the strategy "foo", and someone runs click("foo=blah"), we'll run your function, passing you the string "blah", and click on the element that your function returns, or throw an "Element not found" error if your function returns null. We'll pass three arguments to your function:
locator: the string the user passed in

inWindow: the currently selected window

inDocument: the currently selected document
addScriptAndWait This command loads script content into a new script tag. This differs from the runScript command in that runScript adds the script tag to the document of the AUT. The following entities in the script content are replaced by the characters they represent: < > & The corresponding remove command is removeScript.
addSelection This command adds a selection to the set of selected options in a multi-select element using an option locator. 
altKeyUpAndWait This command is used to release the alt key.
answerOnNextPrompt Instructs to return the specified answer string in response to the next JavaScript prompt [window.prompt()].
assignId This command temporarily sets the "id" attribute of the specified element, so you can locate it in the future using its ID rather than a slow/complicated XPath. This ID will disappear once the page is reloaded.
assignIdAndWait This command temporarily sets the "id" attribute of the specified element, so you can locate it in the future using its ID rather than a slow/complicated XPath. This ID will disappear once the page is reloaded.
check This command is used to check the toggle-button(checkbox/radio)
checkAndWait This command is used to check the toggle-button(checkbox/radio)
chooseCancelOnNextConfirmation This command,by default, QaSCRIBE's overridden window.confirm() function will return true, as if the user had manually clicked OK; after running this command, the next call to confirm() will return false, as if the user had clicked Cancel. QaSCRIBE will then resume using the default behavior for future confirmations, automatically returning true (OK) unless/until you explicitly call this command for each confirmation.
chooseOkOnNextConfirmation This command, undo the effect of calling chooseCancelOnNextConfirmation.QaSCRIBE's overridden window.confirm() function will normally automatically return true, as if the user had manually clicked OK, so you shouldn't need to use this command unless for some reason you need to change your mind prior to the next confirmation. After any confirmation, QaSCRIBE will resume using the default behavior for future confirmations, automatically returning true (OK) unless/until you explicitly call chooseCancelOnNextConfirmation for each confirmation.
clear This command is used to clear the input field.
clearAndWait This command is used to clear the input field.
click This command is used to click on a link, button, checkbox or radio button. If the click action causes a new page to load (like a link usually does), call waitForPageToLoad.
clickAndWait This command is used to click on a link, button, checkbox or radio button. If the click action causes a new page to load (like a link usually does), call waitForPageToLoad.
clickAt Clicks on a link, button, checkbox or radio button. If the click action causes a new page to load (like a link usually does), call waitForPageToLoad.
clickAtAndWait This command is used to click on a link, button, checkbox or radio button. If the click action causes a new page to load (like a link usually does), call waitForPageToLoad.
close Simulates the user clicking the "close" button in the titlebar of a popup window or tab.
contextMenu It Simulates opening the context menu for the specified element (as might happen if the user "right-clicked" on the element).
contextMenuAt It simulates opening the context menu for the specified element (as might happen if the user "right-clicked" on the element).
controlKeyDown This command is used to press the control key and hold it down until doControlUp() is called or a new page is loaded.
controlKeyUp This command is used to release the control key. It is used after controlKeyDown command to release the control key.
createCookie This command creates a new cookie whose path and domain are same with those of current page under test, unless you specified a path for this cookie explicitly.
deleteAllVisibleCookies This command calls deleteCookie with recurse=true on all cookies visible to the current page, recurse=true can be much slower than simply deleting the cookies using a known domain/path.
deleteAllVisibleCookiesAndWait This command calls deleteCookie with recurse=true on all cookies visible to the current page, recurse=true can be much slower than simply deleting the cookies using a known domain/path. It is similar to deleteAllVisibleCookies command and additionally waits till all the cookies are deleted.
deleteCookie Delete a named cookie with specified path and domain. Be careful; to delete a cookie, you need to delete it using the exact same path and domain that were used to create the cookie. If the path is wrong, or the domain is wrong, the cookie simply won't be deleted. Also note that specifying a domain that isn't a subset of the current domain will usually fail. Since there's no way to discover at runtime the original path and domain of a given cookie, we've added an option called 'recurse' to try all sub-domains of the current domain with all paths that are a subset of the current path. Beware; this option can be slow. In big-O notation, it operates in O(n*m) time, where n is the number of dots in the domain name and m is the number of slashes in the path.
deleteCookieAndWait Delete a named cookie with specified path and domain. Be careful; to delete a cookie, you need to delete it using the exact same path and domain that were used to create the cookie. If the path is wrong, or the domain is wrong, the cookie simply won't be deleted. Also note that specifying a domain that isn't a subset of the current domain will usually fail. Since there's no way to discover at runtime the original path and domain of a given cookie, we've added an option called 'recurse' to try all sub-domains of the current domain with all paths that are a subset of the current path. Beware; this option can be slow. In big-O notation, it operates in O(n*m) time, where n is the number of dots in the domain name and m is the number of slashes in the path. It will wait untill the specified cookie is deleted.
deselectPopUp This command is used to move the focus out of the popup selected earlier, selects the main window. Functionally equivalent to using selectWindow() and specifying no value for windowID.
doubleClick TDouble clicks on a link, button, checkbox or radio button. If the double click action causes a new page to load (like a link usually does), call waitForPageToLoad.
doubleClickAndWait To double click on a link, button, checkbox or radio button. If the double click action causes a new page to load (like a link usually does), call waitForPageToLoad.
doubleClickAt Doubleclicks on a link, button, checkbox or radio button. If the action causes a new page to load (like a link usually does), call waitForPageToLoad.
doubleClickType Can also be used to set the value of combo boxes, check boxes, etc. In these cases, value should be the value of the option selected, not the visible text.
dragAndDrop Drags an element a certain distance and then drops it.
dragAndDropAndWait To drag an element to a certain distance and then drop it
dragAndDropToObject Drags an element and drops it on another element.
dragAndDropToObjectAndWait To drags an element and drop it on another element
fireEvent Opens an URL in the test frame. This accepts both relative and absolute URLs. The open command waits for the page to load before proceeding, ie. the AndWait suffix is implicit. Note: The URL must be on the same domain as the runner HTML due to security restrictions in the browser (Same Origin Policy). If you need to open an URL on another domain, use the Selenium Server to start a new browser session on that domain.
focus To move the focus to the specified element; for example, if the element is an input field, move the cursor to that field.
focusAndWait To move the focus to the specified element; for example, if the element is an input field, move the cursor to that field.
ignoreAttributesWithoutValueAndWait To Specify whether QaSCRIBE will ignore xpath attributes that have no value, i.e. are the empty string, when using the non-native xpath evaluation engine. You'd want to do this for performance reasons in IE. However, this could break certain xpaths, for example an xpath that looks for an attribute whose value is NOT the empty string. The hope is that such xpaths are relatively rare, but the user should have the option of using them. Note that this only influences xpath evaluation when using the ajaxslt engine (i.e. not "javascript-xpath").
keyDown To Simulate a user pressing a key (without releasing it yet).
keyPress To Simulate a user pressing and releasing a key.
keyUp To Simulate a user releasing a key.
mouseDown This command is used to simulate a user pressing the left mouse button (without releasing it yet) on the specified element.
mouseDownAt This command is used to simulates a user pressing the left mouse button (without releasing it yet) at the specified location.
mouseDownRight This command is used to simulates a user pressing the right mouse button (without releasing it yet) on the specified element.
mouseDownRightAndWait This command is used to simulates a user pressing the right mouse button (without releasing it yet) on the specified element. This command generated from mouseDownRight(locator)
mouseDownRightAt This command is used to simulates a user pressing the right mouse button (without releasing it yet) at the specified location.
mouseMove This command is used to simulates a user pressing the mouse button (without releasing it yet) on the specified element.
mouseMoveAndWait This command is used to simulates a user pressing the mouse button (without releasing it yet) on the specified element.This command generated from mouseMove(locator).
mouseMoveAt This command is used to simulates a user pressing the mouse button (without releasing it yet) on the specified element.
mouseOut This command is used to simulates a user moving the mouse pointer away from the specified element.
mouseOver This command is used to simulates a user hovering a mouse over the specified element.
mouseOverAndWait This command is used to simulates a user hovering a mouse over the specified element.This command generated from mouseOver(locator).
mouseUp This command is used to simulates the event that occurs when the user releases the mouse button (i.e., stops holding the button down) on the specified element.
mouseUpRight This command is used to simulates the event that occurs when the user releases the right mouse button (i.e., stops holding the button down) on the specified element.
mouseUpRightAtAndWait This command is used to simulates the event that occurs when the user releases the right mouse button (i.e., stops holding the button down) at the specified location.This command Generated from mouseUpRightAt(locator, coordString).
removeAllSelections This command Unselects all of the selected options in a multi-select element.
removeSelection This command remove a selection from the set of selected options in a multi-select element using an option locator.
resetSession This command quits the existing session and create a new session in CE Service.
runScript This command creates a new "script" tag in the body of the current test window, and adds the specified text into the body of the command. Scripts run in this way can often be debugged more easily than scripts executed using QaSCRIBE's "getEval" command. Beware that JS exceptions thrown in these script tags aren't managed by QaSCRIBE, so you should probably wrap your script in try/catch blocks if there is any chance that the script will throw an exception.
runScriptAndWait This command creates a new "script" tag in the body of the current test window, and adds the specified text into the body of the command. Scripts run in this way can often be debugged more easily than scripts executed using QaSCRIBE's "getEval" command. Beware that JS exceptions thrown in these script tags aren't managed by QaSCRIBE, so you should probably wrap your script in try/catch blocks if there is any chance that the script will throw an exception.
scrollToView This command is used to get required locator into view port.
scrollToViewAndWait This command is used to get required locator into view port.
select

Select an option from a drop-down using an option locator.

Option locators provide different ways of specifying options of an HTML Select element (e.g. for selecting a specific option, or for asserting that the selected option satisfies a specification). There are several forms of Select Option Locator.

   * label=labelPattern: matches options based on their labels, i.e. the visible text. (This is the default.)
   * label=regexp:^[Oo]ther
    value=valuePattern: matches options based on their values.
        value=other
   * id=id: matches options based on their ids.
        id=option1
   * index=index: matches an option based on its index (offset from zero).
        index=2

If no option locator prefix is provided, the default behaviour is to match on label. 

selectAndWait

Select an option from a drop-down using an option locator.

Option locators provide different ways of specifying options of an HTML Select element (e.g. for selecting a specific option, or for asserting that the selected option satisfies a specification). There are several forms of Select Option Locator.

   * label=labelPattern: matches options based on their labels, i.e. the visible text. (This is the default.)
   * label=regexp:^[Oo]ther
    value=valuePattern: matches options based on their values.
        value=other
   * id=id: matches options based on their ids.
        id=option1
   * index=index: matches an option based on its index (offset from zero).
        index=2

If no option locator prefix is provided, the default behaviour is to match on label. 

selectPopUp Simplifies the process of selecting a popup window (and does not offer functionality beyond what selectWindow() already provides).
  • If windowID is either not specified, or specified as "null", the first non-top window is selected. The top window is the one that would be selected by selectWindow() without providing a windowID . This should not be used when more than one popup window is in play.
  • Otherwise, the window will be looked up considering windowID as the following in order: 1) the "name" of the window, as specified to window.open(); 2) a javascript variable which is a reference to a window; and 3) the title of the window. This is the same ordered lookup performed by selectWindow
  • sendKeys Simulates keystroke events on the specified element, as though you typed the value key-by-key. This simulates a real user typing every character in the specified string; it is also bound by the limitations of a real user, like not being able to type into a invisible or read only elements. This is useful for dynamic UI widgets (like auto-completing combo boxes) that require explicit key events. Unlike the simple type command, which forces the specified value into the page directly, this command will not replace the existing content. If you want to replace the existing contents, you need to use the simple type command to set the value of the field to empty string to clear the field and then the sendKeys command to send the keystroke for what you want to type. This command is experimental. It may replace the typeKeys command in the future. For those who are interested in the details, unlike the typeKeys command, which tries to fire the keyDown, the keyUp and the keyPress events, this command is backed by the atoms from Selenium 2 and provides a much more robust implementation that will be maintained in the future.
    sendKeysEnter This command is used to get required locator into view port.
    sendKeysTabOut Simulates keystroke events on the specified element, as though you typed the value key-by-key.

    This simulates a real user typing every character in the specified string and simulating TAB key; it is also bound by the limitations of a real user, like not being able to type into a invisible or read only elements. This is useful for dynamic UI widgets (like auto-completing combo boxes) that require explicit key events.

    Unlike the simple "type" command, which forces the specified value into the page directly, this command will not replace the existing content. If you want to replace the existing contents, you need to use the simple "type" command to set the value of the field to empty string to clear the field and then the "sendKeysAndFocus" command to send the keystroke for what you want to type.

    This command is experimental. It may replace the typeKeys command in the future.

    For those who are interested in the details, unlike the typeKeys command, which tries to fire the keyDown, the keyUp and the keyPress events, this command is backed by the atoms from QaSCRIBE 2 and provides a much more robust implementation that will be maintained in the future.

    setBrowserLogLevel Sets the threshold for browser-side logging messages; log messages beneath this threshold will be discarded. Valid logLevel strings are: "debug", "info", "warn", "error" or "off". To see the browser logs, you need to either show the log window in GUI mode, or enable browser-side logging in QaSCRIBE RC.
    setBrowserLogLevelAndWait Sets the threshold for browser-side logging messages; log messages beneath this threshold will be discarded. Valid logLevel strings are: "debug", "info", "warn", "error" or "off". To see the browser logs, you need to either show the log window in GUI mode, or enable browser-side logging in QaSCRIBE RC.
    setCursorPosition Moves the text cursor to the specified position in the given input element or textarea. This method will fail if the specified element isn't an input element or textarea.
    setSpeed Set execution speed (i.e., set the millisecond length of a delay which will follow each QaSCRIBE operation). By default, there is no such delay, i.e., the delay is 0 milliseconds.
    setUserVariable This command can be used to dynamically change or set the value of a user-defined variable that has type 'Dynamic'. Manually editable data file cannot be updated by this command run-time.The value passed in 'Value' field of the Command will be stored in the user-defined variable mentioned in the 'Target' field of the Command for the 'Environment' that is contained in the Testing Context.
    shiftKeyDown Press the shift key and hold it down until doShiftUp() is called or a new page is loaded.
    shiftKeyUp TRelease the shift key.
    store This command loads the value in variable and is a synonym for storeExpression.
    storeAlert The command will read the alert text and store it in specified variable.
    storeAlertPresent This command will check and verify If there Is any alert message on current page.
    storeAllButtons This command will store all buttons ids of webpages in given variable.
    storeAllFields This Command will store ids of all input fields of page in variable.
    storeAllLinks This command used for storing ids of all available links on page.
    storeAllWindowTitles This command used for storing title of all windows.
    storeAttributeFromAllWindows The command returns the titles of all windows that the browser knows about in an array.
    storeAttribute Gets the value of an element attribute.
    storeBackgroundColor The command stores the background color in rgb format.
    storeChecked The command gets the result whether a toggle-button (checkbox/radio) is checked. Fails if the specified element doesn't exist or isn't a toggle-button.
    storeColor The command stores the color in rgb format.
    storeConfirmation The command will store confirmation(Generated by "click" command) in to variable.
    storeCookie The command will store all cookies of the current page.
    storeCookieByName The command will store cookies with the name stored in variable.
    storeCookiePresent The command will store cookies availability in variable.
    storeCssCount The command is useful to calculate and store number of matching nodes for the given csspath in target field.
    storeCursorPosition This command stores numerical position of the cursor in the field.
    storeEditable This command determines whether the specified input element is editable, i.e. hasn't been disabled.
    storeElementIndex This command is used to get the relative index of an element to its parent (starting from 0). The comment node and empty text node will be ignored. It returns relative index of the element to its parent (starting from 0).
    storeElementPositionLeft This command is used to retrieve the horizontal position of an element.It returns pixels from the edge of the frame.
    storeElementPositionTop This command is used to retrieve the retrieves the vertical position of an element.It returns pixels from the edge of the frame.
    storeElementPresent This command is used to verifiy that the specified element is somewhere on the page.It returns true if the element is present, false otherwise
    storeEval This command is used to get the result of evaluating the specified JavaScript snippet. The snippet may have multiple lines, but only the result of the last line will be returned.
    storeFontSize This command is used to retrieve the css font-size attribute value applied to that element.It returns font-size in pixels.
    storeHeight This command is used to retrieve the css height attribute value applied to that element.It returns height in pixels.
    storeHtmlSource This command returns the entire HTML source between the opening and closing "html" tags.It returns the entire HTML source.
    storeLocation This command gets the absolute URL of the current page.
    storeRandomNumber This command is used to generate randomNumber with specified length.
    storeSelectedIndex This command gets option index (option number, starting at 0) for selected option in the specified select element.It returns selected option index in the specified select drop-down.
    storeColor The command stores the color in rgb format.
    storeConfirmation The command will store confirmation(Generated by "click" command) in to variable.
    storeCookie The command will store all cookies of the current page.
    storeCookieByName The command will store cookies with the name stored in variable.
    storeCssCount The command is useful to calculate and store number of matching nodes for the given csspath in target field.
    storeCursorPosition This command stores numerical position of the cursor in the field.
    storeEditable This command determines whether the specified input element is editable, i.e. hasn't been disabled.
    storeElementIndex This command is used to get the relative index of an element to its parent (starting from 0). The comment node and empty text node will be ignored. It returns relative index of the element to its parent (starting from 0).
    storeElementPositionLeft This command is used to retrieve the horizontal position of an element.It returns pixels from the edge of the frame.
    storeElementPositionTop This command is used to retrieve the retrieves the vertical position of an element.It returns pixels from the edge of the frame.
    storeElementPresent This command is used to verifiy that the specified element is somewhere on the page.It returns true if the element is present, false otherwise
    storeEval This command is used to get the result of evaluating the specified JavaScript snippet. The snippet may have multiple lines, but only the result of the last line will be returned.
    storeFontSize This command is used to retrieve the css font-size attribute value applied to that element.It returns font-size in pixels.
    storeHeight This command is used to retrieve the css height attribute value applied to that element.It returns height in pixels.
    storeHtmlSource This command returns the entire HTML source between the opening and closing "html" tags.It returns the entire HTML source.
    storeLocation This command gets the absolute URL of the current page.
    storeRandomNumber This command is used to generate randomNumber with specified length.
    storeSelectedIndex This command gets option index (option number, starting at 0) for selected option in the specified select element.It returns selected option index in the specified select drop-down.
    storeSelectedLabel This command gets option label (visible text) for selected option in the specified select element. It returns selected option label in the specified select drop-down
    storeSelectedLabels This command gets all option labels (visible text) for selected options in the specified select or multi-select element. It returns an array of all selected option labels in the specified select drop-down
    storeSelectedValue This command gets option value (value attribute) for selected option in the specified select element.It returns the selected option value in the specified select drop-down.
    storeSelectOptions This command gets all option labels in the specified select drop-down.It returns an array of all option labels in the specified select drop-down.
    storeSpeed This command is used to get execution speed (i.e., get the millisecond length of the delay following each QaSCRIBE operation). By default, there is no such delay, i.e., the delay is 0 milliseconds. 
    storeTable This command is used to store the text of a specified cell from a table in a variable.  
    storeTableToDatsset This command is used to store entire table content into a dataset and also to fetch the content for specfied columns. This command's target may require startColumnIndex and endColumnIndex which are optional and if not provided the entire table contents is retrieved and saved to the dataset. 
    storeText This command gets the text of an element. This works for any element that contains text. This command uses either the textContent (Mozilla-like browsers) or the innerText (IE-like browsers) of the element, which is the rendered text shown to the user.
    storeTextPresent This command gets the text of an element. This works for any element that contains text. This command uses either the textContent (Mozilla-like browsers) or the innerText (IE-like browsers) of the element, which is the rendered text shown to the user.
    storeTimeStamp This command is used to get current time in (yyyymmddhhmiss) format.
    storeTitle This command gets the title of the current page.
    storeValue Gets the (whitespace-trimmed) value of an input field (or anything else with a value parameter). For checkbox/radio elements, the value will be "on" or "off" depending on whether the element is checked or not.. 'ON' means selected and 'OFF' means not selected.
    storeVerticalAlign This command is used to retrieve the css vertical-align attribute value applied to that element
    storeVisible This command determines if the specified element is visible. An element can be rendered invisible by setting the CSS "visibility" property to "hidden", or the "display" property to "none", either for the element itself or one if its ancestors. This method will fail if the element is not present. if the specified element is visible, false otherwise
    storeWidth This command is used to retrieve the css width attribute value applied to that element. It returns width in pixels.
    storeXpathCount This command returns the number of nodes that match the specified xpath, eg. "//table" would give the number of tables.
    type Sets the value of an input field, as though you typed it in.
    Can also be used to set the value of combo boxes, check boxes, etc. In these cases, value should be the value of the option selected, not the visible text.
    typeAndWait Sets the value of an input field, as though you typed it in.
    Can also be used to set the value of combo boxes, check boxes, etc. In these cases, value should be the value of the option selected, not the visible text.
    uncheck Uncheck a toggle-button (checkbox/radio)
    windowFocus Gives focus to the currently selected window.
    windowMaximize Resize currently selected window to take up the entire screen.

    Feedback and Knowledge Base