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.
Actions text input
In this lesson, we're going to learn the actions which we can perform in an input field. Now first of all, let's go ahead and select the same. So we use page get by label locator and the label is email address like this. I go ahead and highlight the locators you can see we have two because there's one right here as well so let's try to select it based on the placeholder first of all I'll remove the locator or the highlighter. So footer dot highlight. Okay, out of the way. So we can use page get by placeholder. And the placeholder is enter email. And now if I go ahead and highlight it you can see only this one gets highlighted of course here you could use the first selector as well that is after this locator you could add the dot first but this is a good use case of the get by placeholder so now that we have got our element we'll go ahead and extract it into a variable so we have our get by placeholder can say input and let's just store it and now the first action which we can perform…
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.