0% found this document useful (0 votes)
0 views

Byte_ Selenium Locators exercises

The document outlines various URLs and their preferred locators for web elements such as search boxes and buttons. It includes instructions for making a copy of the document and changing access permissions. Additionally, it discusses the reasoning behind choosing specific locators based on their uniqueness and stability in the DOM.

Uploaded by

awasthi.tarun801
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Byte_ Selenium Locators exercises

The document outlines various URLs and their preferred locators for web elements such as search boxes and buttons. It includes instructions for making a copy of the document and changing access permissions. Additionally, it discusses the reasoning behind choosing specific locators based on their uniqueness and stability in the DOM.

Uploaded by

awasthi.tarun801
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Preferred Value of

URL Control to find Locator 1 Locator 1


amazon.in Search Box
https://www.redbus.in/ Logo on the top Left
https://paytm.com/ Sign In Button on top right
https://www.python.org/ Downloads dropdown
https://www.netflix.com/in/ Sign In Button on top right

1. To be filled up after making a copy (Go to "File", select "Make a copy")


2. Change access permissions to "Anyone with the link can open/view" (Use the "Share" b
Preferred Value of choose this
Locator 2 Locator 2 locator?

copy")
ew" (Use the "Share" button on the top-
Preferred
URL Control to find Locator 1
amazon.in Search Box Id
https://www.redbus.in/ Logo onButton
Sign In the toponLeft
top Class Name
https://paytm.com/ right CSS
https://www.python.org/ Downloads dropdown
Sign In Button on top Link Text
https://www.netflix.com/in/
right Class Name
Preferred
Value of Locator 1 Locator 2 Value of Locator 2
twotabsearchtextbox Name field-keywords
.home-redirect
div[id='app'] header div div div div div Link Text redbus
//*[@id="app"]/header/div/div/div/div/
span Xpath div/span
Downloads Xpath //*[@id="downloads"]/a
redButton Link Text Sign In
Why did
Static you ID
Unique choose this locator?
was available,
Name of this
The Link Textelement was exclusive
is available unique in to
the<a>
DOMand
unique
generated entity
We canelement
parent use CSS or less
and Xpath
susceptible to changes in
this case
The Link Text is available exclusive to <a> and
unique

You might also like