Playwright Python - XPath Functions

preview_player
Показать описание
In this video you'll learn how to locate web elements using xpath and xpath functions.

XPath functions enhance XPath expressions by providing additional capabilities such as manipulating strings, performing mathematical calculations, extracting values, and filtering elements based on conditions.

XPath and CSS selectors can be tied to the DOM structure or implementation. These selectors can break when the DOM structure changes. Long CSS or XPath chains below are an example of a bad practice that leads to unstable tests.

Playwright is a modern, fast and reliable browser automation tool from Microsoft that enables testing and automation across all modern browsers including chromium, firefox and webkit.
Рекомендации по теме
Комментарии
Автор

What is the difference between using xpath with or without contains compared to page.get_by_text with exact set to True or False? Is the xpath method more specific because it takes a type? Thank you!

thehumoroushackerette
join shbcf.ru