Playwright Python - Input Field Locator

Veröffentlicht am: 20 June 2023
auf dem Kanal: Rahul Mula
2,289
24

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.


Auf dieser Seite können Sie das Online-Video Playwright Python - Input Field Locator mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Rahul Mula 20 June 2023 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 2,289 Mal angesehen und es wurde von 24 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!