• +91 9723535972
  • info@interviewmaterial.com

Selenium Interview Questions and Answers

Selenium Interview Questions and Answers

Question - 1 : - What is Selenium and what is composed of?

Answer - 1 : -

Selenium is a suite of tools for automated web testing.  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 multiple machines so that test can be run parallel which helps in cutting down the time required for running in browser test suites

Question - 2 : - What is Selenium 2.0?

Answer - 2 : -

Web Testing tools Selenium RC and WebDriver are consolidated in single tool in Selenium 2.0

Question - 3 : - Mention what is Selenium 3.0?

Answer - 3 : -

Selenium 3.0 is the latest version of Selenium. It has released 2 beta versions of selenium 3.0 with few of the below changes:
Here are few new features added to Selenium 3.0

Beta 1 updates

Beta 2 updates (Only for Java)

  • System property webdriver.gecko.driver now forces the server in marionette or legacy firefox driver mode, ignoring any related Desired Capability
  • It will support for Firefox Via Mozilla’s geckodriver
  • Grid fixes NPE’s on registration when -browser not specified
  • Support for Edge is provided by MS
  • It now supports Safari on MacOS via Apple’s own Safari driver
  • Update GeckoDriver –port argument in all bindings

Question - 4 : - How will you find an element using Selenium?

Answer - 4 : -

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
  • Attribute
  • CSS
  • Linktext
  • PartialLink Text
  • Xpath etc

Question - 5 : - List out the test types that are supported by Selenium?

Answer - 5 : -

For web based application testing selenium can be used

The test types can be supported are

a) Functional, Learn More about Functional Testing.
b) Regression

For post release validation with continuous integration automation tool could be used

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

Question - 6 : - Explain what is assertion in Selenium and what are the types of assertion?

Answer - 6 : -

Assertion is used as a  verification point. It verifies that the state of the application conforms to what is expected.  The types of assertion are “assert” , “verify” and “waitFor”.

Question - 7 : - Mention what is the use of X-path?

Answer - 7 : -

X-Path is used to find the WebElement in web pages. It is also useful in identifying the dynamic elements.

Question - 8 : -
Explain the difference between single and double slash in X-path?

Answer - 8 : -

Single slash ‘/ ’

  • Single slash ( / ) start selection from the document node
  • It allows you to create ‘absolute’ path expressions
Double Slash ‘// ’

  • Double slash ( // ) start selection matching anywhere in the document
  • It enables to create ‘relative’ path expressions

Question - 9 : - List out the technical challenges with Selenium?

Answer - 9 : -

Technical challenges with Selenium are

Selenium supports only web based applications
It does not support the Bitmap comparison
For any reporting related capabilities 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

Question - 10 : - What is the difference between type keys and type commands ?

Answer - 10 : -

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


NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners