Im looking for a good way to expect a certain text from an "alert" that fades out after 5 seconds.
This is for a basic login test (im pretty new to automation). I've been using cucumber/capybara and im using it with poltergeist for headless test (mainly for CI).
Im using chrome dev tools to try and find info about the element itself (the alert). It's not a popup alert, it's sort of a fade-in alert on the top of the screen. But all chrome returns is the class it belongs too (this is a rails web app) and the text contained within the alert.
Im not super familiar with rails, so is there some way to just search by the text? That seems to be the easiest way?
edit: Apparently they are rails alerts using :flash, they are just faded in and out using jquery.