How to execute a Command?
In selenium IDE, we can execute any single command without running the whole test case.
We just click on the line we want to execute and then perform of either of the steps
i) click on “Actions -> Execute this command” from the menu bar
ii) simply press “X” on your keyboard.
Now let us consider the previous example of IRCTC.
Step 1:
Make sure that your browser is on the IRCTC homepage.
Click on the command you wish to execute.
In this example, click on the fourth line “type | name=j_password | 123456"
Step 2: Now Press “X” on your keyboard.
Step 3: Observe that the text box for password becomes populated with the text “123456”.
Here in the IRCTC web page the password field is hidden by resembling the characters as bullets.
Remember:
Executing commands this way is directly dependent on the page Firefox is currently displaying.
This means that if you try the above IRCTC example with the Google homepage displayed, then your step may fail because of the following reasons
i) There may be no attribute with "name"
ii) There may be no attribute value with "j_password"
Start point:
The short-cut key is “S”.
It tells the Selenium IDE, from which line the execution will start.
To set a start-point, select a command, right-click, and from the context menu select Set/Clear Start Point.
Then click the Run button to execute the test case beginning at that start-point.
1. In the above example, playback will start on the second line.
2. We can clear the start point by pressing the “S” key from keyboard again.
Remember:
You can only have one start point in a single test script.
Start point is similar to Execute Command in such that they are dependent on the currently
displayed page. The start point will fail if you are on the wrong page
Breakpoint:
Breakpoints are indicators that tell Selenium IDE where to pause the test automatically.
The short-cut key is “B”.
To set a breakpoint, select a command, right-click, and from the context menu select Toggle Breakpoint, then click the Run button to run your test case from the start-point to the breakpoint.
Now when we execute the test, command line having pause will be highlighted in yellow color which
means that the current step is pending. We can observe this from the above figure.
Remember:
We can also have multiple breakpoints in one test case but in contrast only one start point.
In selenium IDE, we can execute any single command without running the whole test case.
We just click on the line we want to execute and then perform of either of the steps
i) click on “Actions -> Execute this command” from the menu bar
ii) simply press “X” on your keyboard.
Now let us consider the previous example of IRCTC.
Step 1:
Make sure that your browser is on the IRCTC homepage.
Click on the command you wish to execute.
In this example, click on the fourth line “type | name=j_password | 123456"
Step 2: Now Press “X” on your keyboard.
Step 3: Observe that the text box for password becomes populated with the text “123456”.
Here in the IRCTC web page the password field is hidden by resembling the characters as bullets.
Remember:
Executing commands this way is directly dependent on the page Firefox is currently displaying.
This means that if you try the above IRCTC example with the Google homepage displayed, then your step may fail because of the following reasons
i) There may be no attribute with "name"
ii) There may be no attribute value with "j_password"
Start point:
The short-cut key is “S”.
It tells the Selenium IDE, from which line the execution will start.
To set a start-point, select a command, right-click, and from the context menu select Set/Clear Start Point.
Then click the Run button to execute the test case beginning at that start-point.
1. In the above example, playback will start on the second line.
2. We can clear the start point by pressing the “S” key from keyboard again.
Remember:
You can only have one start point in a single test script.
Start point is similar to Execute Command in such that they are dependent on the currently
displayed page. The start point will fail if you are on the wrong page
Breakpoint:
Breakpoints are indicators that tell Selenium IDE where to pause the test automatically.
The short-cut key is “B”.
To set a breakpoint, select a command, right-click, and from the context menu select Toggle Breakpoint, then click the Run button to run your test case from the start-point to the breakpoint.
Now when we execute the test, command line having pause will be highlighted in yellow color which
means that the current step is pending. We can observe this from the above figure.
Remember:
We can also have multiple breakpoints in one test case but in contrast only one start point.




No comments:
Post a Comment