Selenium Interview Preparation Guide

Refine your Selenium interview skills with our 66 critical questions. Each question is crafted to challenge your understanding and proficiency in Selenium. Suitable for all skill levels, these questions are essential for effective preparation. Download the free PDF now to get all 66 questions and ensure youre well-prepared for your Selenium interview. This resource is perfect for in-depth preparation and boosting your confidence.
Tweet Share WhatsApp

66 Selenium Questions and Answers:

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".
Download PDFRead All Selenium Questions

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 .
Download PDFRead All Selenium Questions

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 PDFRead All Selenium Questions