Skip watching entire videos - get the full transcript, search for keywords, and copy with one click.
Share:
Video Transcript
Video Summary
Summary
Core Theme
This video provides a comprehensive guide to 100 commonly asked interview questions and answers for automation testing roles, covering essential tools and concepts like Selenium, Java, TestNG, Maven, CI/CD, and Java programming.
Mind Map
Click to expand
Click to explore the full interactive mind map • Zoom, pan, and navigate
Hi everyone, welcome back to AJ
automation channel. So if you are
preparing for an automation testing
interview right now, this video is
really going to be a gamecher for you.
So I'll be quickly walking you through
100 real and commonly asked interview
questions and answer recently came
across many top companies. Okay. So I'll
be covering topics from Selenium, Java,
TestNG, Maven, Tenkins, CI/CD and from
Java programs as well. So believe me
guys, these questions are not just
theory questions. These are based on
real feedback from candidates who
actually face these questions in 2025 in
many interviews. Okay. So, at the end of
this video, you will know exactly what
to expect in your interviews and you can
use this as a revision checklist before
your next interview. Okay. So, let's
quickly jump into the topic. So, the
first question is, can you describe the
most complex test scenario you have automated?
automated?
Okay. This is really important question.
So you might have either worked in UI
automation or API automation. If you
have worked only in UI automation, you
can explain like explain about your end
to- end scenario. Okay. Consider you
work in an e-commerce application from
login to product search to add toart
applying a coupon checkout and order
confirmation. This is an end to end
scenario in your application, right? You
can talk about it. So I have automated
end to end scenarios. So integration
test cases. These are some critical test
cases I have automated. Okay. So if you
have knowledge in API automation or if
you have performed API automation, you
can talk about UI and API integrations.
Okay. Consider your application has any
forms. So after submitting a form using
selenium I use rest assured in Java to
call the API and check the data was
saved correctly. So here in API
automation we will check AI UI and API
integrations are working fine correctly
using rest assured. Okay. So this
question is really important. So please
do prepare. Okay. This was asked in many interviews.
interviews.
So the next question is can you describe
your end toend selenium automation
execution in the CI/CD pipeline. So as
you know most of the frameworks works in
CI/CD pipeline. So you should know how
CI/CD pipeline is working. So after your
test script creation and code review is
done, we'll be merging the changes to
the master branch which will
automatically trigger a CI built in
Bangu or Genkins. Okay. So what will we
do next? We'll verify the logs or test
results in Bamboo and Genkins. Okay.
Also you can explain I have configured
email notification. So whenever the
build is failing we'll get email
notification or you might configure like
whenever build is passing also you can
trigger email notification. Okay also
talk about we have configured CICD
pipeline to execute every 24 hours automatically.
automatically.
Okay. So the next question is what
challenges you have faced while running
selenium test in the CI/CD pipeline.
Okay. So the common challenges are the
test passed in local can fail in the
CI/CD pipeline.
Okay, because in pipeline we execute
test in headless browser mode and issues
like missing dependencies for browsers
can cause test failures. So we need to
modify the browser setup to CI/CD
automation test execution. Okay. Also
integrating docker files, YL files in
the framework and setting up the
configurations were really challenging.
So these are new technologies, right? So
you you can explain these were also
challenging to me for learning and
implementing. Okay. So the next question is
is
what branching strategy you follow in
your automation projects. So you can
explain like you have two branches like
master and develop branch where the
master branch contains the code that's
been tested thoroughly. So usually you
push the once your test scripting is
done you push the code changes to the
develop branch and after code review is
done we'll create a PR and then only you
will merge it to master branch. So
master branch contains the stable code
that has been thoroughly tested. Okay.
So I explain about these two branches
for this question. Okay. So the next
question is how do you stage and commit
a file in g? Basically they're asking
how will we push or um add a commit and
uh these changes into our push our code
to g repository. Okay. So g add git
commit and g push command are used for
this operation. Okay. for staging and
committing a file in get these commands
are enough. So the next question is why
are you using the testNG library in your
automation framework because testNG
annotations help our code more readable.
Okay, it helps in code structuring also.
It helps in grouping, prioritizing test
and it supports parall testing and
stelenium does not have the capability
for auto report generation. Right? So
using testNG we can generate HTML
reports as well. So these are this is
why we are using TestNG library in our
framework. So the next question is what
improvements you have made to improve
your test automation framework. So you
might have improved your test automation
framework by integrating extend reports
instead of testg reports. Okay, for
better UI and you have might have
performed regular code optimization to
improve your test execution time. You
might have configured CI/CD automation.
You might have implemented parallel
execution. So you can talk about these
things in the interview. Okay.
So the next question is what are the
major challenges you have faced during
automation? So initially you can talk
about test case selection for
automation. I had around 500 or thousand
test cases. So I want to choose the
automation test case that was a
challenge. And we can talk about
handling dynamic web elements here and
talk about test environment stability
also because the locators might keep on
changing as developer pushes new
changes. So we overcome it by making
sure developers don't change existing
DOM structure or any web elements. In
this way we worked on uh test
environment stability. You can talk
about these three things. Okay. Next
question is how will you rerun failed
test cases after test execution. So
testng generates a file like testng
fail.xml. Right. So you can open that
file which will present inside the test
output folder and you can see how many
test cases have failed and you can rerun
the file. Okay. Next question is in your
project there can be thousands of test
cases. How do you choose automation test
case? So usually choose in the order
critical test cases should be automated
first and then high priority and finally
medium priority test cases or UI test
cases can be automated. Okay. So the
next question is how do you perform code
optimization? So code optimization is
done to improve our test execution
speed. Okay. by removing sleep commands
and by avoiding implicit weight and use
explicit weight whenever required and
put all the common test in your base
class and call them in test as required.
Okay. Also following the page object
model design pattern to improve code
reusability and read re readability are
some ways we have performed for code
optimization. So this question is being
asked in many interviews. So please
prepare this question. Okay. So let's
see the next question.
what type of design pattern you are
following for maintaining automation
test script. So we can talk about page
object model design pattern here that is
for every web page in our application we
have corresponding object classes. Okay,
next question is do you execute test
locally or do you have CI/CD pipeline?
So if you are executing tests only in
local you can talk like we have not
configured pipeline so far so we are
executing locally. If we are using
pipeline like in bamboo or genkins you
can talk like we have we are executing
text both in local as well as in CI/CD
pipelines. Okay. So what is a headless
browser and why it is used in CI. So a
headless browser runs without an UI.
Okay. Because it speeds up execution and
suits UI CI environments where no GUI is
available. B in CI environments there
will not be any GUI. Okay. graphical
user interface. So we need to run our
test in headless browser mode or we will
face lot of failures.
Okay. So this is an important point in
CI we'll run our test only in headless
browser mode mostly. Okay. Next question
is how do you generate test results in
your automation framework. So you can
talk about extend report or alert
reports which you have configured in
your automation framework. After every
test execution, the HTML file will be generated.
generated.
That file will be verifying how many
test cases are passed, failed and uh
what are the errors faced during
execution and screenshots. Okay. So,
next question is how many test cases you
automate in a sprint usually. So,
usually if it is a critical test case,
we all will automate around 3 to four
and if it is a major functional test
case, we'll automate six to eight and if
it is an UI related, we can automate
more than 10 test cases. Okay, next
question is how do you manage test data
in your selenium automation framework?
So you can talk about Excel files or
JSON files or property files from these
files. We are calling data to our
selenium test. If you are using Excel,
talk about Apache PO library usage also. Okay.
Okay.
Next question is what are the different
types of exceptions you have seen during
automation? There are multiple exe
exceptions. We have seen at least top
five exceptions in the interview. Okay.
No search element time out IO exception
null pointer and array index out of mode
exceptions are some of the commonly seen
exceptions during automation. So how
will you handle exceptions? So we can go
for using try catch block and use
explicit weight also along with try
cache block just to make sure element is
visible and then you perform the
operations. Okay. So here the keywords
are try cache blocks and explicit weight
for handling exception. So the next
question is consider that your
application pages are loading very
slowly. How will you handle this case?
So the best way is to use explicit
weight to wait for specific element to
appear to be clickable or to be present.
So it handles slow loading elements
efficiently. Okay. Next question is why
do we need to use weights during
automation? So okay there are different
types of weights like implicit,
explicit, fluent. So why do we need
those weights? Sometimes it takes a
longer time for web element to appear on
the screen. At that time our test might
throw no such element exception or
element not visible exception. To handle
this case we go for using selenium
weights. Okay, this is an important question.
question.
Next question is how do you scroll down
to a particular web element? Using
selenium using JavaScript exeutor and
scroll into view method we can scroll
down to a particular web element. Okay.
Next question is how do you verify that
the drop-down has all the expected
options? So drop down might have
multiple values right. So how can we
validate it has all the expected
options. So we can get all the options
of the drop-down using get options
method and compare with the list
expected list. Okay. So how will we
automate dropdowns using selenium? We
can automate dropdowns using select
layers. So using select by value index
and visible text we can select values
from the dropdown.
Next question is if the select class is
not working, how can we automate
drop-downs using selenium? Okay, so try
normal click whether it is working the
drop-down field. So you can locate the
drop-down and click and open it and then
click on the option using drop-down
option using XPath or CSS selector. If
the normal click is not working for
example basically due to JavaScript
based UI or hidden elements, you can go
for using JavaScript executor to perform
the click. Okay,
Okay,
next question is how will you verify
whether an element is visible or not in
a web page? So to check whether an
element is visible in the UI, you can go
for using is display method. Okay. And
next question is how will you verify
whether an element is present on a web
page? To check whether an element is
present, we can use find elements and
check if the list size is greater than
zero. Okay. So this will check whether
the element is present in the document
object model and returns. So basically
what we are doing we we are using find
elements and checking if the list size
is greater than zero here.
Okay. Using find elements I am
identifying the web element and I'm
storing it into a list and I'm just
checking the size is greater than zero.
If it is greater than zero the element
is present. Else element is not present.
Okay. Next question is how will we
handle alert? So using switch to method
we can switch the selenium control to
the alert message and using accept
method we can click okay button using
dismiss method we can click cancel
button and to get the text present in
alert window we can use get text method. Okay
Okay
how can we handle new browser windows or
tabs using selenium. So to handle new
browser windows or tabs we can go for
using window handles.
Okay. So talk about window handles here
and talk about switch to method usage
also here. Okay. So next question is how
can we handle multiple alerts occurring
at the same time using selenium. A
tricky one. So selenium can handle only
one alert at a time. So if multiple
alerts are present, we must handle them
one by one. Okay. So we cannot handle
multiple alerts at the same time. We
have to handle alerts one by one.
So next question is without send keys
how can we type text in an input box. So
we can achieve using javascript exeutor
right. So without using send keys if uh
we can use javascript exeutor to type
text in a text box. So difference
between get and navigate. So for page
loading alone we can use get method and
for navigating pages between going
forward going backward we can use
navigate method. It maintains browser
hits history. Okay. Navigate to method.
So next question is how will you launch
browsers using selenium. So from
selenium 4 using webdriver manager we
can launch browsers using selenium. Okay
we know no need to set up the system.et
property or download chromedriver now.
So just use webdriver manager. So in the
pom.xml file add the dependency. So
webdriver manager. Chromedriver. Web
setup initializes a web driver and web
driver driver equal to new chromedriver
launch as a new chrome session. So how
can we handle dynamic web elements? So
in selenium we hand handle dynamic web
elements using expath functions or CSS
selector and also by implementing
explicit weights to ensure the element
is ready. So XPath functions like
contain start with helps to identify
dynamic web elements and also use
explicit way to make sure the element is
visible or clickable to perform the
corresponding action.
Okay. So next question is what is
relative and absolute XPath? Which one
is more preferred for locating web
elements? So whenever relative X path is
working so just go for relative X path
because it is directly referencing the
web element. So for absolute XPath
meaning we are starting from the root
node to the target element. So if any
changes happening in your HTML tree
absolute XPath might break. So let X
path is more preferred. So what are the
locators you are using for automation?
So ID XPath CSS selector class name link
text partial link text are some of the
locators we are using for automation.
So next question is when do you choose
ID and what scenarios you go for XPath
and CSS selector. So web elements are
unique meaning we can go for ID
definitely because it's the fastest way
to locate a web element. So we go for
XPath when the web element is not unique
and when we want to navigate up and down
the document object model we can go for
XPath. We can use CSS selected when the
DOM structure is simple and CSS is
cleaner and easier to maintain. Okay. So
next question is what software is
required to run a Selenium project? So
we need Java, we need editor like
Eclipse or VS Code or IntelligJ, we need
Maven and we need TestNG and Selenium dependencies.
dependencies.
So next question is why do you use
Selenium when there are many other
automation tools in the market? So say
because Selenium is open source, no cost
is involved. It supports multiple
operating systems and multiple browsers
and we can easily integrate selenium
with libraries like cucumber testng jet
and we can perform CI/CD automation
using genkins and bamboo. Okay, on the
selenium projects that's why we are
using selenium. So can you write x path
for the below code? So in the interviews
they are asking to write x path they'll
share your their screen and ask you to
write x path for some web elements. So
prepare this questions. Okay.
Next question is what would you do if
multiple tabs are opened and you want to
switch to the one with a specific page
title. Contabs
are opened. You want to switch to a
specific page title. So what we can do
here get all the window handles using
get window handles and loop through each
one of the each of the windows using
switch to method. Okay. So for each tab
we have to check the page title using
get title and if the title matches the
expected one we can break the loop and
continue testing in that particular tab.
So talk about get window handles and
using looping mechanism. Okay also
switch to.
So the next question is what is the
difference between find element and find
elements. So find element and find
elements both are used to locate the web
elements on the web page. The difference
is find find element helps to find a
single matching web element. Find find
elements returns a list of matching web elements.
elements.
Okay. So next question is how do you
handle keyboard and mouse interactions
using selenium? So you can use actions
class for handling keyboard and mouse interactions.
interactions.
What is the difference between close and
quit commands? Close command closes the
current browser window whereas quit
command closes all the browser windows
and in all the web driver session.
So what are the interfaces available in
your automation framework? So there are
multiple interfaces like web driver
javascript exe actions take screenshot
logging etc. Okay. So what is the
version control platform you're using?
We are using git for version control and
github bit webc for hosting platforms
for git repositories.
So what are the testng annotations you
are using in your automation framework?
So there are multiple annotations like
at test at before method at after
method. Okay. So explain about the
annotations you are using. Can we have
multiple attest methods in one class?
Yes, we can have multiple attest method
in a class and sng will execute all of
them. Okay,
next question is what is the use of
priority in testNG? Priority determines
in the order in which your test methods
should be executed. So lower priority
should will run first. Okay. If priority
is not defined, test runs in
alphabetical order that is from A to A.
Okay. What is the use of invocation
count in testNG? So if you want to run
the same test method multiple times, we
can use invocation count annotation.
Okay. What is the purpose of grouping in
testNG? So consider your project have
500 or thousand test cases. If you want
to group test cases like smoke or
regression or sanity, you can use testNG
grouping. Okay, groups are collections
of multiple test case methods combined
into one unit. So grouping is really
important. So please prepare grouping
related interview question. Okay.
What is the purpose of assertion in
selenium? Assertion is used to verify
expected and actual results of a test.
Okay. So the primary purpose of
assertion is to verify application
behaves as expected.
Okay. Next question is what is the
purpose of parameterization in testNG?
So parameterization meaning it allows
the same test to run with different sets
of input data. Okay. Suppose if you want
to validate the same functionality with
multiple input combinations, you can go
for parameterization.
What are the ways to achieve
parameterization in testNG? So using at
parameters annotation and at data
provider annotation we can achieve
parameterization in testNG. Okay. What
is the use of it listener in testNG? How
have you used it in your framework? So
you it test listener is used to perform
specific actions at different point in
your test exeution cycle. Okay, such as
logging test start and logging test end
and for capturing screenshots on failure
and for integrating with reporting
tools. Okay, so the next question is
consider that your payment test should
run only after the guard tests have
passed. How would you set up this group
dependency in testNG? So you might
remember depends on group annotation. So
we can whenever tests are dependent on
other test we can use depends on groups
or depends on methods annotation. So in
this case they are asking about group so
we can use depends on groups annotation.
Okay. So why would you need to handle
cookies during automation testing? So
this handling cookies is important. So
we need to handle cookies during
automation to manage user sessions to
maintain our login state and to simulate
different user roles. Okay. So it helps
improve test efficiency by bypassing
repetitive authentication steps. Okay.
Adding cookies improves our test
efficiency. Okay. By bypassing
repetitive authentication steps. So
explain this in the interview. And the
next question is how can you delete a
specific cookie in selenium? So there is
a method like delete cookie named
method. You can use this specific method
to delete a specific cookie.
Okay. So we are jumping into Java and
oops concepts now. So from question
number 59. Okay. So what are the oops
concepts you are aware of and where you
have applied them in automation.
So this is an important interview
question. So we are using oops concepts
like inheritance, encapsulation,
polymorphism and abstraction. So and
explain where you have used inheritance
and encapsulation
method overloading overriding and
abstraction in your framework. Okay.
Next question is difference between
throw and throws. So throw and throws
are both used in exception handling.
Throw is used inside a method to
manually throw an exception. Whereas
throws is used in the method signature
to indicate that the method may throw
one or more exceptions. So explain this
different to the interviewer. Okay. How
do you stop a loop once a specific web
element is found and interacted with? So
basically we can use break statement
here to stop the loop. Okay. and
difference between final finally and
finalized keyword. A final variable
value cannot be changed and a final
method cannot be overridden. Also final
class cannot be extended. So finally is
a block used in exception handling. It
will always execute after the try catch
block. Okay. And finalize is a method
defined in the object class. It is
called by the garbage collector just
before an object is removed from the
memory. So we need to explain this differences.
differences. Okay.
Okay.
Next question is what are the types of
loops in Java and which one do you use
most in automation? So there are
different loop like for loop, while
loop, dowhile loop and enhance for loop.
So in automation I mostly use the for
loop and for each loop. So you can
explain for loop is useful when I need
to work with element indexes and for
each loop is great for iterating
collections like list without dealing
with indexes.
Okay, so the next question is how do you
loop through multiple web elements using
selenium? Here they're asking how do we
loop through web elements using
selenium. So we can use find elements to
get a list of web elements and loop
through them using for each loop or for
loop and perform different actions based
on your test case. Okay,
next question is in a dynamic table how
would you search for a specific value
using loops and act like clicking edit
and delete. So in a dynamic table we can
loop if there are multiple elements we
can loop through find elements and we
need to compare the cell values in the
table and when the match is found we can
perform actions like clicking edit
delete or using relative datas with the
same row. So I have provided a sample
code also below. Okay. Nowadays I am
getting lot of uh I'm seeing lot of
questions from dynamic table or table
related use cases. So go through it
please. Okay. So the next question is
what is an array in Java? How it is
different from an array list? Array is
fixed size whereas array array list is
resizable and provide more built-in
methods for easy manipulation.
Okay. So next question is can you store
different data types in a single array?
Why why not? So Java arrays are type
specific. So we cannot store multiple
data types in an array. But we can use
object to hold mixer types at the cost
of type safety. Okay, you can explain
this in the interview. We can can you
store different data types in a single
array? No. Okay, Java arrays are type
specific. So you can't store multiple
data types, but we still can use object
array to hold mixer types at the cost of
So the next question is how can we comp
how can you compare two arrays example
ex actual versus expected values on a
web page. Okay, we can compare two
arrays using arrays do equals method for
exact match or use loops to compare
element by element
especially when you are verifying UI
data in test automation. So basically
for this question the answer arrays
equals keyword is really important. Okay.
Okay.
Next question is difference between
method overloading and overriding. So
method overloading means having multiple
methods with the same name but different
parameters in the same class. It is
compile time polymorphism. So method
overriding is runtime polymorphism
meaning redefining a parent class method
the child class with the same signature.
Okay. Explain the difference here. And
next question is really important asked
in many interviews. You might be already
aware of this difference between
abstract class and interface. So
abstract class can have both abstract
and non-abstract methods. It supports
constructors and instance variables and
interface can only contains abstract
methods by default and it cannot have
any constructors or instant variables.
Okay. So explain these differences. What
is the purpose of static keyword in
Java? So we use static to define members
that belongs to the class. Okay, static
keyword saves memory and it improves
performance and allow access without
creating an object. So talk about memory
efficiency and no need to create object.
Okay, because static methods can be
accessed directly within the with the
class name.
Okay, so these are some keywords for the
interview. So do not miss these keywords
memory efficiency no need to create
object okay because static methods can
be accessed directly the class name. So
these are some importance of static keyword.
keyword.
Can you name all access modifiers and
explain the difference between them? So
public protected default and private or
some access modifiers used in Java. Next
question is suppose here test method is
declared as private in testNG will it
run. So this is a tricky one that know
the test method will not run if it is
declared as private. Okay because testng
requests test methods to be public or
default to be executed.
Okay. So next question is can you
override a private method in Java? No,
we cannot override private methods in
Java because private methods are not
visible to subasses. So they cannot be inherited.
inherited.
Okay. Next question is why are web
element variables usually declared as
private or protected in page object
model classes? Page object model a web
element variables are usually declared
as private or protected to follow the
principle of encapsulation.
So when they ask where who you have
applied encapsulation concept in
automation, you can explain this use
case. Okay.
Next question is how is string different
from string buffer and string builder?
This is also asked in many question
interviews. Okay, so string is imu
immutable which means once it's created
it cannot be changed. Okay, string bus
buffer is mutable and string builder is
also mutable but string buffer is thread
safe but string builder is not thread
safe. Okay, explain these differences.
Next question is what is the difference
between break and continue? So we use
break and continue inside loops where
break stop the loop completely and
continue skips the current iteration and
moves to the next one. Okay, next
question is what is the difference
between this and see super keywords?
This keyword refers to the current class
instance whereas super keywords refers
to refers to the parent class instance.
Okay. So basically we can use this
keyword if you want to access the
current class variables or constructors.
Use super keyword to access the parent
class variables, methods or constructor.
Can a final method be overridden? No.
Your final method cannot be overridden.
Okay. Declaring a method final means
it's fixed and cannot be changed by subasses.
subasses.
So the next question is what is the
difference between checked and unchecked exceptions?
exceptions?
So checked exceptions are checked at
compile time. The compiler forces us to
handle them using try cache block. Okay.
Whereas unchecked exceptions are checked
at runtime and not at compile time.
Okay. The compiler does not force us to
handle them. Example or null pointer
exception array index out of bound exception.
exception.
Okay. So can we handle have multiple
cache blocks for one try block? Yes,
definitely. Java allows multiple catch
blocks to handle different types of
exception separately.
Next question is what happens if an
exception occurs in the catch block?
Okay, tricky one. So if an exception is
thrown in the catch block and it is not
handled, it will propagate like any
other exception and may cause the
program to crash.
Okay. So next question is can you catch
multiple exceptions one one block? Yes,
in Java we can catch multiple exceptions
in one block using the pipe symbol.
Okay, below is an example code for that.
Next question is what is throwable in
Java? So in Java, throwable is the
superass of all the errors and all the
exceptions. That is it's the root class
for anything that can be thrown using
the throw statement.
Okay, next question is what happens if
an exception is thrown in the finally
block. Okay, if an exception is thrown
in the finally block, so the finally
block can replace exceptions from try or
cache block where which can hide the
original error. So it's always best to
avoid throwing exceptions in the finally block.
block.
Okay, because an exception in the final
block can replace exceptions from try or
catch block which will hide the original
error eventually. So it's better to
avoid throwing exceptions from finally
block. So what are the main interfaces
in the Java collections framework?
Collections list set Q and map are some
of the major interfaces in the
collection framework. So what is the
difference between array and array list?
What is the difference between hashmap
and tree map are mostly commonly asked
in many interviews. So please do prepare
these questions differences.
Okay. So the next question is what is
multi-threading and how is it used in
test automation? Multi- threading
meaning running multiple threads at the
same time. It helps to do many task in
parallel. Okay. Making programs more
faster and more efficient. So in
automation testing multi-threading is
used in parallel testing where multiple
threads are run at the same time. Right?
So this is an example for multi-threading.
multi-threading.
Difference between a process and a
thread. A process is an indep
independent program with its own memory
space. Whereas a thread is similar so
smaller unit inside a process. Okay. So
that's the difference. What is a
deadlock? Can it acquire in test
automation framework? Yes. So deadlock
can occur in test automation framework
when multiple threads or processes
attempt to lock resources in a
conflicting manner. Okay. It can
definitely deadlocks can definitely
happen in automation framework when
multiple threads attempt to lock resources.
resources.
Okay. How do you ensure thread safety in
test automation? So there are many ways
here. We can avoid shar state and we can
run test independently and clean up
after every test run. So use safe tools,
use tools and libraries that support
parallel execution.
Okay. So next question is what are Java
streams? How are they different from
collection? Java streams let us process
data from collections by using simple
steps like filtering, mapping and
relation. So how does it differ from
collection? Collections store data. They
are like containers holding elements but
streams does not store data. They let
process data from collections in a
sequence of operation. That is the
difference between collections and
streams. Okay. So where do we use Java
streams in Selenium automation? We have
used Java stream to process list of web
elements easily from web page. For
example, we are using scenarios like to
check all the list box or checked in
selected on a web page to get all
visible product names from a list on a
web page. So these are some scenarios I
have used Java streams for. Okay. Next
question is how to remove duplicates
from a list using stream. So you can use
we can use distinct method here for this
particular use case. Below is a simple
sample program for the same. Okay.
And I have listed commonly asked
programs for the past 6 months that is
in 2025. Okay, these programs are asked
in almost 10 interviews. Consider one
program is asking 10 interviews. Okay,
so reverse a string even it was asked
last week two in two interviews. So find
duplicates count the total words in a
sentence. So you know you before going
for an interview you need to do hands-on
in all these program because we never
know what program the interviewer is
going to ask. So what we can do is do
lot of hands-on in strings initially and
once you are so confident in string
scope for arrays and collections and
other things Java streams etc.
Okay so please do prepare this program
please do hands on this program. Okay,
so we have come to the end of today's
video and thanks for watching the whole
video and if you found these questions
useful, please do not forget to like,
subscribe and share our channel and
please do comment if you have any
questions and so I hope this video will
be really useful for your upcoming
interview. Please do have a great
interview. Okay, I hope these materials
help. Okay, and please do subscribe,
like and share and click the
notification bell. Have a great day.
Have a great interview. Thank you. Bye.
Click on any text or timestamp to jump to that moment in the video
Share:
Most transcripts ready in under 5 seconds
One-Click Copy125+ LanguagesSearch ContentJump to Timestamps
Paste YouTube URL
Enter any YouTube video link to get the full transcript
Transcript Extraction Form
Most transcripts ready in under 5 seconds
Get Our Chrome Extension
Get transcripts instantly without leaving YouTube. Install our Chrome extension for one-click access to any video's transcript directly on the watch page.