From the course: Playwright Python and Pytest for Web Automation Testing: Master Modern Web Testing with Playwright and Pytest in Python
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Locator role
In this lesson, we'll learn more about the GetByRowLocator. So let's go ahead and jump on to our terminal and start a interactive session. Now if you're wondering why I have code highlighting and suggestions in my terminal, well that's because I've enabled ptPython for my Python sessions. you'd like to do the same as well check out the resources of this link now go ahead and just set up the boilerplate okay so i have set up the browser opened a new page and now we can get started now to test our locators it'd be nice if we have a website with all kinds of different html elements and we can just do that with this website of course you'll find the same in the resources as well that is boot swatch dot com hyphen default now let's go ahead and go to the same you can see it is a normal website with all kinds of elements buttons headings so to start let's say i would like to select a button and we already selected links so let's try selecting buttons like this default button so let's go…
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
-
-
-
(Locked)
Playwright Python REPL8m 40s
-
(Locked)
Locator role8m 26s
-
(Locked)
Locators input field3m 39s
-
(Locked)
Locator text4m 6s
-
(Locked)
Locator alt text2m 22s
-
(Locked)
Locator title1m 56s
-
(Locked)
Locating with CSS selectors10m 7s
-
(Locked)
CSS selectors hierarchy8m 10s
-
(Locked)
CSS selectors pseudo classes9m
-
(Locked)
Locators XPath6m 5s
-
(Locked)
XPath functions7m 4s
-
(Locked)
Other locators10m 59s
-
(Locked)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-