Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

4/21/2016

SeleniumInterviewQuestionsjavatpoint

ContentMenu

SeleniumInterviewQuestions
A list of frequently asked Selenium interview questions and
answersaregivenbelow.

1) What is test automation or automation


testing?
Automationtestingisusedtoautomatethemanualtesting.Itis
a process of automating the manual process to test the
application/system under test. It uses separate testing tools
whichfacilitateyoutocreatetestscriptswhichcanbeexecuted
repeatedlyanddoesn'tneedanymanualintervention.

2) What are the advantages of automation


testing?
Itsupportsexecutionofrepeatedtestcases.
Itfacilitatesparallelexecution.
Itaidsintestingalargetestmatrix.
It improves accuracy because there are no chances of
humanerrors.
Itsavestimeandmoney.

3) What is selenium? What are the different


componentsofselenium?
Seleniumisoneofthemostpopularautomatedtestingsuites.It
isbrowserautomationtoolwhichletsyouautomatedoperations
likeclick,typeandselectionfromadropdownofawebpage.It
is designed to support and encourage automation testing of
functionalities of web based applications and a wide range of
browsers and platforms. It is one of the most accepted tools
amongstthetestingprofessionalduetoitsexistenceintheopen
sourcecommunity.
http://www.javatpoint.com/seleniuminterviewquestions

1/8

4/21/2016

SeleniumInterviewQuestionsjavatpoint

Selenium is not just a single tool rather than it is a package of


several testing tools and that?s why it is referred as a suite.
Eachofthesetoolsisdesignedtocaterdifferenttestingandtest
environmentrequirement.

4)WhatisSelenium1.0?
Selenium 1.0 is popularily known as Selenium Remote Control
(Selenium RC). It is a library available in wide variety of
languages. The main reason to use Selenium RC was that
Selenium IDE was incapable to execute tests in browsers other
thanSeleniumIDEandthelimitationoflanguageSeleneseused
inSeleniumIDE.

5)WhatisSeleniumIDE?
SeleniumIDEisafirefoxplugin.Itisusedtorecordandreplay
testsinfirefoxbrowser.Itisusedonlywithfirefoxbrowser.

6)Whatisselenium2.0?
Selenium 2.0 is a tool which is a combination of web testing
toolsSeleniumRCandWebDriver.

7)Whyisseleniumselectedasatesttool?
Seleniumisusedasatestingtoolbecause:
Itisfreeandopensource.
Ithasalargeuserbaseandhelpingcommunities.
Compatible on different platforms i.e. Windows, Mac OS,
Linuxetc.
Have cross browser compatibility (Chrome, Firefox, IE,
Safarietc.)
Support multiple programming languages ( Java, C#,
Ruby,PERL,Pythonetc.)
Supportdistributedtesting.

http://www.javatpoint.com/seleniuminterviewquestions

2/8

4/21/2016

SeleniumInterviewQuestionsjavatpoint

8) What are selenium supporting testing


types?
Seleniumsupportstwotypesoftesting:
FunctionalTesting
RegressionTesting

9)Whatarethelimitationsofselenium?
Seleniumhasfollowinglimitations:
Itcanbeusedonlytotestwebbasedapplication.
Mobileapplicationscannotbetestedusingselenium.
Youcannottestcaptchaandbarcodebyusingselenium.
The user must have the knowledge of programming
languageforusingselenium.
Reportscanonlybegeneratedusingthirdpartytoolslike
TestNGorJunit.

10)Whatisselenese?
Selenese is a lanuage which is used for writing test script in
seleniumIDE.

11) Describe the different types of locators in


Selenium?
Locator is an address which identifies a web element uniquely
withinthewebpage.
TherearedifferenttypesoflocatorsinSeleniumtoidentifyweb
elementsaccuratelyandprecisely.
Theseare:
ID
ClassName
Name
http://www.javatpoint.com/seleniuminterviewquestions

3/8

4/21/2016

SeleniumInterviewQuestionsjavatpoint

TagName
LinkText
PartialLinkText
Xpath
CSSSelector
DOM

12)WhatisanXpath?
XpathisusedtolocateawebelementbasedonitsXMLpath.It
canbeusedtolocateHTMLelements.

13)WhichisthelatestSeleniumtool?
ThelatestSeleniumtoolisWebDriver.

14)WhatarethedifferenttypesofDriversthat
WebDrivercontains?
ThesearethedifferentdriversavailableinWebDriver:
FirefoxDriver
InternetExplorerDriver
ChromeDriver
SafariDriver
OperaDriver
AndroidDriver
IPhoneDriver
HtmlUnitDriver

15)WhatisSeleniumGrid?
SeleniumGridfacilitatesyoutodistributeyourtestsonmultiple
machinesandallofthematthesametime.So,youcanexecute
tests on Internet Explorer on Windows and Safari on Mac

http://www.javatpoint.com/seleniuminterviewquestions

4/8

4/21/2016

SeleniumInterviewQuestionsjavatpoint

machine using the same text script. It reduces the time of test
executionandprovidesquickfeedback.

16)WheretheresultisseenofTestExecution
inSeleniumIDE?
The result of test execution is displayed in a Log Window in
SeleniumIDE.

17)CanyouedittestsinSeleniumIDE?
Yes,testsinSeleniumIDEcanbeedited.Therearetwowaysto
edittestsinSeleniumIDE.
ByTableviews
Lookingintothesourcecode

18)Canyouusehtmlidandnamewhileusing
SeleniumIDE?
Yes,YoucanusehtmlidandnameasitisavailableinSelenium
IDE.

19)WhataretheWebDriversupportedMobile
TestingDrivers?
WebDriversupported"mobiletestingdrivers"are:
AndroidDriver
IphoneDriver
OperaMobileDriver

20) What are the popular programming


languages supported by Selenium WebDriver
towriteTestCases?
JAVA
http://www.javatpoint.com/seleniuminterviewquestions

5/8

4/21/2016

SeleniumInterviewQuestionsjavatpoint

PHP
Python
C#
Ruby
Perl

21)Whatisthedifferencebetweenassertand
verifycommands?
Assert:Assertcommandchecksifthegivenconditionistrueor
false. If the condition is true, the program control will execute
thenextphaseoftesting,andiftheconditionisfalse,execution
willstopandnothingwillbeexecuted.
Verify: Verify command also checks if the given condition is
true or false. It doesn't halts program execution i.e. any failure
during verification would not stop the execution and all the test
phaseswouldbeexecuted.

22)Whatisthedifferencebetween"/"and"//"
inXpath?
Single Slash "/": Single slash is used to create Xpath with
absolutepath.
DoubleSlash"//": Double slash is used to create Xpath with
relativepath.

23)HowtotypeinatextboxusingSelenium?
Totypeinatextbox,weusesendKeys("Stringtobeentered")
toinsertstringinthetextbox.
Syntax:
1. WebElementusername=drv.findElement(By.id("Email"))
2. //enteringusername
3. username.sendKeys("sth")

http://www.javatpoint.com/seleniuminterviewquestions

6/8

4/21/2016

SeleniumInterviewQuestionsjavatpoint

24)WhatisJUnit?
JUnitisanopensourcetestingframeworkforjavaapplications.
ItisintroducedbyApache.

25) What are the four parameters that you


needtopassinSelenium?
ThefourparametersthatyouhavetopassinSeleniumare:
1. Host
2. PortNumber
3. Browser
4. URL

26) How can you "submit" a form using


Selenium?
1. WebElementel=driver.findElement(By.id("ElementID"))
2. el.submit()

27)Whatisthedifferencebetweenclose()and
quit()?
The close() method closes the current browser only whereas
quit()methodclosesallbrowsersopenedbyWebDriver.
Job/HR

Interview

Questions
PL/SQL

Interview

Questions
Interview

Questions
Oracle

Database

SQL

Interview

Questions
Interview

Questions
SQL Server Interview
Questions
Java Basics Interview
http://www.javatpoint.com/seleniuminterviewquestions

Android

Interview

Questions
MySQL

Interview

Questions
Java OOPs Interview
7/8

4/21/2016

SeleniumInterviewQuestionsjavatpoint

Questions
Java

Questions
Multithreading

Questions
Java

Collection

Interview

Questions
Spring

String

&

ExceptionQuestions

InterviewQuestions
Servlet

Java

JDBC

Interview

Questions
JSP

Interview

Questions
Interview

Questions

http://www.javatpoint.com/seleniuminterviewquestions

Hibernate

Interview

Questions

8/8

You might also like