Add support for querying the DOM using text selectors, looking for element(s) based on text that is shown to end-users as part of presenting element(s), eg. page.click('text=Log in');, regex based page.click('text=/Log\\s*in/i'); or simply page.click('"Log in"');
Supporting text based selectors are important from the perspective of test stability, it's a way to specify "non-flaky" selectors that match on the text of an element rather than it's DOM specifics (element type or location in DOM).
Add support for querying the DOM using text selectors, looking for element(s) based on text that is shown to end-users as part of presenting element(s), eg.
page.click('text=Log in');
, regex basedpage.click('text=/Log\\s*in/i');
or simplypage.click('"Log in"');
Supporting text based selectors are important from the perspective of test stability, it's a way to specify "non-flaky" selectors that match on the text of an element rather than it's DOM specifics (element type or location in DOM).
Relevant links: