| layout | default |
|---|
{% include links %}
- TOC {:toc}
SeLite Commands (Components > Commands) provides several Selenese commands and related functionality.
Commands with name in form xxxRobust: typeRobust, clickRobust, selectRobust action the same as original commands xxx, but if the target doesn't exist, then they skip and they don't fail.
Commands with name in form xxxRandom: clickRandom, selectRandom, typeRandom, typeRandomEmail generate controlled random data. The commands enter (or select or click) a random value(or an option or a radio button) for a given field (of a specified type). Optionally, they can also store the entered/selected/clicked text/choice in a given Selenese variable, so that the [script] can use it later (e.g. to store it in [script] DB).
Those commands perform two functions
- main purpose: click/select a random element (matching the given selector), or type random text (more below)
- optionally, capture the value of that clicked/selected element, or capture the typed text, into a stored variable. That facilitates later stages (e.g. when you submit the form and load a view of the record, then you want can validate that the clicked/selected/typed data got submitted).
For that the commands have two parameters:
selectLocator(orradiosXPathorlocator), required: a selector to match the set of elements, from which it chooses a random onestoreorparamsOrStore(optional):storeis a name of stored variable, where the command saves the clicked/selected/typed value. It may include field or sub(sub-...)-field e.g.variableName.fieldName, variableName.fieldName.subfieldName...paramsOrStorecan be either- a string: a name of stored variable, just like
storeabove - an object with one or multiple fields. Following examples use [SelBlocks Global] and its EnhancedSelenese to pass objects through
=<>...<>notation.
- a string: a name of stored variable, just like
typeRandomEmail co-operates with typeRandom. It types a random email address, based on a name already typed in another element.
For more details see its Selenese tests.
There are two sets of functionality that support TimeStamps. The first set defines commands (primary names): sleepUntilTimestampDistinctDownToMilliseconds, sleepUntilTimestampDistinctDownToSeconds, sleepUntilTimestampDistinctDownToMinutes. Each ensures that a timestamp from that moment will be unique, when compared to any timestamp created just before any previous or future call to the same command (or to a command with finer precision).
The second set defines functions isTimestampDownToMilliseconds, isTimestampDownToSeconds, isTimestampDownToMinutes, isTimestampDownToPrecision. You can't access those directly as commands in Selenium IDE. Instead, use commands like verifyTimestampDownToSeconds (see also {{navAutoGeneratedSeleneseCommands}}). Those serve to validate a displayed timestamp (identified by locator in target parameter) against a previously saved timestamp (passed in value parameter).
The second set also auto-generates commands like waitForTimestampDownToSeconds. However, do not use those commands because they could be misplaced with sleeUntilTimestampDistinctDownToSeconds. To prevent confusion, this subset of auto-generated commands (waitForTimestampDownToSeconds and similar) are handled specially: they fail. If you need to wait for a timestamp and to validate it, use a different waitFor... command (targeting the related element), and then verify or assert the timestamp (with e.g. assertTimestampDownToSeconds).
- trigger a change
storeTimestampDownToSeconds(or similar - for the chosen precision)sleepUntilTimestampDistinctDownToSeconds(or similar)- load a view
assertTimestampDownToSeconds(orverifyTimestampDownToSeconds) against the stored timestamp
disableJavascript, enableJavascript: disable/enable Javascript for the web application that is being automatedindexBy- index objectsselectTopFrameAnd
For details see reference of those commands in Selenium IDE, online or locally at {{chromeUrl}} chrome://selite-extension-sequencer/content/selenese_reference.html?chrome://selite-commands/content/reference.xml.