How to automate returns via toast with robot

I’m automating a website and need to validate during login whether possible errors, such as not filling in the login field, are handled. However, these error messages are displayed via toast notifications and disappear quickly. How can I automate this using Robot Framework?
Important details: The application’s frontend is built in Angular.

Hi Higor,

You didn’t mention which library you’re using, but keywords like these might be what you’re after:

Dave.

Hi Dave,

I’m currently using SeleniumLibrary and your answer was accurate, I managed to get the return with the expected error message through sleep and Wait Until Page Contains

Thank you very much for your feedback, if you have any suggestions I would also appreciate it.

1 Like

Hi Higor,

I find the quickest way to get up to speed with an automation tool is to at least skim read the documentation so I know what capabilities are there, in this case the reading the library documentation for the libraries.

I’d suggest you at least read through the names of the keywords and skim over the descriptions so you have a rough idea what each keyword can do for you, from these libraries:

  • SeleniumLibrary
  • BuiltIn
  • String
  • Collections

Next go to Resources and spend 2-5 minutes getting an idea what libraries are available to you (expand the show more button) this will save you time in the future.

Also spend a few minutes getting familiar with whats in the User Guides just skim over the main page, again knowing whats there and where to find it will save you time in the future.

After that, remember the forum is here to help you if you get stuck (seems you figured that out :+1: ), there’s been lots of gems of information in the forum over the many years, so searching the forum might help you find the answer too, we try our best to help, but we’re all volunteers here.

Hope that helps you on your robot framework journey,

Dave.

3 Likes