Skip to content

User Interface "Synchronization" Commands

This category of commands helps you provide to the automated scripts adequate time for the interactions with the application to complete.

If your automation attempts to execute all the instructions within your automated test rapidly without giving your application under to test adequate time it needs to process the interactions, your test could become flaky and intermittent.

You can choose and implement the right synchronization strategies based on your application and use the appropriate commands.

Waits, Pauses, Timeouts are examples of the synchronization strategies.

Explicitly Capturing a screenshot for an entire page currently in context of the automated test also falls into this category.

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
captureEntirePageScreenshot Saves the entire contents of the current window canvas to a PNG file. Contrast this with the captureScreenshot command, which captures the contents of the OS viewport (i.e. whatever is currently being displayed on the monitor), and is implemented in the RC only. Currently this only works in Firefox when running in chrome mode, and in IE non-HTA using the EXPERIMENTAL 'Snapsie' utility. The Firefox implementation is mostly borrowed from the Screengrab! Firefox extension. Please see http://www.screengrab.org and http://snapsie.sourceforge.net/ for details.
captureEntirePageScreenshotAndWait Saves the entire contents of the current window canvas to a PNG file. Contrast this with the captureScreenshot command, which captures the contents of the OS viewport (i.e. whatever is currently being displayed on the monitor), and is implemented in the RC only. Currently this only works in Firefox when running in chrome mode, and in IE non-HTA using the EXPERIMENTAL "Snapsie" utility. The Firefox implementation is mostly borrowed from the Screengrab! Firefox extension. Please see http://www.screengrab.org and http://snapsie.sourceforge.net/ for details.
pause This command is Used for giving explicit Pause between the execution (Wait for the specified amount of time (in milliseconds)).
setTimeout This command is used to specify the amount of time that selenium will wait for actions to complete.This time can be increased or decreased. The default timeout is 120 seconds.Actions that require waiting include "open" and the "waitFor*" actions.
waitForAlert This command is used to wait for alert if the alert is occuring after performing actions on the web page.Getting an alert has the same effect as manually clicking OK. If an alert is generated but you do not consume it with getAlert, the next QaSCRIBE action will fail. Under QaSCRIBE, JavaScript alerts will NOT pop up a visible alert dialog. QaSCRIBE does NOT support JavaScript alerts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and QaSCRIBE will hang until someone manually clicks OK.
waitForAlertNotPresent This command is used to check whether the alert is present or not. This function never throws an exception.
waitForAlertPresent This command is used to check whether the alert is present or not. This function never throws an exception.
waitForAllButtons This command is used to return the IDs of all buttons present on the page. If a given button has no ID, it will appear as "" in this array.
waitForAllFields This command is used to return the IDs of all input fields on the page. If a given field has no ID, it will appear as "" in this array.
waitForAllLinks This command is used to return the IDs of all links on the page. If a given link has no ID, it will appear as "" in this array.
waitForAllWindowTitles This command is used to returns the titles of all windows that the browser knows about in an array.
waitForAttribute This command is used to wait for the value of an attribute of particular element. The value of the attribute may differ across browsers (this is the case for the "style" attribute, for example).
waitForBackgroundColor This command is used to wait for the css background color of particular element/locator.
waitForChecked This command is used to wait to check a toggle-button (checkbox/radio). Fails if the specified element doesn't exist or isn't a toggle-button.
waitForColor This command is used to wait for the css color of specified element.
waitForConfirmation This command is used to wait till the most recent JavaScript alert has confirmed.

Retrieves the message of a JavaScript confirmation dialog generated during the previous action. By default, the confirm function will return true, having the same effect as manually clicking OK. This can be changed by prior execution of the chooseCancelOnNextConfirmation command. If an confirmation is generated but you do not consume it with getConfirmation, the next Selenium action will fail.

NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible dialog. NOTE: Selenium does NOT support JavaScript confirmations that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until you manually click OK.
waitForConfirmationPresent This command is used to wait till the JavaScript confirmation is present.

This function never throws an exception.
waitForCookie This command is used to wait till all cookies of the current page under test are present.
waitForCookieByName •This command is used to wait till the value of the cookie with the specified name present.

Throws an error if the cookie is not present.
waitForCookieNotPresent This command is used to wait till the cookie with the specified name is present. This command waits by default 120 seconds.
waitForCookiePresent It waits for the specified cookie name on the Screen.
waitForEditable Determines whether the specified input element is editable, ie hasn't been disabled.

This method will fail if the specified element isn't an input element.
waitForElementNotPresent Verifies that the specified element is not present on the page.
waitForElementPresent Verifies that the specified element is somewhere on the page.
waitForEval Gets 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.
waitForFontFamily Retrieves the css font-family attribute value applied to that element.
waitForFontSize Retrieves the css font-size attribute value applied to that element.
waitForFrameToLoad Waits for a new frame to load. QaSCRIBE constantly keeps track of new pages and frames loading, and sets a "newPageLoaded" flag when it first notices a page load. See waitForPageToLoad for more information.
waitForLocation Waits for a URL of the current page.
waitForNotAllButtons If a given button has no ID, it will appear as "" in this array.
waitForNotAllFields If a given button has no ID, it will appear as "" in this array.
waitForNotAllLinks If a given button has no ID, it will appear as "" in this array.
waitForNotBackgroundRepeat Retrieves the css background-repeat attribute value applied to that element.
waitForNotChecked Gets whether a toggle-button (checkbox/radio) is checked. Fails if the specified element doesn't exist or isn't a toggle-button.
waitForNotConfirmation Retrieves the message of a JavaScript confirmation dialog generated during the previous action. By default, the confirm function will return true, having the same effect as manually clicking OK.

This can be changed by prior execution of the chooseCancelOnNextConfirmation command. If an confirmation is generated but you do not consume it with getConfirmation, the next Selenium action will fail.
waitForNotCookie It waits for a cookie not to be present on current page.
waitForNotCookieByName It waits until the value of the cookie with the specified name,or throws an error if the cookie is not present.
waitForNotEditable Determines whether the specified input element is editable, ie hasn't been disabled. This method will fail if the specified element isn't an input element.
waitForNotEval Gets 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.
waitForNotLocation Gets the absolute URL of the current page.
waitForNotSelectedLabel Purpose of this command is to make sure that the so and so option is not the selected one in the select drop-down.
waitForNotSelectedLabels Purpose of this command is to make sure that the so and so options are not the selected one in the select drop-down.
waitForNotSpeed 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. See also setSpeed.
waitForNotText The purpose of the Command is to wait untill the specified text to be not present on targeted element.
waitForNotTitle The purpose of the Command is to wait untill the specified title to be not present on particular page.
waitForNotValue The purpose of the Command is to wait untill the specified value to be not present on targeted element.
waitForNotVisible The purpose of the command is to wait untill the specified element is not visible.
waitForPageToLoad Waits for a new page to load.
waitForPopUp Waits for a popup window to appear and load up.
waitForSelectedLabel The purpose of this command is to make sure that the so and so option is the selected one in the select drop-down.
waitForSelectedLabels The purpose of this command is to make sure that the so and so options are the selected one in the select drop-down.
waitForSelectOptions The purpose of the command is to wait untill the desired options are populated in drop-down or not.
waitForSpeed 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. See also setSpeed.
waitForTable This command is used to wait for the text from the specified cell in the table matches the pattern given in Value.
waitForText The purpose of the Command is to wait untill the specified text to be present on targeted element.
waitForTextAlign Retrieves the text-align - css attribute applied on that element.
waitForTextNotPresent The purpose of the command is to Verifiy that the specified text pattern does not appears somewhere on the rendered page shown to the user.
waitForTextPresent The purpose of the command is to Verify that the specified text pattern appears somewhere on the rendered page shown to the user.
waitForTimeStamp This command is used to get current time in (yyyymmddhhmiss) format.
waitForTitle The purpose of the command is to wait until expected title appears.
waitForValue •The purpose of the Command is to wait untill the specified value to be present on targeted element.
waitForVisible The purpose of the command is to wait untill the specified element is visible.
waitForXpathCount The purpose of this command is to wait untill the number of nodes that match the specified xpath.

 

 

 

Feedback and Knowledge Base