SlideShare a Scribd company logo
Syntax Technologies
Top 30 Selenium Interview Questions
While there are a number of Test Automation Tools available in the market, Selenium has emerged as one of the foremost Testing Tool of choice.
Consequently, Selenium related jobs have emerged as coveted spots within the tech industry and by emphasizing upon some of the most
significant Selenium Interview Questions, this guide will help you ace a Selenium Interview like a pro.
This blog has been carefully curated as a helpful guide covering some of the most important Selenium Automation Testing Interview Questions
which appear in interviews across companies. This list of Selenium Interview Question and Answers is by no means complete, but it does focus
on some of the most important areas that you should pay attention to as you prepare for your interview.
For the purpose of convenience, this blog has been divided into four parts and
covers the top 30 Selenium Interview Questions and Answers.
Interview Questions on Selenium: BASIC Level
Selenium Interview Questions: INTERMEDIATE Level
Selenium Interview Questions for Experienced: ADVANCED Level
Selenium Webdriver Interview Questions
Conclusion
Interview Questions on Selenium: BASIC Level
1. What are the different Selenium Suite Components?
The Selenium Automation software is not a single tool, but a suite of software, each of which serves a specific set of testing purpose for
the organization. The tools are:
 Selenium Integrated Development Environment (Selenium IDE)
It works as a Firefox plug-in which can be used to record and execute test cases. It was primarily created to accelerate the production of
automation scripts
 Selenium Remote Control (Selenium RC)
It was the first flagship testing tool which allowed users to write test cases in the preferred language of the user. It provides for cross-
browser testing as well as data-driven testing.
 Selenium WebDriver
It was created by Simon Stewart in 2006, as a solution to the shortcomings of Selenium RC. It provides an interface for creation as well as
execution of test cases and it is possible to identify web page elements through the test cases and take appropriate action.
 Selenium Grid
It makes use of the Hub-Node design which helps in simultaneous execution of more than one test case on different machines which happen to
be remotely located. There is one master system which is the hub and it controls the other child systems which are the nodes.
2. Why should you use Selenium? What are its advantages?
 Open-source and free
 Supports test scripts in different programming languages
 Provides for execution of test cases on multiple browsers and more than one operating systems
 Facilitates parallel testing and has a huge community support
 Provides for integration with JUnit and TestNG
 Allows for Continuous Testing through integration of Selenium with Maven, Jenkins and Docker
3. What is the difference between Selenium 2.0 and Selenium 3.0?
Selenium 2.0 provided for the merger of the Selenium Webdriver project with the original Selenium Project. Ever since so, Selenium RC got
disapproved of, but was still used for backward compatibility.
Selenium 3.0 is held to be the extended version of Selenium 2.0. It is backward compatible, does not include Selenium RC and is inherently stable
with several bug fixes.
4. What is Selenese? What are its types?
Selenese refers to Selenium commands which act as instructions for executing the test cases. A test script can be seen as a sequential
collection of these Selenese commands.
There are three types of Selenese:
 Actions: These commands are used for conducting operations on and interacting directly with the target elements.
 Accessors: This command helps in storing values in a variable.
 Assertions: These commands act as checkpoints for keeping track of the sequential execution of commands.
5. What is the Same-Origin Policy? How was it resolved?
The Same-Origin Policy prohibited access to web elements from a domain which was different from the one where the JavaScript was
launched. A web browser allowed scripts from a particular webpage to access content of another webpage provided both the pages came
from the same domain.
The problem posed by the same-origin policy was sought to be rectified through the introduction of Selenium RC. It did seek to resolve the
issue by including a HTTP proxy server which could deceive the browser into believing that the web application and the test script came from
the same source.
6. What are the different test types supported by Selenium?
The different test types supported by Selenium are:
 Functional Testing
This kind of testing is conducted in order to determine whether an application functions as per the requirements of the project.
Generally, it involves black box testing and does not concern itself with the source of the code.
 Regression Testing
It involves selection (full or partial) of already executed test cases in order to get them re-executed for evaluating the performance of
existing functionalities.
7. What is the difference between Verify and Assert Commands?
 Verify
This command is used to check whether an element is on a page. It is used to specify whether a condition is true or false. If the
element is not there, the test will keep on executing. Even if any of test fails, the rest of the commands will continue to run.
 Assert
This command is used to check whether an element is on the page or not. If the asserted element is not present, then the test will
stop and will not continue further.
8. What is the difference between single slash and double slash in XPath in Selenium?
 Single Slash (/)
 It helps in starting the selection from the document or the start node
 It allows the user to create Absolute expressions in XPath Selenium
 Double Slash (//)
 It helps in starting the selection from anywhere in the document
 It allows the user to create Relative expressions in XPath Selenium
9. What is a locator? How will you locate an element in Selenium?
Locators in Selenium act as means for finding and matching elements on a webpage with which the user needs to interact with.
Depending on the type of element which needs to be located, there are different types of locators present.
 Name
 ID
 Partial Link
 Class
 XPath
 Link Text
 CSS Selector
10. What are the technical limitations of Selenium?
 It can only be used to test web applications and is not suitable for testing mobile or desktop software applications
 It cannot acquire access to web elements detected to be outside the web application which is under test
 There is no assured user support, apart from customer communities
 It cannot be used for image testing or data-driven testing independently
 It requires prior knowledge of programming language to write tests
 Selenium cannot be used to test Captcha and barcode readers
11. What is the Page Object Model (POM)? What are its advantages?
POM can be understood as a design pattern which helps in creating object repositories for the web UI elements. The web pages of
applications have corresponding page classes which help in locating web elements and undertaking actions on them.
Advantages:
 The same object repository can be used in multiple tests, as the repository itself is independent of test cases
 It helps in providing for code readability, as it supports separate flows and operations on the UI from verification
 It also enhances the reusability of the code
Selenium Interview Questions: INTERMEDIATE Level
12. What are the different types of annotations used in Selenium?
Java facilitates the addition of a special form of syntactic metadata to the Java source code, which are known as annotations. It provides for
the annotation of parameters, methods, variables, classes and packages. Some of these JUnit annotations are:
 Test
 Before
 After
 BeforeClass
 AfterClass
 Ignore
 RunWith
13. Can you automate Captcha?
Selenium cannot be used to automate Captcha. This is quite logical because the whole idea behind Captcha is to prevent automated
program and bots from acquiring access to sensitive information. The Captcha needs to be manually typed by the tester or the test
engineer in order to carry on the execution of the test suite.
14. What are the advantages of Selenium over QTP?
 Selenium is distributed as an open-source, free Automation Tool; while QTP is commercialized and is distributed as a licensed, profitable tool
 Selenium supports multiple programming languages; QTP supports only VBScript
 Selenium supports multiple browsers as well as different operating systems; QTP supports only Firefox, Internet Explorer and Chrome, and the
Windows operating system
 While Selenium is specifically used for testing web-based applications; QTP can be used for testing client-server applications too
15. What are Breakpoints and Start points in Selenium?
 Breakpoints
These are used to stall the flow of execution of the test cases. When Breakpoint is implemented, the execution stops right there. This
also helps in ascertaining that the code is working properly.
 Start points
This refers to the point from where the execution of test suite should begin. This is invoked when the tester wants to execute the test
script from the middle of a code or after a breakpoint.
16. What is the difference between setSpeed() and sleep() methods?
Both these methods are used to delay the speed of execution.
 setSpeed()
This command is used to stop the execution of every Selenium command for a specific amount of time. Each command after the
setSpeed delay is executed with a delay of milliseconds as mentioned in setSpeed.
 Thread.sleep()
This command suspends the execution of the current thread for a specified amount of time. It can be invoked only once. It takes a
single argument in integer format.
17. What is the difference between getwindowhandles() and getwindowhandle()?
 getwindowhandles()
It is used to get the address of all the open browser and its return type is Set<String>
 getwindowhandle()
It is used to get the address of the current browser where the control is and its return type is a string data type.
18. What are the different types of frameworks?
The different types of frameworks are:
 Data-Driven Testing Framework
This framework assists us in separating the test data from the test script logic. The test data is stored in an external database like XML, excel,
CSV and so on. The data is stored in “key-value” pairs and they depend on the verification and input values maintained using the variables.
 Keyword-Driven Testing Framework
This framework is often considered to be an extension of the previous one. It not only provides for the separation of the test data from the
test scripts, but also retains a certain set of codes belonging to the test script in an external data file. The keywords and data tables are
developed independently of the automation test cases.
 Behavior Driven Testing Framework
This framework provides for the automation of functional validations in the test script for ensuring understanding, reliability and readability
for Business Analysts, Testers and Developers.
 Module-Based Testing Framework
This framework helps in dissociating the Application Under Test (AUT) into isolated and logical modules. Independent and separate test
scripts are created for each module and taken together they help in building a larger test script which represents more than one module.
 Library Architecture Testing Framework
This framework helps in segregating the application into common functions which can be used by other parts of the application as well.
This helps in creating a common library which constitutes common functions for AUT.
 Hybrid Testing Framework
It is a combination of more than one of the above mentioned frameworks. The advantage is that it helps in deriving the benefits of all
the associated frameworks.
Selenium Interview Questions for Experienced: ADVANCED Level
19. How will you launch different browsers in Selenium?
It will require the creation of a driver instance for a particular browser which we need to work upon. The following syntax can then be used
to launch the browser corresponding to the operating system of the system.
 WebDriver driver = new ChromeDriver()
 WebDriver driver = new FirefoxDriver()
 WebDriver driver = new InternetExplorerDriver()
In these cases, WebDriver acts as the interface wherein Chrome, Firefox and all other browser driver implementations are made.
20. Why do you need Session Handling in Selenium?
Session handling helps in establishing the communication between the browser and the application which is running the commands. The
need for session handling comes from the very fact that during the process of test execution, the WebDriver needs to continuously interact
with the browser for executing the commands. There may arise an issue that in the process of running a particular test script and before the
current execution gets completed; someone might start the execution of another test script in the same machine with the same type of
browser. In order to avoid such a situation, we need Session Handling in Selenium.
21. What are the advantages and disadvantages of Selenium RC?
 Advantages:
 It supports cross-browser testing, user preferred language and data driven testing
 Supports conditional operations and iterations as well as new browsers
 The execution speed is greater than Selenium IDE
 Dynamic objects and Ajax based UI elements can be handled
 Data can be read or write to or from .xlsx, .csv, .txt, and so on
 Disadvantages
 It involves a complicated installation procedure as compared to Selenium IDE
 Prior knowledge of programming language is needed
 Execution speed is slow as compared to Selenium WebDriver
 API contains vague commands
 Anything outside the browser is also restricted to access in the test scenario execution
22. Which language is more preferred for writing test suites in Selenium?
While Selenium does allow the writing of test scripts in multiple languages; the most preferred language is Python over Java.
 Python programs run faster as compared to Java programs
 The complexity and implementation of both are different and Python works quite well
 Java is statically typed, while Python is dynamically typed
 Python is far compact and simpler to write test cases when compared to Java
23. How does Selenium Grid work?
Selenium Grid operates by creating test suites which functions by forwarding test cases to the hub, from where the cases are redirected to
the Selenium WebDriver. The WebDriver is then responsible for executing the cases in the browser. The test suite does allow for parallel
testing.
24. What are the different navigation commands in Selenium?
The different navigation commands in Selenium are as follows:
 navigate().refresh()
This command helps the user to refresh the current webpage by reloading all the web elements
 navigate().back()
This command operates as a Back Button. It takes the user back to the last used or previous webpage as per the user history
 navigate().to()
This command takes the user to a new page in a new window, depending on the URL mentioned in the command
 navigate().forward()
This command operates as a Forward Button. It takes the user back to the next webpage as per the user history
Selenium Webdriver Interview Questions
25. What are the limitations of Selenium WebDriver?
Limitations:
 Selenium WebDriver entails prior knowledge of programming language
 Does not immediately support new browsers and there is no procedure to track runtime messages
 Selenium WebDriver does not allow for image testing
 Not compatible to test mobile or desktop or windows applications
 There is built-in reporting option and it needs to be integrated with other tools in order to obtain the reports
 There is no vendor support since it is open source
26. What are the challenges in handling Ajax call in Selenium WebDriver?
Challenges:
 It is difficult to evaluate the risks associated with particular Ajax applications
 The pause command is one of the options for handling Ajax calls, but it is not completely reliable. Long pause time only results in
increasing the testing time and makes the test unacceptably slow. It is recommended that the “waitforcondition” will be more useful in
testing Ajax applications
 Serialization and Encoding in the Ajax applications make it difficult in developing automation test scenarios
27. How can you handle colors in Selenium WebDriver?
In order to handle colors in WebDriver, you can use
getCssValue(arg0) function to get the colors by sending ‘color’ string as an argument.
28. What are the different types of Exceptions in Selenium WebDriver?
The different kinds of exceptions in Selenium WebDriver are:
 ElementNotVisibleException
This exception occurs when an element is present in the DOM (Document Object Model), but is not visible on the webpage
 TimeOut Exception
This exception occurs when a particular operation cannot be completed within a stipulated or specified time
 StaleElement Exception
This exception occurs when an element is no longer present or is deleted in the DOM (Document Object Model). Users tend to face this
exception when the element that they are interacting with is either recreated or destroyed again
 NoSuchElement Exception
This exception occurs when an element in the given set of attributes is not present in the webpage
29. What are the different types of waits supported by Selenium WebDriver?
These are:
 Implicit Wait
These waits are used to set a default waiting time between the consecutive steps across the entire test script. A particular test step will
only be executed after the specified time has elapsed, post the execution of the previous step.
 Explicit Wait
These waits are used to halt the execution of a test until the maximum time has elapsed or a particular condition is met.
30. How do you find broken links in Selenium WebDriver?
Detection of broken links can be made in the following manner:
 You need to gather all the links present on a webpage through the <a> anchor tag. For each of the <a> tag, you will be required to use the
attribute ‘href’ value to obtain the hyperlink
 Next you would have to send HTTP requests for each link and correspondingly verify the HTTP response code
 On the basis of the HTTP response code, you will be able to determine if the link is broken or valid. Then, you can use the driver.get()
method to navigate to a URL which should respond with a 200-OK status if the link is working. In case you get other statuses, it indicates that
the link is broken
 200 – Valid Link
 404 – Link Not Found
 400 – Bad Request
 401 – Unauthorized
 500 – Internal Error
You can repeat the process for all the links gathered
Conclusion
The list of possible Selenium Automated Testing Interview Questions mentioned above is certainly by no means exhaustive. As an aspiring
candidate seeking to get through a Selenium Interview, you might happen to face numerous other Selenium tricky Interview Questions. However,
this blog has sought to give you a fair idea of the most important topics which you should certainly be well versed with, when it comes to this
Automation Testing Tool.
Ad

Recommended

Selenium interview-questions-freshers
Selenium interview-questions-freshers
Naga Mani
 
Selenium Webdriver Interview Questions
Selenium Webdriver Interview Questions
Jai Singh
 
Interview Question & Answers for Selenium Freshers | LearningSlot
Interview Question & Answers for Selenium Freshers | LearningSlot
Learning Slot
 
Top 21 Selenium FAQs.pdf
Top 21 Selenium FAQs.pdf
AnanthReddy38
 
Selenium Automation Testing Interview Questions And Answers
Selenium Automation Testing Interview Questions And Answers
Ajit Jadhav
 
Selenium interview Q&A
Selenium interview Q&A
Pavan Kumar
 
Top 25 Selenium Interview Questions and Answers 2018
Top 25 Selenium Interview Questions and Answers 2018
Testbytes
 
25 Top Selenium Interview Questions and Answers for 2023.pdf
25 Top Selenium Interview Questions and Answers for 2023.pdf
AnanthReddy38
 
Interview question & Answers for 3+ years experienced in Selenium | LearningSlot
Interview question & Answers for 3+ years experienced in Selenium | LearningSlot
Learning Slot
 
Selenium
Selenium
mdfkhan625
 
Selenium webdriver interview questions and answers
Selenium webdriver interview questions and answers
ITeLearn
 
Automation Testing
Automation Testing
AbdulImrankhan7
 
Selenium
Selenium
eduquer
 
Seleniuminterviewquestions
Seleniuminterviewquestions
laxmiraj01
 
Selenium interview questions
Selenium interview questions
girichinna27
 
Selenium introduction and some feautures
Selenium introduction and some feautures
zahid32
 
Selenium Basics by Quontra Solutions
Selenium Basics by Quontra Solutions
QUONTRASOLUTIONS
 
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...
Simplilearn
 
Introduction to selenium
Introduction to selenium
Khaja Moiz Uddin
 
Introduction to selenium
Introduction to selenium
Khaja Moiz Uddin
 
What is selenium
What is selenium
Pesara Swamy
 
What is selenium
What is selenium
sachin patil
 
selenium-webdriver-interview-questions.pdf
selenium-webdriver-interview-questions.pdf
AnuragMourya8
 
Basics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote Control
usha kannappan
 
Test automation using selenium presented by Quontra Solutions
Test automation using selenium presented by Quontra Solutions
QUONTRASOLUTIONS
 
Selenium ppt
Selenium ppt
Aneesh Rangarajan
 
Selenium interview questions and answers
Selenium interview questions and answers
kavinilavuG
 
Selenium ide material (1)
Selenium ide material (1)
Sriram Angajala
 
Benefits of Automation Testing Courses: 10 Reasons Why You Should Automate
Benefits of Automation Testing Courses: 10 Reasons Why You Should Automate
Syntax Technologies
 
Selenium Automation Testing: A Step-by-Step Beginner's Guide
Selenium Automation Testing: A Step-by-Step Beginner's Guide
Syntax Technologies
 

More Related Content

Similar to Top 30 Selenium Interview Questions.pptx (20)

Interview question & Answers for 3+ years experienced in Selenium | LearningSlot
Interview question & Answers for 3+ years experienced in Selenium | LearningSlot
Learning Slot
 
Selenium
Selenium
mdfkhan625
 
Selenium webdriver interview questions and answers
Selenium webdriver interview questions and answers
ITeLearn
 
Automation Testing
Automation Testing
AbdulImrankhan7
 
Selenium
Selenium
eduquer
 
Seleniuminterviewquestions
Seleniuminterviewquestions
laxmiraj01
 
Selenium interview questions
Selenium interview questions
girichinna27
 
Selenium introduction and some feautures
Selenium introduction and some feautures
zahid32
 
Selenium Basics by Quontra Solutions
Selenium Basics by Quontra Solutions
QUONTRASOLUTIONS
 
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...
Simplilearn
 
Introduction to selenium
Introduction to selenium
Khaja Moiz Uddin
 
Introduction to selenium
Introduction to selenium
Khaja Moiz Uddin
 
What is selenium
What is selenium
Pesara Swamy
 
What is selenium
What is selenium
sachin patil
 
selenium-webdriver-interview-questions.pdf
selenium-webdriver-interview-questions.pdf
AnuragMourya8
 
Basics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote Control
usha kannappan
 
Test automation using selenium presented by Quontra Solutions
Test automation using selenium presented by Quontra Solutions
QUONTRASOLUTIONS
 
Selenium ppt
Selenium ppt
Aneesh Rangarajan
 
Selenium interview questions and answers
Selenium interview questions and answers
kavinilavuG
 
Selenium ide material (1)
Selenium ide material (1)
Sriram Angajala
 
Interview question & Answers for 3+ years experienced in Selenium | LearningSlot
Interview question & Answers for 3+ years experienced in Selenium | LearningSlot
Learning Slot
 
Selenium webdriver interview questions and answers
Selenium webdriver interview questions and answers
ITeLearn
 
Selenium
Selenium
eduquer
 
Seleniuminterviewquestions
Seleniuminterviewquestions
laxmiraj01
 
Selenium interview questions
Selenium interview questions
girichinna27
 
Selenium introduction and some feautures
Selenium introduction and some feautures
zahid32
 
Selenium Basics by Quontra Solutions
Selenium Basics by Quontra Solutions
QUONTRASOLUTIONS
 
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...
Simplilearn
 
selenium-webdriver-interview-questions.pdf
selenium-webdriver-interview-questions.pdf
AnuragMourya8
 
Basics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote Control
usha kannappan
 
Test automation using selenium presented by Quontra Solutions
Test automation using selenium presented by Quontra Solutions
QUONTRASOLUTIONS
 
Selenium interview questions and answers
Selenium interview questions and answers
kavinilavuG
 
Selenium ide material (1)
Selenium ide material (1)
Sriram Angajala
 

More from Syntax Technologies (20)

Benefits of Automation Testing Courses: 10 Reasons Why You Should Automate
Benefits of Automation Testing Courses: 10 Reasons Why You Should Automate
Syntax Technologies
 
Selenium Automation Testing: A Step-by-Step Beginner's Guide
Selenium Automation Testing: A Step-by-Step Beginner's Guide
Syntax Technologies
 
The Top 10 Software Testing Certification Courses For 2020: A Useful Guide
The Top 10 Software Testing Certification Courses For 2020: A Useful Guide
Syntax Technologies
 
How to Become a Test Automation Engineer: Myths, Plans, and Strategies
How to Become a Test Automation Engineer: Myths, Plans, and Strategies
Syntax Technologies
 
The Ultimate Guide to Automation Testing
The Ultimate Guide to Automation Testing
Syntax Technologies
 
Understanding the Roles and Responsibilities of the SDET: A Professional Posi...
Understanding the Roles and Responsibilities of the SDET: A Professional Posi...
Syntax Technologies
 
How are algorithms and data structures helpful to SDETs?
How are algorithms and data structures helpful to SDETs?
Syntax Technologies
 
Top 25 Tricky Interview Questions for Selenium
Top 25 Tricky Interview Questions for Selenium
Syntax Technologies
 
Everything you need to know about Selenium Grid, a component of the Selenium ...
Everything you need to know about Selenium Grid, a component of the Selenium ...
Syntax Technologies
 
Comparing SDET and QA: Examining the Software Testing Domain
Comparing SDET and QA: Examining the Software Testing Domain
Syntax Technologies
 
Understanding the Roles and Responsibilities of the SDET: A Professional Posi...
Understanding the Roles and Responsibilities of the SDET: A Professional Posi...
Syntax Technologies
 
What is Automation Testing?
What is Automation Testing?
Syntax Technologies
 
Who Are QA Automation Engineers and What Is QA Automation?
Who Are QA Automation Engineers and What Is QA Automation?
Syntax Technologies
 
Everything you need to know about ensuring quality in software testing, inclu...
Everything you need to know about ensuring quality in software testing, inclu...
Syntax Technologies
 
Trends in Software Testing to Watch for in 2022
Trends in Software Testing to Watch for in 2022
Syntax Technologies
 
Who Are QA Automation Engineers and What Is QA Automation
Who Are QA Automation Engineers and What Is QA Automation
Syntax Technologies
 
Discover How to Become a QA Tester
Discover How to Become a QA Tester
Syntax Technologies
 
How to Become a Software Tester?: Let us Find Out
How to Become a Software Tester?: Let us Find Out
Syntax Technologies
 
Introduction to Selenium Testing: What Is Selenium?
Introduction to Selenium Testing: What Is Selenium?
Syntax Technologies
 
Top 30 Automation Testing Interview Questions
Top 30 Automation Testing Interview Questions
Syntax Technologies
 
Benefits of Automation Testing Courses: 10 Reasons Why You Should Automate
Benefits of Automation Testing Courses: 10 Reasons Why You Should Automate
Syntax Technologies
 
Selenium Automation Testing: A Step-by-Step Beginner's Guide
Selenium Automation Testing: A Step-by-Step Beginner's Guide
Syntax Technologies
 
The Top 10 Software Testing Certification Courses For 2020: A Useful Guide
The Top 10 Software Testing Certification Courses For 2020: A Useful Guide
Syntax Technologies
 
How to Become a Test Automation Engineer: Myths, Plans, and Strategies
How to Become a Test Automation Engineer: Myths, Plans, and Strategies
Syntax Technologies
 
The Ultimate Guide to Automation Testing
The Ultimate Guide to Automation Testing
Syntax Technologies
 
Understanding the Roles and Responsibilities of the SDET: A Professional Posi...
Understanding the Roles and Responsibilities of the SDET: A Professional Posi...
Syntax Technologies
 
How are algorithms and data structures helpful to SDETs?
How are algorithms and data structures helpful to SDETs?
Syntax Technologies
 
Top 25 Tricky Interview Questions for Selenium
Top 25 Tricky Interview Questions for Selenium
Syntax Technologies
 
Everything you need to know about Selenium Grid, a component of the Selenium ...
Everything you need to know about Selenium Grid, a component of the Selenium ...
Syntax Technologies
 
Comparing SDET and QA: Examining the Software Testing Domain
Comparing SDET and QA: Examining the Software Testing Domain
Syntax Technologies
 
Understanding the Roles and Responsibilities of the SDET: A Professional Posi...
Understanding the Roles and Responsibilities of the SDET: A Professional Posi...
Syntax Technologies
 
Who Are QA Automation Engineers and What Is QA Automation?
Who Are QA Automation Engineers and What Is QA Automation?
Syntax Technologies
 
Everything you need to know about ensuring quality in software testing, inclu...
Everything you need to know about ensuring quality in software testing, inclu...
Syntax Technologies
 
Trends in Software Testing to Watch for in 2022
Trends in Software Testing to Watch for in 2022
Syntax Technologies
 
Who Are QA Automation Engineers and What Is QA Automation
Who Are QA Automation Engineers and What Is QA Automation
Syntax Technologies
 
Discover How to Become a QA Tester
Discover How to Become a QA Tester
Syntax Technologies
 
How to Become a Software Tester?: Let us Find Out
How to Become a Software Tester?: Let us Find Out
Syntax Technologies
 
Introduction to Selenium Testing: What Is Selenium?
Introduction to Selenium Testing: What Is Selenium?
Syntax Technologies
 
Top 30 Automation Testing Interview Questions
Top 30 Automation Testing Interview Questions
Syntax Technologies
 
Ad

Recently uploaded (20)

2025 June Year 9 Presentation: Subject selection.pptx
2025 June Year 9 Presentation: Subject selection.pptx
mansk2
 
LAZY SUNDAY QUIZ "A GENERAL QUIZ" JUNE 2025 SMC QUIZ CLUB, SILCHAR MEDICAL CO...
LAZY SUNDAY QUIZ "A GENERAL QUIZ" JUNE 2025 SMC QUIZ CLUB, SILCHAR MEDICAL CO...
Ultimatewinner0342
 
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
Kweku Zurek
 
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
Ronisha Das
 
VCE Literature Section A Exam Response Guide
VCE Literature Section A Exam Response Guide
jpinnuck
 
NSUMD_M1 Library Orientation_June 11, 2025.pptx
NSUMD_M1 Library Orientation_June 11, 2025.pptx
Julie Sarpy
 
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
 
How payment terms are configured in Odoo 18
How payment terms are configured in Odoo 18
Celine George
 
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
ErlizaRosete
 
Birnagar High School Platinum Jubilee Quiz.pptx
Birnagar High School Platinum Jubilee Quiz.pptx
Sourav Kr Podder
 
How to use _name_search() method in Odoo 18
How to use _name_search() method in Odoo 18
Celine George
 
Gladiolous Cultivation practices by AKL.pdf
Gladiolous Cultivation practices by AKL.pdf
kushallamichhame
 
Q1_TLE 8_Week 1- Day 1 tools and equipment
Q1_TLE 8_Week 1- Day 1 tools and equipment
clairenotado3
 
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
trjnesjnqg7801
 
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
parmarjuli1412
 
Photo chemistry Power Point Presentation
Photo chemistry Power Point Presentation
mprpgcwa2024
 
K12 Tableau User Group virtual event June 18, 2025
K12 Tableau User Group virtual event June 18, 2025
dogden2
 
How to Manage Different Customer Addresses in Odoo 18 Accounting
How to Manage Different Customer Addresses in Odoo 18 Accounting
Celine George
 
How to Customize Quotation Layouts in Odoo 18
How to Customize Quotation Layouts in Odoo 18
Celine George
 
Pests of Maize: An comprehensive overview.pptx
Pests of Maize: An comprehensive overview.pptx
Arshad Shaikh
 
2025 June Year 9 Presentation: Subject selection.pptx
2025 June Year 9 Presentation: Subject selection.pptx
mansk2
 
LAZY SUNDAY QUIZ "A GENERAL QUIZ" JUNE 2025 SMC QUIZ CLUB, SILCHAR MEDICAL CO...
LAZY SUNDAY QUIZ "A GENERAL QUIZ" JUNE 2025 SMC QUIZ CLUB, SILCHAR MEDICAL CO...
Ultimatewinner0342
 
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
Kweku Zurek
 
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
Ronisha Das
 
VCE Literature Section A Exam Response Guide
VCE Literature Section A Exam Response Guide
jpinnuck
 
NSUMD_M1 Library Orientation_June 11, 2025.pptx
NSUMD_M1 Library Orientation_June 11, 2025.pptx
Julie Sarpy
 
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
 
How payment terms are configured in Odoo 18
How payment terms are configured in Odoo 18
Celine George
 
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
ErlizaRosete
 
Birnagar High School Platinum Jubilee Quiz.pptx
Birnagar High School Platinum Jubilee Quiz.pptx
Sourav Kr Podder
 
How to use _name_search() method in Odoo 18
How to use _name_search() method in Odoo 18
Celine George
 
Gladiolous Cultivation practices by AKL.pdf
Gladiolous Cultivation practices by AKL.pdf
kushallamichhame
 
Q1_TLE 8_Week 1- Day 1 tools and equipment
Q1_TLE 8_Week 1- Day 1 tools and equipment
clairenotado3
 
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
trjnesjnqg7801
 
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
parmarjuli1412
 
Photo chemistry Power Point Presentation
Photo chemistry Power Point Presentation
mprpgcwa2024
 
K12 Tableau User Group virtual event June 18, 2025
K12 Tableau User Group virtual event June 18, 2025
dogden2
 
How to Manage Different Customer Addresses in Odoo 18 Accounting
How to Manage Different Customer Addresses in Odoo 18 Accounting
Celine George
 
How to Customize Quotation Layouts in Odoo 18
How to Customize Quotation Layouts in Odoo 18
Celine George
 
Pests of Maize: An comprehensive overview.pptx
Pests of Maize: An comprehensive overview.pptx
Arshad Shaikh
 
Ad

Top 30 Selenium Interview Questions.pptx

  • 1. Syntax Technologies Top 30 Selenium Interview Questions
  • 2. While there are a number of Test Automation Tools available in the market, Selenium has emerged as one of the foremost Testing Tool of choice. Consequently, Selenium related jobs have emerged as coveted spots within the tech industry and by emphasizing upon some of the most significant Selenium Interview Questions, this guide will help you ace a Selenium Interview like a pro. This blog has been carefully curated as a helpful guide covering some of the most important Selenium Automation Testing Interview Questions which appear in interviews across companies. This list of Selenium Interview Question and Answers is by no means complete, but it does focus on some of the most important areas that you should pay attention to as you prepare for your interview.
  • 3. For the purpose of convenience, this blog has been divided into four parts and covers the top 30 Selenium Interview Questions and Answers. Interview Questions on Selenium: BASIC Level Selenium Interview Questions: INTERMEDIATE Level Selenium Interview Questions for Experienced: ADVANCED Level Selenium Webdriver Interview Questions Conclusion
  • 4. Interview Questions on Selenium: BASIC Level 1. What are the different Selenium Suite Components? The Selenium Automation software is not a single tool, but a suite of software, each of which serves a specific set of testing purpose for the organization. The tools are:  Selenium Integrated Development Environment (Selenium IDE) It works as a Firefox plug-in which can be used to record and execute test cases. It was primarily created to accelerate the production of automation scripts  Selenium Remote Control (Selenium RC) It was the first flagship testing tool which allowed users to write test cases in the preferred language of the user. It provides for cross- browser testing as well as data-driven testing.  Selenium WebDriver It was created by Simon Stewart in 2006, as a solution to the shortcomings of Selenium RC. It provides an interface for creation as well as execution of test cases and it is possible to identify web page elements through the test cases and take appropriate action.
  • 5.  Selenium Grid It makes use of the Hub-Node design which helps in simultaneous execution of more than one test case on different machines which happen to be remotely located. There is one master system which is the hub and it controls the other child systems which are the nodes. 2. Why should you use Selenium? What are its advantages?  Open-source and free  Supports test scripts in different programming languages
  • 6.  Provides for execution of test cases on multiple browsers and more than one operating systems  Facilitates parallel testing and has a huge community support  Provides for integration with JUnit and TestNG  Allows for Continuous Testing through integration of Selenium with Maven, Jenkins and Docker 3. What is the difference between Selenium 2.0 and Selenium 3.0? Selenium 2.0 provided for the merger of the Selenium Webdriver project with the original Selenium Project. Ever since so, Selenium RC got disapproved of, but was still used for backward compatibility. Selenium 3.0 is held to be the extended version of Selenium 2.0. It is backward compatible, does not include Selenium RC and is inherently stable with several bug fixes.
  • 7. 4. What is Selenese? What are its types? Selenese refers to Selenium commands which act as instructions for executing the test cases. A test script can be seen as a sequential collection of these Selenese commands. There are three types of Selenese:  Actions: These commands are used for conducting operations on and interacting directly with the target elements.  Accessors: This command helps in storing values in a variable.  Assertions: These commands act as checkpoints for keeping track of the sequential execution of commands. 5. What is the Same-Origin Policy? How was it resolved? The Same-Origin Policy prohibited access to web elements from a domain which was different from the one where the JavaScript was launched. A web browser allowed scripts from a particular webpage to access content of another webpage provided both the pages came from the same domain. The problem posed by the same-origin policy was sought to be rectified through the introduction of Selenium RC. It did seek to resolve the issue by including a HTTP proxy server which could deceive the browser into believing that the web application and the test script came from the same source.
  • 8. 6. What are the different test types supported by Selenium? The different test types supported by Selenium are:  Functional Testing This kind of testing is conducted in order to determine whether an application functions as per the requirements of the project. Generally, it involves black box testing and does not concern itself with the source of the code.
  • 9.  Regression Testing It involves selection (full or partial) of already executed test cases in order to get them re-executed for evaluating the performance of existing functionalities.
  • 10. 7. What is the difference between Verify and Assert Commands?  Verify This command is used to check whether an element is on a page. It is used to specify whether a condition is true or false. If the element is not there, the test will keep on executing. Even if any of test fails, the rest of the commands will continue to run.  Assert This command is used to check whether an element is on the page or not. If the asserted element is not present, then the test will stop and will not continue further. 8. What is the difference between single slash and double slash in XPath in Selenium?  Single Slash (/)  It helps in starting the selection from the document or the start node  It allows the user to create Absolute expressions in XPath Selenium  Double Slash (//)  It helps in starting the selection from anywhere in the document  It allows the user to create Relative expressions in XPath Selenium
  • 11. 9. What is a locator? How will you locate an element in Selenium? Locators in Selenium act as means for finding and matching elements on a webpage with which the user needs to interact with. Depending on the type of element which needs to be located, there are different types of locators present.
  • 12.  Name  ID  Partial Link  Class  XPath  Link Text  CSS Selector 10. What are the technical limitations of Selenium?  It can only be used to test web applications and is not suitable for testing mobile or desktop software applications  It cannot acquire access to web elements detected to be outside the web application which is under test  There is no assured user support, apart from customer communities  It cannot be used for image testing or data-driven testing independently  It requires prior knowledge of programming language to write tests  Selenium cannot be used to test Captcha and barcode readers
  • 13. 11. What is the Page Object Model (POM)? What are its advantages? POM can be understood as a design pattern which helps in creating object repositories for the web UI elements. The web pages of applications have corresponding page classes which help in locating web elements and undertaking actions on them. Advantages:  The same object repository can be used in multiple tests, as the repository itself is independent of test cases  It helps in providing for code readability, as it supports separate flows and operations on the UI from verification  It also enhances the reusability of the code Selenium Interview Questions: INTERMEDIATE Level 12. What are the different types of annotations used in Selenium? Java facilitates the addition of a special form of syntactic metadata to the Java source code, which are known as annotations. It provides for the annotation of parameters, methods, variables, classes and packages. Some of these JUnit annotations are:
  • 14.  Test  Before  After  BeforeClass  AfterClass  Ignore  RunWith 13. Can you automate Captcha? Selenium cannot be used to automate Captcha. This is quite logical because the whole idea behind Captcha is to prevent automated program and bots from acquiring access to sensitive information. The Captcha needs to be manually typed by the tester or the test engineer in order to carry on the execution of the test suite.
  • 15. 14. What are the advantages of Selenium over QTP?  Selenium is distributed as an open-source, free Automation Tool; while QTP is commercialized and is distributed as a licensed, profitable tool  Selenium supports multiple programming languages; QTP supports only VBScript  Selenium supports multiple browsers as well as different operating systems; QTP supports only Firefox, Internet Explorer and Chrome, and the Windows operating system  While Selenium is specifically used for testing web-based applications; QTP can be used for testing client-server applications too 15. What are Breakpoints and Start points in Selenium?  Breakpoints These are used to stall the flow of execution of the test cases. When Breakpoint is implemented, the execution stops right there. This also helps in ascertaining that the code is working properly.  Start points This refers to the point from where the execution of test suite should begin. This is invoked when the tester wants to execute the test script from the middle of a code or after a breakpoint.
  • 16. 16. What is the difference between setSpeed() and sleep() methods? Both these methods are used to delay the speed of execution.  setSpeed() This command is used to stop the execution of every Selenium command for a specific amount of time. Each command after the setSpeed delay is executed with a delay of milliseconds as mentioned in setSpeed.  Thread.sleep() This command suspends the execution of the current thread for a specified amount of time. It can be invoked only once. It takes a single argument in integer format. 17. What is the difference between getwindowhandles() and getwindowhandle()?  getwindowhandles() It is used to get the address of all the open browser and its return type is Set<String>  getwindowhandle() It is used to get the address of the current browser where the control is and its return type is a string data type.
  • 17. 18. What are the different types of frameworks? The different types of frameworks are:  Data-Driven Testing Framework This framework assists us in separating the test data from the test script logic. The test data is stored in an external database like XML, excel, CSV and so on. The data is stored in “key-value” pairs and they depend on the verification and input values maintained using the variables.  Keyword-Driven Testing Framework This framework is often considered to be an extension of the previous one. It not only provides for the separation of the test data from the test scripts, but also retains a certain set of codes belonging to the test script in an external data file. The keywords and data tables are developed independently of the automation test cases.  Behavior Driven Testing Framework This framework provides for the automation of functional validations in the test script for ensuring understanding, reliability and readability for Business Analysts, Testers and Developers.  Module-Based Testing Framework This framework helps in dissociating the Application Under Test (AUT) into isolated and logical modules. Independent and separate test scripts are created for each module and taken together they help in building a larger test script which represents more than one module.
  • 18.  Library Architecture Testing Framework This framework helps in segregating the application into common functions which can be used by other parts of the application as well. This helps in creating a common library which constitutes common functions for AUT.  Hybrid Testing Framework It is a combination of more than one of the above mentioned frameworks. The advantage is that it helps in deriving the benefits of all the associated frameworks.
  • 19. Selenium Interview Questions for Experienced: ADVANCED Level 19. How will you launch different browsers in Selenium? It will require the creation of a driver instance for a particular browser which we need to work upon. The following syntax can then be used to launch the browser corresponding to the operating system of the system.  WebDriver driver = new ChromeDriver()  WebDriver driver = new FirefoxDriver()  WebDriver driver = new InternetExplorerDriver() In these cases, WebDriver acts as the interface wherein Chrome, Firefox and all other browser driver implementations are made. 20. Why do you need Session Handling in Selenium? Session handling helps in establishing the communication between the browser and the application which is running the commands. The need for session handling comes from the very fact that during the process of test execution, the WebDriver needs to continuously interact with the browser for executing the commands. There may arise an issue that in the process of running a particular test script and before the current execution gets completed; someone might start the execution of another test script in the same machine with the same type of browser. In order to avoid such a situation, we need Session Handling in Selenium.
  • 20. 21. What are the advantages and disadvantages of Selenium RC?  Advantages:  It supports cross-browser testing, user preferred language and data driven testing  Supports conditional operations and iterations as well as new browsers  The execution speed is greater than Selenium IDE  Dynamic objects and Ajax based UI elements can be handled  Data can be read or write to or from .xlsx, .csv, .txt, and so on  Disadvantages  It involves a complicated installation procedure as compared to Selenium IDE  Prior knowledge of programming language is needed  Execution speed is slow as compared to Selenium WebDriver  API contains vague commands  Anything outside the browser is also restricted to access in the test scenario execution
  • 21. 22. Which language is more preferred for writing test suites in Selenium? While Selenium does allow the writing of test scripts in multiple languages; the most preferred language is Python over Java.  Python programs run faster as compared to Java programs  The complexity and implementation of both are different and Python works quite well  Java is statically typed, while Python is dynamically typed  Python is far compact and simpler to write test cases when compared to Java
  • 22. 23. How does Selenium Grid work? Selenium Grid operates by creating test suites which functions by forwarding test cases to the hub, from where the cases are redirected to the Selenium WebDriver. The WebDriver is then responsible for executing the cases in the browser. The test suite does allow for parallel testing. 24. What are the different navigation commands in Selenium? The different navigation commands in Selenium are as follows:  navigate().refresh() This command helps the user to refresh the current webpage by reloading all the web elements
  • 23.  navigate().back() This command operates as a Back Button. It takes the user back to the last used or previous webpage as per the user history  navigate().to() This command takes the user to a new page in a new window, depending on the URL mentioned in the command  navigate().forward() This command operates as a Forward Button. It takes the user back to the next webpage as per the user history Selenium Webdriver Interview Questions 25. What are the limitations of Selenium WebDriver? Limitations:  Selenium WebDriver entails prior knowledge of programming language  Does not immediately support new browsers and there is no procedure to track runtime messages  Selenium WebDriver does not allow for image testing
  • 24.  Not compatible to test mobile or desktop or windows applications  There is built-in reporting option and it needs to be integrated with other tools in order to obtain the reports  There is no vendor support since it is open source
  • 25. 26. What are the challenges in handling Ajax call in Selenium WebDriver? Challenges:  It is difficult to evaluate the risks associated with particular Ajax applications  The pause command is one of the options for handling Ajax calls, but it is not completely reliable. Long pause time only results in increasing the testing time and makes the test unacceptably slow. It is recommended that the “waitforcondition” will be more useful in testing Ajax applications  Serialization and Encoding in the Ajax applications make it difficult in developing automation test scenarios 27. How can you handle colors in Selenium WebDriver? In order to handle colors in WebDriver, you can use getCssValue(arg0) function to get the colors by sending ‘color’ string as an argument. 28. What are the different types of Exceptions in Selenium WebDriver? The different kinds of exceptions in Selenium WebDriver are:  ElementNotVisibleException This exception occurs when an element is present in the DOM (Document Object Model), but is not visible on the webpage
  • 26.  TimeOut Exception This exception occurs when a particular operation cannot be completed within a stipulated or specified time  StaleElement Exception This exception occurs when an element is no longer present or is deleted in the DOM (Document Object Model). Users tend to face this exception when the element that they are interacting with is either recreated or destroyed again  NoSuchElement Exception This exception occurs when an element in the given set of attributes is not present in the webpage 29. What are the different types of waits supported by Selenium WebDriver? These are:  Implicit Wait These waits are used to set a default waiting time between the consecutive steps across the entire test script. A particular test step will only be executed after the specified time has elapsed, post the execution of the previous step.
  • 27.  Explicit Wait These waits are used to halt the execution of a test until the maximum time has elapsed or a particular condition is met.
  • 28. 30. How do you find broken links in Selenium WebDriver? Detection of broken links can be made in the following manner:  You need to gather all the links present on a webpage through the <a> anchor tag. For each of the <a> tag, you will be required to use the attribute ‘href’ value to obtain the hyperlink  Next you would have to send HTTP requests for each link and correspondingly verify the HTTP response code  On the basis of the HTTP response code, you will be able to determine if the link is broken or valid. Then, you can use the driver.get() method to navigate to a URL which should respond with a 200-OK status if the link is working. In case you get other statuses, it indicates that the link is broken  200 – Valid Link  404 – Link Not Found  400 – Bad Request  401 – Unauthorized  500 – Internal Error You can repeat the process for all the links gathered
  • 29. Conclusion The list of possible Selenium Automated Testing Interview Questions mentioned above is certainly by no means exhaustive. As an aspiring candidate seeking to get through a Selenium Interview, you might happen to face numerous other Selenium tricky Interview Questions. However, this blog has sought to give you a fair idea of the most important topics which you should certainly be well versed with, when it comes to this Automation Testing Tool.