Which Selenium Locator is best and Why? | SoftwaretestingbyMKT Questions and Answer | Selenium Java

preview_player
Показать описание

Join this channel to get access to perks:

Like, share and subscribe to the channel.
API Testing Playlist

Core Java Playlist

Selenium Playlist

Manual testing Playlist

Watch my other videos too,
Inheritance in Java video

Single level inheritance video

Multi Level Inheritance in Java video

Hierarchical Level Inheritance in Java video

Hybrid Level Inheritance in Java video

Method Overloading in Java video

This calling statement in Java or this() video

Constructor Overloading in Java video

Constructor in Java video

Static and Non Static Variables in Java video

How to Create an Object in Java & Handing non Static method video

Multiple static methods inside a single Class | How to deal it?

Methods in Java | What exactly is public static void main(String[] args)

Types of Variables in Java | Local,Global & Final Variables

Variable and Datatype in Java

Easy way to run a program in Java | First program in Java

Class and Object in java

50 Keywords in Java

Tokens in Java

How Java internally works?| Compilation & Interpretation

Introduction to Java | History of Java |Features of Java
Derived model in software development life cycle video link

Prototype model in software development life cycle video link

Spiral model in software development life cycle video link

Verification and Validation in software development life cycle video

Hybrid model in software development life cycle video video

Waterfall model in software development video link

Software development life cycle video link

What is manual testing, it's advantages and disadvantages video link

What is Software testing video link

I work in the IT industry as a Senior Software QA Engineer in Bangalore, India and I have worked on mobile applications, web applications, and API testing.
The main reason behind this channel is to educate people about software testing so that it will helpful for them to choose the right career and also to prepare for their interviews.

Adding my blog link

Adding my personal mail Id:

Adding my Quora profile link here:

Adding my Twitter account here,
or
Facebook Page:

Join us on Telegram today,
SoftwaretestingbyMKT
For the latest update on software jobs and to discuss each and everything about Software Testing also get an opportunity to get on an audio/video call with me directly to you.
I make videos on daily basics and also help student all over the world for FREE. If my videos are helpful in anyway help "SoftwaretestingbyMKT" reach billions by supporting
OR
Рекомендации по теме
Комментарии
Автор

Every Locator Has its own priority. It is purely depends on the component which we want to locate . Most used locators are I'd & xpath.

ammachethimadhuryam
Автор

We can't say exactly which locator is the best... It totally depends on the structure of html

shalinivinodwaghmare
Автор

Xpath is best Bcz we can write the dynamic elements which is dynamically changes in future also it works I think these is the best locator to use

jagadeshkathem
Автор

In basic locator best locator is ( ID), and in Customize Locator best locator is (Xpath)

Arizali-zhgb
Автор

ID locator in Selenium is the most preferred and fastest way to locate desired WebElements on the page. ID Selenium locators are unique for each element in the DOM. Since IDs are unique for each element on the page, it is considered the fastest and safest method to locate elements

ArjunYalapalli
Автор

According to me ID locator is best one because ID's are supposed to be unique to each element.

riteshprasadmohapatra
Автор

All the locators are the best according to the DOM structure ….as we choose for more perfectness in testing will go with xpath or css locators

Homemadefoodsbyveena
Автор

Css selector is the most reliable selector. We can easily navigate to child classes using this and it can be used for uniquely identifying elements

mallika
Автор

if there is ID, then ID is the best
if there is no ID present then prefer Relative xpath coz it's reduce the chances of NoSuchElementException ❤️

ashokgutte
Автор

It's depends on the requirements of the projects.But still I would say I'd and relative xpath would be best.

kaminitak
Автор

Every locator have it's own priority but in xpath we use all locator in it and also make new locator and also use starts with and contains like many fuction so xpath is best bcz it have all locator also some customized function....

amarjitchoudhury
Автор

Agile model.
Requirements change are allowed in every time in every stage.
Agile is also known as interactive and Incemetal.

padmaramans
Автор

it's depend upon the component that which locator is suit at that time..that locator will be best for that component

NiteshKumar-pilg
Автор

Anyway I'd but We can locate element dynamically by using CSS and xpath as considering future perspective so this is best.
Pls make a one video on the same

sagarkharche
Автор

ID locator because it is unique to each element.

riteshprasadmohapatra
Автор

Relative Xpath is best because it jumps to desired element

MrJUNED
Автор

All locators are eventually best in scenarios based condition but in Relative xpath, it identifies the element more accurate in most scenarios even though elements are dynamic

dharandowney
Автор

Id and xpath because I'd is the unique for every web elements and xpath is also used to uniquely identify the webelement, it is used to extract a webelement easily

rajeshwariuma
Автор

Xpath is best as not all locators available for each element...the only way we can best locate any element is by accepted

asharaju
Автор

If we understand the html really well then we can find any locator easily but among that relative x-path is recommended most..

pradeepb