Skip to content
CodeKruPro

Get Page Content

70/70

Get Page Content

page.content() returns the full HTML source of the current page, similar to viewing the page source.

Task:

  1. Navigate to https://testkru.com/Elements/TextFields
  2. Get the page content using page.content()
  3. Check if it contains the string "preFilledTextField"
  4. Check if it contains the string "invisibleField"
  5. Print the results and whether the content length is greater than 0

Expected output:

Contains preFilledTextField: true
Contains invisibleField: true
Content length > 0: true