0% found this document useful (0 votes)
68 views4 pages

Selenium Pitanja

Selenium is a suite of tools for automated web testing. It is composed of Selenium IDE for recording and playback, WebDriver and RC which provide APIs for languages like Java and .NET to control browsers, and Grid which allows distributing tests across multiple machines. Selenium can be used to perform functional and regression testing and supports finding elements using ID, name, tag, and other locators. It has advantages like being open source and supporting multiple browsers and languages but also challenges like only supporting web applications.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views4 pages

Selenium Pitanja

Selenium is a suite of tools for automated web testing. It is composed of Selenium IDE for recording and playback, WebDriver and RC which provide APIs for languages like Java and .NET to control browsers, and Grid which allows distributing tests across multiple machines. Selenium can be used to perform functional and regression testing and supports finding elements using ID, name, tag, and other locators. It has advantages like being open source and supporting multiple browsers and languages but also challenges like only supporting web applications.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Basic Selenium Interview Ques�ons for Freshers

1) What is Selenium and what is composed of?

Selenium is a suite of tools for automated web tes�ng. It is composed of

• Selenium IDE (Integrated Development Environment) : It is a tool for recording and playing back.
It is a firefox plugin
• WebDriver and RC: It provide the APIs for a variety of languages like Java, .NET, PHP, etc.
With most of the browsers Webdriver and RC works.
• Grid: With the help of Grid you can distribute tests on mul�ple machines so that test can be run parallel
which helps in cu�ng down the �me required for running in browser test suites

2) How will you find an element using Selenium?

In Selenium every object or control in a web page is referred as an elements, there are different ways to find an
element in a web page they are

• ID
• Name
• Tag
• A�ribute
• CSS
• Linktext
• Par�alLink Text
• Xpath etc

3) List out the test types that are supported by Selenium?


For web based applica�on tes�ng selenium can be used

The test types can be supported are

a) Func�onal, Learn More about Func�onal Tes�ng.


b) Regression

For post release valida�on with con�nuous integra�on automa�on tool could be used

a) Jenkins
b) Hudson
c) Quick Build
d) CruiseCont

4) Explain what is asser�on in Selenium and what are the types of asser�on?

Asser�on is used as a verifica�on point. It verifies that the state of the applica�on conforms to what is expected.
The types of asser�on are “assert” , “verify” and “waitFor”.

5) Men�on what is the use of X-path?

X-Path is used to find the WebElement in web pages. It is also useful in iden�fying the dynamic elements.
6) Explain the difference between single and double slash in X-path?

Single slash ‘/ ’

Single slash ( / ) start selec�on from the document node


It allows you to create ‘absolute’ path expressions
Double Slash ‘// ’

Double slash ( // ) start selec�on matching anywhere in the document


It enables to create ‘rela�ve’ path expressions

7) List out the technical challenges with Selenium?

Technical challenges with Selenium are

• Selenium supports only web based applica�ons


• It does not support the Bitmap comparison
• For any repor�ng related capabili�es have to depend on third party tools
• No vendor support for tool compared to commercial tools like HP UFT
• As there is no object repository concept in Selenium, maintainability of objects becomes difficult

8) What is the difference between type keys and type commands?

TypeKeys() will trigger JavaScript event in most of the cases whereas .type() won’t. Type key populates the value
a�ribute using JavaScript whereas .typekeys() emulates like actual user typing

9) What is the difference between verify and assert commands?

• Assert: Assert allows to check whether an element is on the page or not. The test will stop on the step
failed, if the asserted element is not available. In other words, the test will terminated at the point where check
fails.

• Verify: Verify command will check whether the element is on the page, if it is not then the test will carry on
execu�ng. In verifica�on, all the commands are going to run guaranteed even if any of test fails.

10) What is JUnit Annota�ons and what are different types of annota�ons which are useful?

In JAVA a special form of syntac�c meta-data can be added to Java source code, this is know as Annota�ons.
Variables, parameters, packages, methods and classes are annotated some of the Junit annota�ons which can be
useful are

• Test
• Before
• A�er
• Ignore
• BeforeClass
• A�erClass
• RunWith
11) While using click command can you use screen coordinate?

To click on specific part of element, you would need to use clickAT command. ClickAt command accepts element
locator and x, y co-ordinates as arguments-

clickAt (locator, cordString)

12) What are the advantages of Selenium?

• It supports C#, PHP, Java, Perl, Phython


• It supports different OS like Windows, Linux and Mac OS
• It has got powerful methods to locate elements (Xpath, DOM , CSS)
• It has highly developer community supported by Google

13) Why testers should opt for Selenium and not QTP?

Selenium is more popular than QTP as

• Selenium is an open source whereas QTP is a commercial tool


• Selenium is used specially for tes�ng web based applica�ons while QTP can be used for tes�ng client server
applica�on also
• Selenium supports Firefox, IE, Opera, Safari on opera�ng systems like Windows, Mac, Linux etc. however QTP
is limited to Internet Explorer on Windows.
• Selenium supports many programming languages like Ruby, Perl, Python whereas QTP supports only VB script

You might also like