Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

Selenium automation testing interview questions and answers

Rating
-
Sold
-
Pages
41
Grade
A+
Uploaded on
20-01-2024
Written in
2023/2024

Selenium automation testing interview questions and answers Q #1) What is Automation Testing? Automation testing or Test Automation is a process of automating the manual process to test the application/system under test. Automation testing involves the use of a separate testing tool which lets you create test scripts which can be executed repeatedly and doesn’t require any manual intervention. Q #2) What are the benefits of Automation Testing? Benefits of Automation testing are: 1. Supports execution of repeated test cases 2. Aids in testing a large test matrix 3. Enables parallel execution 4. Encourages unattended execution 5. Improves accuracy thereby reducing human-generated errors 6. Saves time and money Q #3) Why should Selenium be selected as a test tool? Selenium 1. is a free and open source 2. have a large user base and helping communities 3. have cross Browser compatibility (Firefox, Chrome, Internet Explorer, Safari etc.) 4. have great platform compatibility (Windows, Mac OS, Linux etc.) 5. supports multiple programming languages (Java, C#, Ruby, Python, Pearl etc.) 6. has fresh and regular repository developments 7. supports distributed testing Q #4) What is Selenium? What are the different Selenium components? Selenium is one of the most popular automated testing suites. Selenium is 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. Due to its existence in the open source community, it has become one of the most accepted tools amongst the testing professionals. Selenium is not just a single tool or a utility, rather a package of several testing tools and for the same reason, it is referred to as a Suite. Each of these tools is designed to cater different testing and test environment requirements. The suite package constitutes the following sets of tools: • Selenium Integrated Development Environment (IDE) – Selenium IDE is a record and playback tool. It is distributed as a Firefox Plugin. • Selenium Remote Control (RC) – Selenium RC is a server that allows a user to create test scripts in the desired programming language. It also allows executing test scripts within the large spectrum of browsers. • Selenium WebDriver – WebDriver is a different tool altogether that has various advantages over Selenium RC. WebDriver directly communicates with the web browser and uses its native compatibility to automate. • Selenium Grid – Selenium Grid is used to distribute your test execution on multiple platforms and environments concurrently. Q #5) What are the testing types that can be supported by Selenium? Selenium supports the following types of testing:

Show more Read less
Institution
Course

Content preview

Selenium automation testing interview
questions and answers
Q #1) What is Automation Testing?
Automation testing or Test Automation is a process of automating the manual process to test the
application/system under test. Automation testing involves the use of a separate testing tool which lets
you create test scripts which can be executed repeatedly and doesn’t require any manual intervention.

Q #2) What are the benefits of Automation Testing?
Benefits of Automation testing are:

1. Supports execution of repeated test cases
2. Aids in testing a large test matrix
3. Enables parallel execution
4. Encourages unattended execution
5. Improves accuracy thereby reducing human-generated errors
6. Saves time and money
Q #3) Why should Selenium be selected as a test tool?
Selenium

1. is a free and open source
2. have a large user base and helping communities
3. have cross Browser compatibility (Firefox, Chrome, Internet Explorer, Safari etc.)
4. have great platform compatibility (Windows, Mac OS, Linux etc.)
5. supports multiple programming languages (Java, C#, Ruby, Python, Pearl etc.)
6. has fresh and regular repository developments
7. supports distributed testing
Q #4) What is Selenium? What are the different Selenium components?
Selenium is one of the most popular automated testing suites. Selenium is 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. Due to its existence in the open source community, it has become
one of the most accepted tools amongst the testing professionals.

Selenium is not just a single tool or a utility, rather a package of several testing tools and for the same
reason, it is referred to as a Suite. Each of these tools is designed to cater different testing and test
environment requirements.

The suite package constitutes the following sets of tools:

 Selenium Integrated Development Environment (IDE) – Selenium IDE is a record and
playback tool. It is distributed as a Firefox Plugin.
 Selenium Remote Control (RC) – Selenium RC is a server that allows a user to create test
scripts in the desired programming language. It also allows executing test scripts within the
large spectrum of browsers.
 Selenium WebDriver – WebDriver is a different tool altogether that has various advantages
over Selenium RC. WebDriver directly communicates with the web browser and uses its
native compatibility to automate.
 Selenium Grid – Selenium Grid is used to distribute your test execution on multiple platforms
and environments concurrently.
Q #5) What are the testing types that can be supported by Selenium?
Selenium supports the following types of testing:

1. Functional Testing

, 2. Regression Testing
Q #6) What are the limitations of Selenium?
Following are the limitations of Selenium:

 Selenium supports testing of only web-based applications
 Mobile applications cannot be tested using Selenium
 Captcha and Barcode readers cannot be tested using Selenium
 Reports can only be generated using third-party tools like TestNG or JUnit.
 As Selenium is a free tool, thus there is no ready vendor support through the user can find
numerous helping communities.
 The user is expected to possess prior programming language knowledge.
Q #7) What is the difference between Selenium IDE, Selenium RC, and WebDriver?
Feature Selenium IDE Selenium RC WebDriver

Browser Selenium IDE comes as a Selenium RC supports a varied WebDriver supports a varied
Compatibility Firefox plugin, thus it range of versions of Mozilla Firefox, range of versions of Mozilla
supports only Firefox Google Chrome, Internet Explorer Firefox, Google Chrome,
and Opera. Internet Explorer and Opera.
Also supports HtmlUnitDriver
which is a GUI less or headless
browser.

Record and Selenium IDE supports Selenium RC doesn't supports record WebDriver doesn't support
Playback record and playback feature and playback feature. record and playback feature

Server Requirement Selenium IDE doesn't require Selenium RC requires server to be WebDriver doesn't require any
any server to be started started before executing the test server to be started before
before executing the test scripts. executing the test scripts
scripts

Architecture Selenium IDE is a Javascript Selenium RC is a JavaScript based WebDriver uses the browser's
based framework Framework. native compatibility to
automation

Object Oriented Selenium IDE is not an Selenium RC is semi object oriented WebDriver is a purely object
object oriented tool tool. oriented tool

Dynamic Finders Selenium IDE doesn't Selenium RC doesn't support WebDriver supports dynamic
(for locating web support dynamic finders dynamic finders. finders
elements on a
webpage)

Handling Alerts, Selenium IDE doesn't Selenium RC doesn't explicitly WebDriver offers a wide range
Navigations, explicitly provides aids to provides aids to handle alerts, of utilities and classes that helps
Dropdowns handle alerts, navigations, navigations, dropdowns. in handling alerts, navigations,
dropdowns and dropdowns efficiently and
effectively.

WAP Selenium IDE doesn't Selenium RC doesn't support testing WebDriver is designed in a way
(iPhone/Android) support testing of of iPhone/Android applications. to efficiently support testing of
Testing iPhone/Andriod applications iPhone/Android applications.
The tool comes with a large
range of drivers for WAP based
testing.
For example, AndroidDriver,
iPhoneDriver

Listener Support Selenium IDE doesn't Selenium RC doesn't support WebDriver supports the

,Feature Selenium IDE Selenium RC WebDriver

support listeners listeners. implementation of Listeners

Speed Selenium IDE is fast as it is Selenium RC is slower than WebDriver communicates
plugged in with the web- WebDriver as it doesn't directly with the web browsers.
browser that launches the communicates directly with the Thus making it much faster.
test. Thus, the IDE and browser; rather it sends selenese
browser communicates commands over to Selenium Core
directly which in turn communicates with the
browser.
Q #8) When should I use Selenium IDE?
Selenium IDE is the simplest and easiest of all the tools within the Selenium Package. Its record and
playback feature makes it exceptionally easy to learn with minimal acquaintances to any programming
language. Selenium IDE is an ideal tool for a naïve user.

Q #9) What is Selenese?
Selenese is the language which is used to write test scripts in Selenium IDE.

Q #10) What are the different types of locators in Selenium?
The locator can be termed as an address that identifies a web element uniquely within the webpage.
Thus, to identify web elements accurately and precisely we have different types of locators in
Selenium:
 ID
 ClassName
 Name
 TagName
 LinkText
 PartialLinkText
 Xpath
 CSS Selector
 DOM
Q #11) What is the difference between assert and verify commands?
Assert: Assert command checks whether the given condition is true or false. Let’s say we assert
whether the given element is present on the web page or not. If the condition is true then the program
control will execute the next test step but if the condition is false, the execution would stop and no
further test would be executed.
Verify: Verify command also checks whether the given condition is true or false. Irrespective of the
condition being true or false, the program execution doesn’t halt i.e. any failure during verification
would not stop the execution and all the test steps would be executed.
Q #12) What is an XPath?
XPath is used to locate a web element based on its XML path. XML stands for Extensible Markup
Language and is used to store, organize and transport arbitrary data. It stores data in a key-value pair
which is very much similar to HTML tags. Both being markup languages and since they fall under the
same umbrella, XPath can be used to locate HTML elements.
The fundamental behind locating elements using XPath is the traversing between various elements
across the entire page and thus enabling a user to find an element with the reference of another
element.

Q #13) What is the difference between “/” and “//” in Xpath?
Single Slash “/” – Single slash is used to create Xpath with absolute path i.e. the xpath would be
created to start selection from the document node/start node.
Double Slash “//” – Double slash is used to create Xpath with relative path i.e. the xpath would be
created to start selection from anywhere within the document.
Q #14) What is Same origin policy and how it can be handled?
The problem of same origin policy disallows to access the DOM of a document from an origin that is
different from the origin we are trying to access the document.

, Origin is a sequential combination of scheme, host, and port of the URL. For example, for a URL
https://www.softwaretestinghelp.com/resources/, the origin is a combination of http,
softwaretestinghelp.com, 80 correspondingly.

Thus the Selenium Core (JavaScript Program) cannot access the elements from an origin that is
different from where it was launched. For Example, if I have launched the JavaScript Program from
“https://www.softwaretestinghelp.com”, then I would be able to access the pages within the same
domain such as “https://www.softwaretestinghelp.com/resources” or
“https://www.softwaretestinghelp.com/istqb-free-updates/”. The other domains like google.com,
seleniumhq.org would no more be accessible.

So, In order to handle the same origin policy, Selenium Remote Control was introduced.
Q #15) When should I use Selenium Grid?
Selenium Grid can be used to execute same or different test scripts on multiple platforms and
browsers concurrently so as to achieve distributed test execution, testing under different environments
and saving execution time remarkably.
Q #16) What do we mean by Selenium 1 and Selenium 2?
Selenium RC and WebDriver, in a combination, are popularly known as Selenium 2. Selenium RC
alone is also referred to as Selenium 1.
Q #17) Which is the latest Selenium tool?
WebDriver

Q #18) How do I launch the browser using WebDriver?
The following syntax can be used to launch Browser:
WebDriver driver = new FirefoxDriver();
WebDriver driver = new ChromeDriver();
WebDriver driver = new InternetExplorerDriver();
Q #19) What are the different types of Drivers available in WebDriver?
The different drivers available in WebDriver are:

 FirefoxDriver
 InternetExplorerDriver
 ChromeDriver
 SafariDriver
 OperaDriver
 AndroidDriver
 IPhoneDriver
 HtmlUnitDriver
Q #20) What are the different types of waits available in WebDriver?
There are two types of waits available in WebDriver:
1. Implicit Wait
2. Explicit Wait
Implicit Wait: Implicit waits are used to provide a default waiting time (say 30 seconds) between each
consecutive test step/command across the entire test script. Thus, the subsequent test step would
only execute when the 30 seconds have elapsed after executing the previous test step/command.
Explicit Wait: Explicit waits are used to halt the execution till the time a particular condition is met or
the maximum time has elapsed. Unlike Implicit waits, explicit waits are applied for a particular
instance only.
Q #21) How to type in a textbox using Selenium?
The user can use sendKeys(“String to be entered”) to enter the string in the textbox.

Syntax:
WebElement username = drv.findElement(By.id(“Email”));
// entering username
username.sendKeys(“sth”);
Q #22) How can you find if an element in displayed on the screen?
WebDriver facilitates the user with the following methods to check the visibility of the web elements.
These web elements can be buttons, drop boxes, checkboxes, radio buttons, labels etc.

Written for

Course

Document information

Uploaded on
January 20, 2024
Number of pages
41
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
LectDeniz Teachme2-tutor
Follow You need to be logged in order to follow users or courses
Sold
21
Member since
2 year
Number of followers
13
Documents
4902
Last sold
6 months ago
Lect Deniz Academic Resources Hub

Lect Aziim is a highly experienced academic tutor and dedicated content creator with a strong track record of developing comprehensive, high-quality study materials for a wide range of university courses across the globe. With years of experience in higher education support, he excels at transforming complex academic concepts into clear, structured, and easy-to-follow resources that enhance student understanding and confidence. He provides an extensive collection of well-researched and carefully organized documents across key disciplines, including nursing, medicine, and various science fields. His materials cover essential topics such as anatomy, physiology, pharmacology, clinical practice, and core scientific principles, making them highly valuable for both coursework and intensive exam preparation. Each document is thoughtfully designed to align with university standards and curricula, ensuring accuracy, relevance, and practical application. Lect Aziim’s work stands out for its clarity, depth, and attention to detail, offering students concise summaries, detailed explanations, and exam-focused content that supports effective revision. His commitment to academic excellence and student success is reflected in the consistency and reliability of his materials, making him a trusted resource for learners seeking to improve performance and achieve their academic goals.

Read more Read less
5.0

1 reviews

5
1
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions