March 06, 2013

Selenium IDE Quiz Part 2


As you know, Selenium is a popular open source test automation tool for web applications that is used for functional and cross-browser compatibility testing. You may have already attempted the Selenium IDE Quiz Part 1. If not, try that first. Now, attempt the part 2 of this quiz to check your familiarity with Selenium IDE. Some of the answer choices are quite similar so please read each answer carefully before selecting the best one. The score appears at the bottom. A score of 5 or less indicates low knowledge, 6 to 7 means a fair level of knowledge and 8 and above shows a good knowledge of the Selenium IDE.
Instead of this quiz, you may want to see my video on Selenium Questions and Answers where I have compiled all these questions.


1. What URLs does the Selenium open command allow?
Only the base URL
Any URL relative to the base URL
Any absolute URL
Any of the above

2. What is the purpose of the Find button?
Highlight the element that is given in the locator
Search the appropriate command for the given target
Find the current value of the target
None of the above

3. Which one of the following statements is incorrect?
Breakpoint and Start point cannot both exist on the same command.
The shortcut key for Breakpoint is B and for Start point is S.
A Breakpoint or a Start point cannot be put on a comment line.
Both Breakpoint and Start point are used in debugging the test case.

4. Which add-on is commonly used with Selenium IDE to identify individual elements on a web page?
FirePath
Firebug
XPath
No add-on is required. You can view the Page Source and locate any element within the HTML code easily.

5. Why are relative XPaths preferred over absolute XPaths as locators?
For non-root elements, absolute XPaths are longer and slow down the test automation.
Absolute XPaths fail if any part of the path changes even slightly.
Relative XPaths are the default in Selenium.
None of the above

6. Which of the following is an incorrect target for pattern matching as in verifyTextPresent command?
glob:Customer*Subscriber
You entered the character, ?
regexp:[JFM]
exact:* Summary

7. What is the best way to handle asynchronous data retrieval from the server as in AJAX applications?
Run the test case at the slowest speed.
Use the pause command.
Use the "AndWait" commands.
Use the "waitFor" commands.

8. What happens when the application creates a JavaScript alert during test case play?
The alert is suppressed by Selenium..
If there is no command to handle the alert, the play is stopped with an error.
If the alert is handled with assertAlert, assertAlertPresent or verifyAlert, no alert is displayed and there is no error.
Each of the above

9. What is data parameterization?
Using variable test data in place of fixed test data values
Using different number of test data values when executing the same test case
Putting pre-requisites for the test case to execute
Limiting the test case execution only when certain conditions exist

10. Which of the following statements is correct for a Test Suite?
A Test Suite is a comma separated values file.
A Test Suite is an HTML file containing a table with a single column.
The test cases of a Test Suite must be placed in the same folder as the Test Suite.
A new Test Suite can have only new test cases.
Score is 0/ 10.

Mention your scores in the comments below. Then go to Part 3 of this quiz on Selenium RC.

2 comments:

Note: Only a member of this blog may post a comment.