Getting started with Selenium testing in Django 1.4

Last Tuesday’s Django District meetup was a series of lightning talks focused on testing in Django. I presented on getting started with in-browser testing in Django, using Selenium.

Slides are below, or download from the example repository. Hopefully I’ll get a chance to annotate these better and add some more examples in the next week or so.

Getting started with Django and Selenium So, in browser testing? What's new in Django 1.4? LiveServerTestCase LiveServerTestCase runs a dev server for testing Starting tests Firefox activated Firefox closed and tests over Selenium WebDriver Drive different browsers WebDriver actions Finding page elements Providing data input More interactions Element methods Give the TestCase a WebDriver object Write test methods that interact with the browser Test effects of integrated JavaScript Wrap up

Originally published April 2012

Are you a Django developer? Have you found yourself wishing you could reuse the code you write or looking for some guidance on building standalone Django apps?

Check out my upcoming book, Django Standalone Apps: A developer's fieldguide to developing reusable Django applications the first guide written specifically for writing standalone apps.