Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Selenium Essentials

You're reading from   Selenium Essentials Get to grips with automated web testing with the amazing power of Selenium WebDriver

Arrow left icon
Product type Paperback
Published in Mar 2015
Publisher
ISBN-13 9781784394332
Length 194 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Prashanth Sams Prashanth Sams
Author Profile Icon Prashanth Sams
Prashanth Sams
Arrow right icon
View More author details
Toc

Locator prioritization

Prioritization lets you prioritize locators while recording scripts. In general, this feature helps the user by giving high priority to generate scripts with respect to the user's preferred locators. For example, by changing the csslocator order from the fifth to the first position, the further elements generated on the Selenium IDE's target will be in CSS, that is, the locatorType will be set to CSS by default.

An example of this is CSS = argument.

Launch the Selenium IDE, choose Options... from the Options menu, and switch to the Locator Builders tab. The left-hand pane will be mounted with a list of available locator builders, such as, ui, id, link, name, css, dom:name, xpath:link, xpath:img, xpath:attributes, xpath:idRelative, xpath:href, dom:index, and xpath:position. The list of available locator builders is shown in the following screenshot:

Locator prioritization

Drag and drop locator builders on the left-hand side to change their order. Finally, click on the OK button, and restart the Selenium IDE for the changes to take effect. To reset the default settings of the Selenium IDE, click on the Reset option found in the bottom-left corner of the Selenium IDE options window pane.

You have been reading a chapter from
Selenium Essentials
Published in: Mar 2015
Publisher:
ISBN-13: 9781784394332
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image