# 'Element text should be' in the Browser library

**URL:** <https://forum.robotframework.org/t/element-text-should-be-in-the-browser-library/3490>\
**Category:** Browser\
**Created:** [27 March 2022 07:17 UTC](https://forum.robotframework.org/t/element-text-should-be-in-the-browser-library/3490 "2022-03-27T07:17:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![GalManz](https://avatars.discourse-cdn.com/v4/letter/g/d2c977/32.png) [@GalManz](https://forum.robotframework.org/u/GalManz)\
**Post date:** [27 March 2022 07:17 UTC](https://forum.robotframework.org/t/element-text-should-be-in-the-browser-library/3490/1 "2022-03-27T07:17:36Z")

</div>

Hi,

Which keyword in the Browser library do the same as the selenium library keyword ‘Element text should be’?

Thanks

---

<div class="post-metadata">

**Author:** ![René](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/ren%C3%A9/32/7_2.png) [@René](https://forum.robotframework.org/u/Ren%C3%A9)\
**Post date:** [27 March 2022 08:13 UTC](https://forum.robotframework.org/t/element-text-should-be-in-the-browser-library/3490/2 "2022-03-27T08:13:31Z")

</div>

In Browser most if the `Get ...` keywords are assertions.

In your specific case it would be:

```nohighlight
Get Text <selector> should be <expected>

```

See here how assertions work:  
[https://marketsquare.github.io/robotframework-browser/Browser.html#Assertions](https://marketsquare.github.io/robotframework-browser/Browser.html#Assertions)

And look into the Get keywords for some examples.

Regards  
René

---

<div class="post-metadata">

**Author:** ![GalManz](https://avatars.discourse-cdn.com/v4/letter/g/d2c977/32.png) [@GalManz](https://forum.robotframework.org/u/GalManz)\
**Post date:** [27 March 2022 10:19 UTC](https://forum.robotframework.org/t/element-text-should-be-in-the-browser-library/3490/3 "2022-03-27T10:19:26Z")

</div>

Thanks!

Another question:  
Which keyword in the Browser library do the same as the selenium library keyword ‘Page Should Contain Element’?

---

<div class="post-metadata">

**Author:** ![René](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/ren%C3%A9/32/7_2.png) [@René](https://forum.robotframework.org/u/Ren%C3%A9)\
**Post date:** [27 March 2022 12:35 UTC](https://forum.robotframework.org/t/element-text-should-be-in-the-browser-library/3490/4 "2022-03-27T12:35:09Z")

</div>

```python
Get Element States <selector> contains attached

```

Or visible or other states you are looking for.

---

<div class="post-metadata">

**Author:** ![GalManz](https://avatars.discourse-cdn.com/v4/letter/g/d2c977/32.png) [@GalManz](https://forum.robotframework.org/u/GalManz)\
**Post date:** [27 March 2022 13:46 UTC](https://forum.robotframework.org/t/element-text-should-be-in-the-browser-library/3490/5 "2022-03-27T13:46:13Z")

</div>

I use: Get Element

If it succeeds it returns: INFO Locator found successfully.  
And if it failed in returns:  
FAIL TimeoutError: locator.elementHandle: Timeout 10000ms exceeded.  
=========================== logs ===========================  
waiting for selector “xpath=//\*[@id=“menu-list-grow”]”

Is it OK?
