1
BEST SELENIUM JOB INTERVIEW
QUESTIONS & ANSWERS
This article will be useful for all who are planning to get a testing or test
automation job. More than 100 most popular Questions & Answers from
Selenium Job Interviews have been compiled here.
1) What is Automation Testing?
Automation testing is a process in which software tools execute pre-scripted
tests on a software application before it is released into production. Special
software is used to control the test execution, actual outcomes and predicted
outcomes comparison, the test preconditions setting up, and other test control
and test reporting functions.
2) What are the main advantages of Automation Testing?
Regression testing coverage, test engineer productivity, consistency in testing,
test cases reusability, reduced software maintenance cost, increased test
effectiveness, reduction of the test interval, reducing human-generated errors.
3) So, what is Selenium?
Selenium is a robust test automation suite designed in a way to support and
encourage automation testing of functional aspects of web-based applications
and a wide range of browsers and platforms.
4) What are the main advantages of Selenium?
• Selenium is a free and open source. You don't need to spend any
licensing cost to use it.
• Cross Browser compatibility (Firefox, Chrome, Internet Explorer, Safari
etc.)
• Multiple programming languages (Java, C#, Ruby, Python, Pearl etc.)
support
• Compatibility with the main platform (Windows, Mac OS, Linux etc.)
• Huge amount user base and helping communities
,2
• Automation scripts creating ability for non-programmers as well as for
programmers
• Testing distribution support
• Regular and fresh repository developments
5) What Selenium components do you know?
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 provides the APIs for a variety of languages like
Java, .NET, PHP, etc. They work with most of the browsers.
• Grid: you can distribute tests on multiple machines so that test can be
run parallel which helps cutting down the time required for running test
suites in the browser.
6) How many types of Webdriver APIs are available in Selenium?
The list of driver classes could be used for the browser automation.
• AndroidDriver,
• ChromeDriver,
• EventFiringWebDriver,
• FirefoxDriver,
• HtmlUnitDriver,
• InternetExplorerDriver,
• iPhoneDriver,
• iPhoneSimulatorDriver,
• RemoteWebDriver
7) Does the Selenium have any limitations?
Selenium supports only web based applications testing. So, here are the
limitations of it:
• Mobile applications cannot be tested using Selenium
• Desktop applications cannot be tested using Selenium
• Captcha and Bar code readers cannot be tested using Selenium
• User should use third-party tools like TestNG or jUnit to write test scripts
and generate reports
,3
• Programming language knowledge is required to create robust scripts in
Selenium WebDriver
8) What is Selenium IDE?
Selenium IDE is a plug-in used to record and replay tests in Firefox browser.
Scripts may be automatically recorded and edited manually providing auto-
completion support and the ability to move commands around quickly.
9) What is Selenese?
Selenese is the language which is used to write test scripts in Selenium IDE.
10) What kinds of test types are supported by Selenium?
1. Functional Testing
2. Regression Testing
3. Sanity Testing
4. Smoke Testing
5. Responsive Testing
6. Cross Browser Testing
7. UI testing (black box)
8. Integration Testing
are supported by Selenium.
11) What are the different types of locators in Selenium?
The different types of locators in Selenium are ID, ClassName, Name,
TagName, LinkText, PartialLinkText, XPath, CSS Selector, DOM.
12) What automation tools could be used for post-release validation with
continuous integration?
Automation tools could be used for post-release validation with continuous
integration: CruiseCont, Hudson, Jenkins, Quick Build.
13) Explain the meaning of assertion in Selenium and what are the types of
assertion?
Assertion is used as a verification point. It verifies that the application state
conforms to the expectation. The types of assertion are “assert”, “verify” and
“waifFor”.
, 4
14) Explain the difference between assert and verify commands?
Both of them check if the given condition is true or false. Unlike to "assert",
"verify" will not stop the test case execution if the test case fail.
15) What is a XPath?
XPath is a language that describes a way to locate and process items in
Extensible Markup Language (XML) documents by using an addressing syntax
based on a path through the document's logical structure or hierarchy.
16) What is an Absolute XPath?
Absolute XPath is the direct way to find the element. It has a disadvantage.
XPath gets failed if there are any changes made in the path of the element.
html/body/div[3]/div/div[1]/div/div/div[1]/div/input - Absolute XPath
example.
17) What is a Relative XPath?
Relative XPath means that user can start from the middle of the HTML DOM
structure and no need to write long XPath. Example of Relative XPath -
//input[@id='email'].
18) What is the difference between single slash (/) and a double slash ( //) in
XPath?
A single slash (/) is used for creating XPaths with absolute paths beginning
from the root node.
Double slash (//) is used for creating relative XPath to start selection from
anywhere within the root node
19) How could the web element attributes be inspected in order to use them
in different locators?
Firebug is a Firefox plugin that provides various development tools for
debugging applications. From an automation perspective, Firebug is used
specifically for inspecting web-elements in order to use their attributes like id,
class, name etc. in different locators.
20) Give an example of the languages supported by WebDriver.
BEST SELENIUM JOB INTERVIEW
QUESTIONS & ANSWERS
This article will be useful for all who are planning to get a testing or test
automation job. More than 100 most popular Questions & Answers from
Selenium Job Interviews have been compiled here.
1) What is Automation Testing?
Automation testing is a process in which software tools execute pre-scripted
tests on a software application before it is released into production. Special
software is used to control the test execution, actual outcomes and predicted
outcomes comparison, the test preconditions setting up, and other test control
and test reporting functions.
2) What are the main advantages of Automation Testing?
Regression testing coverage, test engineer productivity, consistency in testing,
test cases reusability, reduced software maintenance cost, increased test
effectiveness, reduction of the test interval, reducing human-generated errors.
3) So, what is Selenium?
Selenium is a robust test automation suite designed in a way to support and
encourage automation testing of functional aspects of web-based applications
and a wide range of browsers and platforms.
4) What are the main advantages of Selenium?
• Selenium is a free and open source. You don't need to spend any
licensing cost to use it.
• Cross Browser compatibility (Firefox, Chrome, Internet Explorer, Safari
etc.)
• Multiple programming languages (Java, C#, Ruby, Python, Pearl etc.)
support
• Compatibility with the main platform (Windows, Mac OS, Linux etc.)
• Huge amount user base and helping communities
,2
• Automation scripts creating ability for non-programmers as well as for
programmers
• Testing distribution support
• Regular and fresh repository developments
5) What Selenium components do you know?
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 provides the APIs for a variety of languages like
Java, .NET, PHP, etc. They work with most of the browsers.
• Grid: you can distribute tests on multiple machines so that test can be
run parallel which helps cutting down the time required for running test
suites in the browser.
6) How many types of Webdriver APIs are available in Selenium?
The list of driver classes could be used for the browser automation.
• AndroidDriver,
• ChromeDriver,
• EventFiringWebDriver,
• FirefoxDriver,
• HtmlUnitDriver,
• InternetExplorerDriver,
• iPhoneDriver,
• iPhoneSimulatorDriver,
• RemoteWebDriver
7) Does the Selenium have any limitations?
Selenium supports only web based applications testing. So, here are the
limitations of it:
• Mobile applications cannot be tested using Selenium
• Desktop applications cannot be tested using Selenium
• Captcha and Bar code readers cannot be tested using Selenium
• User should use third-party tools like TestNG or jUnit to write test scripts
and generate reports
,3
• Programming language knowledge is required to create robust scripts in
Selenium WebDriver
8) What is Selenium IDE?
Selenium IDE is a plug-in used to record and replay tests in Firefox browser.
Scripts may be automatically recorded and edited manually providing auto-
completion support and the ability to move commands around quickly.
9) What is Selenese?
Selenese is the language which is used to write test scripts in Selenium IDE.
10) What kinds of test types are supported by Selenium?
1. Functional Testing
2. Regression Testing
3. Sanity Testing
4. Smoke Testing
5. Responsive Testing
6. Cross Browser Testing
7. UI testing (black box)
8. Integration Testing
are supported by Selenium.
11) What are the different types of locators in Selenium?
The different types of locators in Selenium are ID, ClassName, Name,
TagName, LinkText, PartialLinkText, XPath, CSS Selector, DOM.
12) What automation tools could be used for post-release validation with
continuous integration?
Automation tools could be used for post-release validation with continuous
integration: CruiseCont, Hudson, Jenkins, Quick Build.
13) Explain the meaning of assertion in Selenium and what are the types of
assertion?
Assertion is used as a verification point. It verifies that the application state
conforms to the expectation. The types of assertion are “assert”, “verify” and
“waifFor”.
, 4
14) Explain the difference between assert and verify commands?
Both of them check if the given condition is true or false. Unlike to "assert",
"verify" will not stop the test case execution if the test case fail.
15) What is a XPath?
XPath is a language that describes a way to locate and process items in
Extensible Markup Language (XML) documents by using an addressing syntax
based on a path through the document's logical structure or hierarchy.
16) What is an Absolute XPath?
Absolute XPath is the direct way to find the element. It has a disadvantage.
XPath gets failed if there are any changes made in the path of the element.
html/body/div[3]/div/div[1]/div/div/div[1]/div/input - Absolute XPath
example.
17) What is a Relative XPath?
Relative XPath means that user can start from the middle of the HTML DOM
structure and no need to write long XPath. Example of Relative XPath -
//input[@id='email'].
18) What is the difference between single slash (/) and a double slash ( //) in
XPath?
A single slash (/) is used for creating XPaths with absolute paths beginning
from the root node.
Double slash (//) is used for creating relative XPath to start selection from
anywhere within the root node
19) How could the web element attributes be inspected in order to use them
in different locators?
Firebug is a Firefox plugin that provides various development tools for
debugging applications. From an automation perspective, Firebug is used
specifically for inspecting web-elements in order to use their attributes like id,
class, name etc. in different locators.
20) Give an example of the languages supported by WebDriver.