Playwright Python - Input Field Locator

Описание к видео Playwright Python - Input Field Locator

In this video you'll learn how to locate input fields using their label and placeholder.

✨ Ultimate Guide to Python 3.10 🐍 - http://bit.ly/pywizard
✨ Full Playwright Course 🎭 - https://bit.ly/playwright-auto

Most form controls usually have dedicated labels that could be conveniently used to interact with the form. In this case, you can locate the control by its associated label using page.get_by_label().

Inputs may have a placeholder attribute to hint to the user what value should be entered. You can locate such an input using page.get_by_placeholder().

🔧 When to label locator?
Use this locator when locating form fields.

🔧 When to use placeholder locator?
Use this locator when locating form elements that do not have labels but do have placeholder texts.

Комментарии

Информация по комментариям в разработке