When I try to capture "warning message", the NoAlertException is being thrown. For example I enter a user name and wrong password and click on "submit" button; now a message will be displayed saying "Please enter a correct password". I am trying to get this message but I could not find the right code. Can any one help me to get the message?

  • 1
    Hi user12701 - are you sure that your web page is using a javascript alert to display the message? It might be an html overlay, which you need to look for in a quite different way. – Vince Bowdren Jul 16 '15 at 15:24

If it is a browser pop-up, you'll need to switchTo() that window. Otherwise (modal/light-box) you shouldn't have an issue finding it in the DOM using DevTools' element highlighter.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.