1. Do you know what does selenium do?

You can use opensource(ie free!) - Selenium tool ( selenium IDE is a plugin to firefox) to record and playback tests (like WinRunner, QTP). You can then export the recorded test in most language e.g. html, Java , .net , perl , ruby etc. The exported test can be run in any browser and any platform using "selenium remote control".

2. Explain what are the components of selenium?

Selenium IDE - Plugin to Firefox to record and play test in firefox
and also export tests in different languages. The most appealing
format is the html test case which seems to based on fit html .
Selenium RC- Allows playing of exported test in different platform/OS
Selenium Grid - Allows to control lots of selenium machines(you typically dont need this only for load test -and hence may ignore it).

3. Explain how does Selenium remote control internally works?

Selenium RC launches the browser with itself as the proxy server (hence you may get certificate warning in some modes) and then it injects javascript - to play the test. This also means it can easily work in ALL browsers/platform - and it can be easily used to test AJAX(unlike professional tools).

4. Tell me what are the different modes that Selenium RC uses?

With latest release of Selenium RC(1.0 beta 2) there
are two modes for IE *iexplore(same as *iehta) and *iexploreproxy.
Similarly for Firefox use *firefox(same as *chrome) and *firefoxproxy.
You should prefere *iexplore(ie *iehta) and *firefox (ie *chrome)
respectively as they work with cross domain.

5. Tell me who should use Selenium?

Developers can use it - for “browser” regression testing ( and replace htmlunit/httpunit in some cases) .

Per the one of the forces behind selenium(Neal ford) - it should really be used by Business Analyst first .

QA should enhance/use it do regression test/cross browsers testing on all platforms .

6. Tell me do I Export in HTML or do I export in programming language like java client?

If you need dynamic capability (e.g. reading data from csv file or database) then
you have to export it in programming language like java.
You would also need to export in java - if your page has lots of flash
components. e.g.
http://www.adobe.com/devnet/flash/articles/flash_selenium_04.html

There is also attempt to make silverlight work with java and .net out here.

The client code using java also is more stable (less permission denied errors) then
the html case.
But the html is easy to modify/maintain and it generates nice results - whereas in
java client code it tends to be cryptic(but again html test case - does not seem to be flexible).

7. Explain Selenium vs Low/Network level tools like Webtest/HttpUnit/HtmlUnit(java)?

If you are using a "low/network" level tool like htmlunit then it
has the advantage of being fast - but its javascript will
not work work in most complex websites(besides not being a browser test)
Selenium(java, .net) code also has the disadvantage of being dependent on RC server(not big deal).

You should continue low level tools like httpunit etc to use
it for monitoring - but don't use those tools for browser/regression testing.

8. Explain Selenium vs Watir?

If you like your test cases in Ruby (or maybe .net) and are willing to
dig through "hard to understand" documentation - then Watir is a tool
for you.(if you are perl/php/java shop - don't even bother considering Watir
for now)
Watir does have advantage that its recorder uses IE to record.
With Selenium - if your site does not work with Firefox - you will
have to manually write the code(not big deal)..

But the biggest advantage of Selenium is its support for FIT HTML
and the vast languages/browsers/platform that it supports.
(with good documentation)
But maybe things may change in future.

9. Can you please explain Selenium vs Imacros?

Imacros appeared better in recording. But overall its not as powerful for automation(or scheduling).

10. Selenium vs Dejaclick?

Dejaclick is probably the best (free) macro tool for websites record and play. However Selenium beats DejaClick in overall features(multiple language suport vs only XML support, free automation vs paid automation).
Dejaclick Advantage:
It nicely plays back the recorded stuff - by highlighting appropriate items in green.
It can easily record flash/silverlight - by recording position.(however it may mean that it may not
nicely work in all computers)
It has facility to encrypt sensitive data in your file.

Dejaclick easily allow you to bookmark your script. So that you can play it back in one click.

You can easily toggle Dejaclick to True Screen mode(ie recording by mouse positions) by pressing Alt +
(some stuff are hard to record by name/ids)
Disadvantage:
Dejaclick recording tool is free - But for automation you have to rely on paid site alertsite (AlertSite however provides great facility for running your dejaclick script and even soap xml from most of cities/region in US/world. This will allow you to monitor your CDN performance/reliability or what content your website is serving across different regions)

Download Interview PDF

11. What do you know about Selenium?

Selenium is a suite of tools for web automation testing.
Selenium first came to life in 2004 when Jason Huggins was testing an internalapplication at ThoughtWorks.
Selenium was a tremendous tool, it wasn't without it's drawbacks. Because of its Javascript based automation engine and the security limitations browsers apply to Javascript, different things became impossible to do.
Selenium Suite of projects include:
Selenium IDE
Selenium Core
Selenium 1 (known as. Selenium RC or Remote Control)
Selenium 2 (known as. Selenium Webdriver)
Selenium-Grid

12. What are the technical challenges with selenium?

As you know Selenium is a free ware open source testing tool. There are many challenges with Selenium.
1. Selenium Supports only web based applications
2. It doesn't support any non web based (Like Win 32, Java Applet, Java Swing, .Net Client Server etc) applications
3. When you compare selenium with QTP, Silk Test, Test Partner and RFT, there are many challenges in terms of maintainability of the test cases
4. Since Selenium is a freeware tool, there is no direct support if one is in trouble with the support of applications
5. There is no object repository concept in Selenium, so maintainability of the objects is very high
6. There are many challenges if one have to interact with Win 32 windows even when you are working with Web based applications
7. Bitmap comparison is not supported by Selenium
8. Any reporting related capabilities, you need to depend on third party tools
9. You need to learn any one of the native language like (.Net, Java, Perl, Python, PHP, Ruby) to work efficiently with the scripting side of selenium

13. What are the test types supported by Selenium?

Selenium could be used for testing the web based applications. The test types can be supported are: 1. functional, 2. regression, 3. load testing
The automation tool could be implemented for post release validation withcontinuous integration tools like:
1. Jenkins,
2. Hudson,
3. QuickBuild,
4. CruiseCont

14. What are the capabilities of Selenium IDE?

Selenium IDE (Integrated Development Environment) works similar to commercialtools like QTP, Silk Test and Test Partner etc. The below mentioned points describes well about Selenium IDE.
1. Selenium IDE is a Firefox add-on.
2. Selenium IDE can support recording the clicks, typing, and other actions to make a test cases.
3. Using Selenium IDE A Tester can play back the test cases in the Firefox browser
4. Selenium IDE supports exporting the test cases and suites to Selenium RC.
5. Debugging of the test cases with step-by-step can be done
6. breakpoint insertion is possible
7. Page abstraction functionality is supported by Selenium IDE
8. Selenium IDE can supports an extensibility capability allowing the use of add-ons or user extensions that expand the functionality of Selenium IDE

15. What are the challenges with Selenium IDE?

Selenium-IDE does not directly support:
1. condition statements
2. iteration or looping
3. logging and reporting of test results
4. error handling, particularly unexpected errors
5. database testing
6. test case grouping
7. re-execution of failed tests
8. test case dependency
9. capture screenshots on test failures
10. Results Report generations

16. Which are the browsers supported by Selenium IDE?

Selenium IDE supports only one browser Mozilla Firefox. The versions supported as of now are:
Mozilla Firefox 2.x
Mozilla Firefox 3.x
The versions not supported as of now are:earlier versions of Mozilla Firefox 2.x
Mozilla Firefox 4.x

17. How to execute a single line command from Selenium IDE?

Single line command from Selenium IDE can be executed in two ways

1. Right click on the command in Selenium IDE and select "Execute This Command"
2. Select the command in Selenium IDE and press "X" key on the keyboard

18. How to insert a start point in Selenium IDE?

Start point Selenium IDE can be set in two ways
1. Right click on the command in Selenium IDE and select "Set / Clear Start Point"
2. Select the command in Selenium IDE and press "S" key on the keyboard
3. You can have only one start point
4. If you have already set one start point and you selected other command as start point. Then the first start point will be removed and the new start point will be set

19. How to insert a comment in Selenium IDE?

Comments in Selenium IDE can be set in two ways
1. Right click on the command in Selenium IDE and select "Inert New Comment"
2. If you want to comment an existing line. You need to follow the below mentioned steps.
a. Select the source tab in IDE
b. Select the line which you want to comment
c. Assume that if you want to comment a open command you need to write like below mentioned code
<tr>
<!--
<td>open&l/td>
<td>/node/304/edit&l/td>
<td></td>
-->
</tr>

20. How to insert a break point in Selenium IDE?

Break point can be set in two ways in Selenium IDE
1. Right click on the command in Selenium IDE and select "Toggle Break Point"
2. Select the command in Selenium IDE and press "B" key on the keyboard
3. If you want to clear the break point once again Spress "B" key on the keyboard
4. You can set multiple break points in Selenium IDE

21. How to debug the tests in Selenium IDE?

To debug or execute the test cases line by line. Follow the below mentioned steps
1. Insert a break point (see the question to know more How to insert a break point in Selenium IDE? ) from the locationwhere you want to execute step by step
2. Run the test case
3. execution will be paused at the given break point
4. Click on the step (Blue) button to continue with the next statement
5. Click on Run button, to continue executing all the commands at a time

22. How to export Selenium IDE Test Suite to Selenium RC Suites?

From selenium IDE the test cases can be exported into the languages as mentioned below
1. .Net, 2. Java, 3. Perl, 4. Python, 5. PHP, 6. Ruby
The below mentioned steps can explain how to export the test cases
1. Open the test case from Selenium IDE
2. Select File -> Export Test Case As

23. Which is the command used for displaying the values of a variable into the output console or log?

The command used for displaying the values of a variable into the output console or log - echo
If you want to display a constant string. The below mentioned command can be used
echo <constant string>
ex: echo "The sample message"
If you want to display the value of a variable it can be written like below
echo ${<variable name>>
ex: echo ${var1}
Note: Here var1 is the variable

24. Which are the browsers supported by Selenium RC?

Supported browsers for Selenium RC include:
(1). *firefox (2). *mock (3). *firefoxproxy (4). *pifirefox ((5). *chrome (6). *iexploreproxy (7). *iexplore (8). *firefox3 (9). *safariproxy (10). *googlechrome (11). *konqueror (12). *firefox2 (13). *safari (14). *piiexplore (15). *firefoxchrome (16). *opera (17). *iehta
(18). *custom
Note: Any third party browser is supported with *custom followed by the complete path of the browser with executable

Download Interview PDF

25. Which are the Operating Systems supported by Selenium?

Selenium IDE
Works in Firefox 2+ Start browser, run tests Run tests
Operating Systems Supported:
1. Windows, 2. OS X 3. Linux 4. Solaris 5. Others whichever supports Firefox 2+
Selenium Remote Control
Used for starting browser and run tests
Operating Systems Supported:
1. Windows, 2. OS X 3. Linux 4. Solaris 5. Others
Selenium Core
Used for running tests
Operating Systems Supported:
1. Windows, 2. OS X 3. Linux 4. Solaris 5. Others