dridhOn

Top 20 Selenium Interview Questions

Top 20 Selenium Interview Questions

1) What is the difference between test automation and automated testing?
Automation testing uses automation technologies to write and execute test cases; there is no need for manual intervention while running an automated test suite. To build test scripts and test cases, testers prefer to use automation tools, which they then organize into test suites.

The use of specialized technologies to automate the execution of manually designed test cases without the need for human involvement is known as automation testing. Accessing test data, controlling test execution, and comparing the actual result to the predicted result are all capabilities of automation testing tools. As a result, detailed test reports of the system under test are generated.

 

2) What are the benefits of automating the testing process?

The following are some of the most basic advantages of automation testing.

On an application, automation testing provides both functional and performance tests.
It allows you to run test scenarios over and over again.
It makes parallel execution easier.
It makes it easier to test a huge test matrix.
It enhances accuracy by eliminating the possibility of human error.
It helps you save both time and money.

 

3) Identify some of the most commonly used Automation Testing tools for Functional Automation.

The following are the top ten most commonly used automation testing tools for Functional Automation.

Telerik Test Studio, Developed by Teleric.
TestingWhiz
HPE Unified Functional Testing (HP - UFT formerly QTP)
Tosca Testsuite
Water
Quick Test Professional, provided by HP.
Rational Robot, provided by IBM.
Coded UI, provided by Microsoft.
Selenium, open source.
Auto It, Open Source.

 

4) Identify some of the most commonly used Automation Testing tools for Non-Functional Automation.

The following are some of the most often used Automation Testing tools for Non-Functional Automation.

HP provides the Load Runner, while Apache provides JMeter.
PortSwigger provides Burp Suite.
Acunetix is a service offered by Acunetix.

 

5) What is Selenium, and what does it do?

Selenium is a lightweight software testing framework. The Selenium tool comes with a replay tool that allows you to create functional tests without having to learn a test scripting language.

Selenium is a popular open source Web UI (User Interface) automation testing framework. Selenium was created by Jason Huggins in 2004 as an internal tool at Thought Works. Selenium is a browser automation framework that works with a variety of browsers, platforms, and computer languages.

 

6) What are the different Selenium components?

Selenium is a software suite, not just a single tool, with each offering a unique method for automating testing. It is made up of four major components, which are as follows:

Integrated Development Environment for Selenium (IDE)
WebDriver Selenium Grid

 

7) Selenium Remote Control (Now Deprecated) List all of the programming languages, browsers, and operating systems that Selenium supports.

Selenium is compatible with a wide range of operating systems, browsers, and computer languages. The list is as follows:

C#, Java, Python, PHP, Ruby, Perl, and JavaScript are examples of programming languages.
Android, iOS, Windows, Linux, Mac, and Solaris are some of the operating systems available.
Google Chrome, Mozilla Firefox, Internet Explorer, Edge, Opera, Safari, and others are examples of browsers.

 

8) What are the major differences/upgrades between Selenium versions?

Selenium v1.0 is a version of the mineral selenium.

Selenium was first released in version 1.0.
Selenium IDE, Selenium RC, and Selenium Grid were among the tools offered.
v2.0 of Selenium:

In version "2.0," Selenium WebDriver was launched to replace Selenium RC.
RC was deprecated and moved to the legacy package with the introduction of WebDriver.
Selenium v3 is a new version of the mineral selenium.

Selenium 3 has been updated with new features and functionalities.
Selenium IDE, Selenium WebDriver, and Selenium Grid are all included.

 

9) Describe some of the test types that Selenium supports.
Selenium may be used for several different forms of testing.

Functional Testing
Regression Testing
Sanity Testing
Smoke Testing
Responsive Testing
Cross Browser Testing
UI testing (black box)
Integration Testing

 

10) What is Selenium IDE, and how does it work?

Selenium IDE is a Firefox extension that allows you to record and playback test scripts. It allows testers to export recorded scripts in HTML, Java, Ruby, RSpec, Python, C#, JUnit, and TestNG, among other languages.

Selenium IDE has a limited scope, and the test scripts it generates aren't particularly robust or portable.

 

11) What exactly do you mean when you say Selenese?

Selenium commands, often known as "Selenese," are the commands that run your tests in Selenium. Command - open (URL), for example, opens the supplied URL in the specified browser and accepts both relative and absolute URLs.

A test script is made up of a series of Selenium instructions (Selenese).

 

12) In Selenium, what are the several methods for locating a web element?

Web elements are identified and located with the help of Locators in Selenium. Locators define a unique target location for a web element in the context of a web application. In Selenium, we have multiple sorts of locators to accurately and precisely identify web elements:

ID
ClassName
Name
TagName
link text
PartialLinkText
Xpath
CSS Selector
DOM

13) How many types of WebDriver APIs are available in Selenium?
The list of WebDriver APIs which are used to automate browsers include:

AndroidDriver
ChromeDriver
EventFiringWebDriver
FirefoxDriver
HtmlUnitDriver
InternetExplorerDriver
iPhone driver
iPhoneSimulatorDriver
RemoteWebDriver

 

14) Describe some automation technologies that could be used in conjunction with Selenium to achieve continuous testing.

Selenium may be used to automate functional tests and can be connected with continuous testing systems such as Maven, Jenkins, and Docker. It may also be used to manage test cases and generate reports using tools like TestNG and JUnit.

 

15) What does the assertion in Selenium mean?

As a verification point, the assertion is utilized. It confirms that the application's current status is as intended. "assert," "verify," and "waitFor" are the three sorts of assertions.

 

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

Assert: The assert command determines whether or not the provided condition is true. If the situation warrants,

If the condition is true, the program control will proceed to the next phase of testing; if it is false, execution will halt and nothing will be done.

Verify: The verify command also determines whether or not the provided condition is true. It does not halt program execution, i.e., if there is a failure during verification, the program will continue to run and all test phases will be completed. 

 

17) What exactly is XPath?

XML Path is another name for XPath. It's a query language for XML documents. It's a crucial method for locating items in Selenium. XPath is made up of a path expression and a set of conditions. We can easily construct an XPath script/query to locate any element on the page using this method. It was created to make navigating XML documents easier. Selecting individual elements, attributes, or some other component of an XML document for specific processing is one of the primary variables it considers while navigating. It also makes dependable locators. The following are some additional XPath considerations. 

XPath is a language used for locating nodes in XML documents.
XPath can be used as a substitute when you don't have a suitable id or name attribute for the element you want to locate.
XPath provides locating strategies like:
XPath Absolute
XPath Attributes

 

18) Describe the Absolute and XPath attributes in XPath.

Absolute XPath:

Users can use XPath Absolute to specify the entire XPath location, from the root HTML tag to specific items.
Syntax: /HTML/body/tag1[index]/tag2[index]/.../tagN[index]
/HTML/body/div[2]/div/div[2] as an example
/div/div/div/fieldset/form/div[1]/input[1]

Attributes in XPath:

When you don't have an appropriate id or name property for the element you wish to identify, XPath Attributes are always advised.
@attribute1='value1' and @attribute2='value2'] Syntax: /htmltag[@attribute1='value1' and @attribute2='value2']
/input[@id='passwd' and @placeholder='password'] as an example

 

19) In XPath, what is the difference between "/" and "/"?

"/" as a single slash: XPath with the absolute path is created with a single slash.

The double slash "//" is used to build an XPath with a relative path. 

 

20) What are the different types of annotations which are used in Selenium?

JUnit annotations that can be used are:

Test
Before
After
Ignore
BeforeClass
AfterClass
with

Follow Us on!

How can we help you?

To request a quote or want to meet up for a course discussion, contact us directly or fill out the form and we will get back to you promptly.