> For the complete documentation index, see [llms.txt](https://docs.puppetry.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.puppetry.app/master/test-step/page-assertions.md).

# Page Assertions

## page.assertTitle

Asserts that the page title satisfies the given constraint

![](https://2843146877-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdyKJ-zzeS2hB7DF04J%2F-LhVJR-Uk0-fpD-isKCr%2F-LhVJTdAq6LPSUt_xVMq%2Fpage.asserTitle.png?alt=media\&token=b7c001bb-ebec-4b13-a6d5-46a5417c0de8)

## page.assertUrl

Asserts that the page URL satisfies the given constraint

![](https://2843146877-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdyKJ-zzeS2hB7DF04J%2F-LhVJR-Uk0-fpD-isKCr%2F-LhVJWQ6YuX180ncqbmt%2Fpage.assertUrl.png?alt=media\&token=4e26f00f-5875-4588-9c98-ba35a136264f)

## page.assertHTML

Asserts that the page content (HTML) satisfies the given constraint

![](https://2843146877-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdyKJ-zzeS2hB7DF04J%2F-LhVJR-Uk0-fpD-isKCr%2F-LhVJZYd3kD2a2LJBt_1%2Fpage.assertHtml.png?alt=media\&token=dfd1330d-9036-40f4-9a75-bb65fbef4c84)

## page.assertNodeCount

Asserts that number of elements matching a specified selector satisfies the given constraint

![](https://2843146877-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdyKJ-zzeS2hB7DF04J%2F-LhVJR-Uk0-fpD-isKCr%2F-LhVJamoN-jA53_rzANx%2Fpage.assertNodeCount.png?alt=media\&token=3f072787-4b89-4d7e-a9bf-7240ae415c9c)

## page.assertScroll

Asserts that [window scroll](https://developer.mozilla.org/en-US/docs/Web/API/Window/scroll) offset satisfies the given constraint

![](https://2843146877-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdyKJ-zzeS2hB7DF04J%2F-LhVJR-Uk0-fpD-isKCr%2F-LhVJdPKFj1xWPhZuJZK%2Fpage.assertScroll.png?alt=media\&token=f2300886-0926-4966-b586-c2eb2ad053af)

## page.assertVar

Asserts that variable associated with a given name satisfies the given constraint

![](https://2843146877-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdyKJ-zzeS2hB7DF04J%2F-LhVJR-Uk0-fpD-isKCr%2F-LhVJgFndGiBquWRuDTf%2Fpage.assertVar.png?alt=media\&token=54cb3d20-1c7d-4dc6-a973-589fcf272e67)
