# 'Page should contain' in the Browser library

**URL:** <https://forum.robotframework.org/t/page-should-contain-in-the-browser-library/8945>\
**Category:** Browser\
**Created:** [8 June 2025 19:41 UTC](https://forum.robotframework.org/t/page-should-contain-in-the-browser-library/8945 "2025-06-08T19:41:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tasnim](https://avatars.discourse-cdn.com/v4/letter/t/7ba0ec/32.png) [@tasnim](https://forum.robotframework.org/u/tasnim)\
**Post date:** [8 June 2025 19:41 UTC](https://forum.robotframework.org/t/page-should-contain-in-the-browser-library/8945/1 "2025-06-08T19:41:00Z")

</div>

Hi,

Which keyword in the Browser library do the same as the selenium library keyword ‘Page should contain’?

Thanks

---

<div class="post-metadata">

**Author:** ![falcon030](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/falcon030/32/3420_2.png) [@falcon030](https://forum.robotframework.org/u/falcon030)\
**Post date:** [8 June 2025 21:05 UTC](https://forum.robotframework.org/t/page-should-contain-in-the-browser-library/8945/2 "2025-06-08T21:05:18Z")

</div>

Well there are multiple ways to do this. But I think the easiest way is the following:

`Get Element count :text("The visible text that your page should contain"):visible > 0`

The `:text()` pseudo-class matches the smallest element containing specified text. Matching is case-insensitive, trims whitespace and searches for a substring.  
The `:visible` pseudo class makes sure that only visible elements are found.

---

<div class="post-metadata">

**Author:** ![RysZ](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/rysz/32/4570_2.png) [@RysZ](https://forum.robotframework.org/u/RysZ)\
**Post date:** [9 June 2025 12:10 UTC](https://forum.robotframework.org/t/page-should-contain-in-the-browser-library/8945/3 "2025-06-09T12:10:35Z")

</div>

In addition to falcon030 reply, I often use

Wait For Elements State selector visible timeout=(short timeout)  
or  
Get Element States selector validate value & visible

---

<div class="post-metadata">

**Author:** ![tasnim](https://avatars.discourse-cdn.com/v4/letter/t/7ba0ec/32.png) [@tasnim](https://forum.robotframework.org/u/tasnim)\
**Post date:** [9 June 2025 17:16 UTC](https://forum.robotframework.org/t/page-should-contain-in-the-browser-library/8945/4 "2025-06-09T17:16:41Z")

</div>

thanks @falcon030@RysZ i used Get Element States selector contains attached ( i used attached to verify if the element is not visible it may exist in the DOM)
