# Help how to Handle alert and validate messages

**URL:** <https://forum.robotframework.org/t/help-how-to-handle-alert-and-validate-messages/1943>\
**Category:** Browser\
**Created:** [14 June 2021 21:58 UTC](https://forum.robotframework.org/t/help-how-to-handle-alert-and-validate-messages/1943 "2021-06-14T21:58:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hgomar](https://avatars.discourse-cdn.com/v4/letter/h/cdc98d/32.png) [@hgomar](https://forum.robotframework.org/u/hgomar)\
**Post date:** [14 June 2021 21:58 UTC](https://forum.robotframework.org/t/help-how-to-handle-alert-and-validate-messages/1943/1 "2021-06-14T21:58:39Z")

</div>

Hi, in my company we are jsut starting with automation, we know practically nothing. we are using robotframework, browser library  
I need to verify the text and accept this kind of alert

found this  
[https://marketsquare.github.io/robotframework-browser/Browser.html#Wait%20For%20Alert](https://marketsquare.github.io/robotframework-browser/Browser.html#Wait%20For%20Alert)  
but im not understanding how it works, con someone provided me an example?

tried:  
${promise} = Promise To Wait For Alert action=accept text=Request Hours exceed available hours. [20.00]

Click id=accept

${text} = Wait For ${promise}

Should Be Equal ${text} Request Hours exceed available hours. [20.00]

but logs return

**KEYWORD** ${promise} = **Browser . Promise To** Wait For Alert, action=accept, text=Request Hours exceed available hours. [20.00]

| Documentation: | Wrap a Browser library keyword and make it a promise. Returns that promise and executes the keyword on background. |
| --- | --- |

13:58:55.292 FAIL Test library ‘Browser’ contains no keywords matching name ‘Wait For Alert’.

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [14 June 2021 23:46 UTC](https://forum.robotframework.org/t/help-how-to-handle-alert-and-validate-messages/1943/2 "2021-06-14T23:46:20Z")

</div>

Hi Hernan,

Which version of Browser Library do you have?

From what I can tell that keyword was added in version 5.0.1, about 26 days ago, so it’s a relatively newish keyword ([Add support to verify and get alert text · MarketSquare/robotframework-browser@fb8cd47 · GitHub](https://github.com/MarketSquare/robotframework-browser/commit/fb8cd47a771148826fe5a60833481e79213326a4))

Hope that helps,

Dave.
