Check for A Message When Testing with Selenium

10 views
Skip to first unread message

Austin West

unread,
Apr 20, 2016, 5:06:22 PM4/20/16
to Django users
I'm attempting to write a Selenium test for my django app that performs a custom action in the admin page. If the action is successful, the i use the message_user function to send a success message back to the user, e.g. "Action successful!". It appears that this message doesn't appear in the raw html when the new page is loaded, and as such I can't perform an assert that the message is appearing and the action was successful.

I know I could do this using the context/etc. using the built in django client, but is it possible to do it using an external web driver like Selenium?

Thanks in advance.
Reply all
Reply to author
Forward
0 new messages