Is it possible to capture the unexpected error message in an web application…

Is it possible to capture the unexpected error message in an web application using selenium web driver.. for example when database connectivity loss during the transaction, so how can i capture that error message using web driver…

Maran Default Asked on July 10, 2015 in Selenium WebDriver.
Add Comment
3 Answer(s)

Need more details.
This message is text on pop up window or alert, or you want to check response from server?

victor Reviewer Answered on July 10, 2015.
Add Comment

Text on pop up window…..

Maran Default Answered on July 10, 2015.
Add Comment

if it’s a new window, you shod switch to it, and then get text of its element
To switch to last opened window use:
for (String win:driver.getWindowHandles()){
driver.switchTo().window(win);
}
wait for feedback.

victor Reviewer Answered on July 10, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.