|
1 | 1 | ---
|
2 | 2 | layout: default
|
3 | 3 | ---
|
4 |
| -{% include links %} |
5 |
| -* TOC |
6 |
| -{:toc} |
7 | 4 |
|
8 |
| -# Overview |
9 |
| -[SeLite Commands](https://addons.mozilla.org/en-US/firefox/addon/selite-commands/) ([Components](Components) > [Commands](Components#commands)) provides several Selenese commands and related functionality. |
| 5 | +<!-- Don't use permalink: /Commands in YAML matter above. It doesn't auto-redirect. --> |
| 6 | +### Page has moved |
10 | 7 |
|
11 |
| -# Robust commands # |
12 |
| -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. |
13 |
| - |
14 |
| -# Random data # |
15 |
| -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). |
16 |
| - |
17 |
| -Those commands perform two functions |
18 |
| - |
19 |
| - * main purpose: click/select a random element (matching the given selector), or type random text (more below) |
20 |
| - * 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). |
21 |
| - |
22 |
| -For that the commands have two parameters: |
23 |
| - |
24 |
| - * `selectLocator` (or `radiosXPath` or `locator`), required: a selector to match the set of elements, from which it chooses a random one |
25 |
| - * `store` or `paramsOrStore` (optional): |
26 |
| - * `store` is 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...` |
27 |
| - * `paramsOrStore` can be either |
28 |
| - * a string: a name of stored variable, just like `store` above |
29 |
| - * an object with one or multiple fields. Following examples use [SelBlocks Global] and its [EnhancedSelenese](EnhancedSelenese) to pass objects through `=<>...<>` notation. |
30 |
| - |
31 |
| -`typeRandomEmail` co-operates with `typeRandom`. It types a random email address, based on a name already typed in another element. |
32 |
| - |
33 |
| -For more details see [its Selenese tests](https://github.com/selite/selite/tree/master/commands/selenese-scripts). |
34 |
| - |
35 |
| -# Timestamp-related commands # |
36 |
| -There are two sets of functionality that support [TimeStamps](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). |
37 |
| - |
38 |
| -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). |
39 |
| - |
40 |
| -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`). |
41 |
| - |
42 |
| -## Basic usage ## |
43 |
| - * trigger a change |
44 |
| - * `storeTimestampDownToSeconds` (or similar - for the chosen precision) |
45 |
| - * `sleepUntilTimestampDistinctDownToSeconds` (or similar) |
46 |
| - * load a view |
47 |
| - * `assertTimestampDownToSeconds` (or `verifyTimestampDownToSeconds`) against the stored timestamp |
48 |
| - |
49 |
| -# Other commands # |
50 |
| - * `disableJavascript, enableJavascript`: disable/enable Javascript for the web application that is being automated |
51 |
| - * `indexBy` - index objects |
52 |
| - * `selectTopFrameAnd` |
53 |
| - |
54 |
| -# Reference # |
55 |
| -For details see reference of those commands in Selenium IDE, [online](https://cdn.rawgit.com/selite/selite/master/commands/src/chrome/content/reference.xml) or locally at {{chromeUrl}} _chrome://selite-extension-sequencer/content/selenese_reference.html?chrome://selite-commands/content/reference.xml_. |
| 8 | +Please see [Commands](Commands) instead. |
| 9 | +<script type="text/javascript"> |
| 10 | + location.href= "/Commands"; |
| 11 | +</script> |
0 commit comments