Rayrun
← Back to videos

InnerHTML vs InnerText vs TextContent | Playwright Tutorial - Part 48

Hey Guys, in this video we will learn the difference between innerHTML vs innerText and TextContent in detail.

In this video, the content creator discusses the difference between three functions in HTML: innerText, textContent, and innerHTML. They explain that these functions are important for web development and testing. The video provides an example of how to use these functions by walking through the code. They demonstrate the differences between innerText, textContent, and innerHTML by manipulating a web page and showing the output. The creator uses Playwright, an automation tool, to interact with the web page and retrieve the desired data. They highlight that innerHTML returns the HTML code within an element, innerText returns the visible text within an element, and textContent returns all the text within an element, including both visible and invisible portions. The creator concludes by emphasizing the importance of having knowledge of HTML, CSS, and JavaScript for testing purposes.

Related Videos

#16 - ARIA and how Playwright is making use of it to identify UI controls?
#16 - ARIA and how Playwright is making use of it to identify UI controls?
Playwright web table concept | Playwright Typescript tutorial - Part 92
Playwright web table concept | Playwright Typescript tutorial - Part 92
Element Handle VS Locator API | Playwright Tutorial - Part 47
Element Handle VS Locator API | Playwright Tutorial - Part 47
Playwright Version 1.14 | Playwright Tutorial - Part 45
Playwright Version 1.14 | Playwright Tutorial - Part 45
TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

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].