Multiple
types of Commands in Selenium. They are Accessors, Actions, Assertions. Following are the some important commands.Command | Description |
---|---|
addSelectionAndWait | When selecting multiple values from list box, "addSelection" command will be used.
|
addSelectionAndWait |
When page reloading is occurred due to the adding selection then addSelectionAndWait command will be used to handle page loading event. |
altKeyDown | It will keep squeezed alt key until "altKeyUp" not executed. |
altKeyUp | "altKeyUp" will discharge the squeezed alt key |
answerOnNextPrompt | It used to provide the answers in pop up boxes. |
assertAlert | It is used to verify the text and execution will be stopped when alert is not matched. |
fireEvent | To handle the HTML DOM events on web pages. |
setSpeed | To manage the execution speed of IDE. |
Click and Waits
, user might not want to select things by a CSS element named EM, it's just not very clear what the user is trying to do. So there's a couple things one can do. One can insert comments while working with commands.
Selenese
and Selenese is basically just a language that is language independent.It's not C-Sharp, Java.
It is a general syntax and there is various implementations of that. And actually the recorder uses an html table to lay out the commands. But the basic idea of Selenese
is its really simple, user have a command and then user optionally have a target
and a value
. So some command will just be the command themself, and some of them will take a target and sometimes it will have a value as well. single select
or multi-select
programming application page parts like drop down and list box. user can see 2 related assertSelectedId and assertSelectedIds command representations.
The assertSelectedIndex
command will confirm that targeted element's selected label's index is same as expected or not. It will return screw up like '[error] Actual quality "3" did not arrange "0"" if concentrated on and expected rundown values did not facilitate else it will be pass. This accuse won't work of multiple selected labels.
The assertSelectedIndexes
command will work same as assertSelectedIndex command and also for various picked records too( multiple selected labels).
Command | Description |
---|---|
All links Store | All the links of IDS are stored |
Body Text Store | The complete matter is going to store |
Title Store | The titles of all Windows is going to store |
Field Store | The input are stored |
Confirmation Store | previous information is stored |
Locator Store | The location of site is stored |
Checked Store | Radio button is going to check |
Visible Store | The element is visible |
Index Store | The index will be displayed |
Command | Description |
---|---|
Click | It wil click the element |
Highlight | Element will highlighted. |
Mouse/td> | To select the elements |
Pause | It will be stopped temporarily |
Open | Url will be opened |
Close | Window will be closed |
Drag and Drop | It will drag and dropped in certain location |
Store | The result will be stored |
status
of Application. Here the actual output is compared with expected data. Following are the commands used in the Assertions.
Command | Description |
---|---|
Click | It has to halt, up to the Alert has come |
Buttons Verify | It verifies about the button. |
Wait Body | Text body will Wait |
Wait Select | It will wait until and unless it selected |
Wait Window | All the Ids in window are going to wait |
Selected Verify | It will verify whether it is selected or not |
Error Wait | Shows a popup that error has occurred, so wait for a while |