From the course: Robot Framework Test Automation: Level 2
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
Partial locators: starts-with - Selenium Tutorial
From the course: Robot Framework Test Automation: Level 2
Partial locators: starts-with
- [Instructor] When you're automating web applications, you're definitely going to come across situations where the locator your trying to use has what we call dynamic attributes. And what I mean by that is if you're depending upon an ID, or a type or a class, the value for that attribute is not always going to be static. It might change anytime you log into the site, or anytime you visit the page. Sometimes the beginning of the attribute value will be dynamic, sometimes the end of the attribute value will be dynamic, and sometimes the beginning and the end of the attribute value will be dynamic. In those cases you're going to use what we call partial locators to be able to find the desired element. Here on the screen I've got some example click element keywords with Xpath and CSS locators. And in yellow, I've highlighted the differences between using a partial locator versus our normal static basic syntax. You can see the XPath syntax deviates quite a bit from the standard basic…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
Web locators advanced overview1m 10s
-
(Locked)
Basic XPath and CSS syntax11m 24s
-
(Locked)
Absolute relationships (XPath and CSS)8m 23s
-
(Locked)
Relative relationships (XPath and CSS)9m 44s
-
(Locked)
Partial locators: starts-with5m 30s
-
(Locked)
Partial locators: ends-with2m 10s
-
(Locked)
Partial locators: contains8m 3s
-
(Locked)
Scenario: Find and use multiple elements5m 7s
-
-
-
-
-
-
-