Hi. I use the Locator("myLocator").InnerTextAsync() function to fetch the div inner text but that div has also a button with no text but a material icon, which is represented by a text into the DOM. Should Playwright returns also that material icon description?
<div class="flex-fill overflow-hidden text-truncate"> <button type="button" class="btn btn-link link-dark p-0 border-0"> <span class="align-text-bottom material-icons material-icons-outlined md-18">more_vert</span> </button> "Number" </div>This thread is trying to answer question "Should the Locator('myLocator').InnerTextAsync() function in Playwright return the material icon description along with the div inner text?"
Hi, that is the expected behavior: https://www.w3schools.com/jsref/prop_node_innertext.asp
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].