Why is SeleniumTestCase undocumented?

I was digging in through the source code today and came across SeleniumTestCase. I got a bit curious to know why the docs only show how to use LiveServerTestCase, since SeleniumTestCase seems like an improved version of LiveServerTestCase

Is SeleniumTestCase safe to use?

1 Like

Our policy is that undocumented things are private API’s and there are no promises around them - they colud disappear any time, they could rely on a particular setup, etc.

SeleniumTestCase exists to support Django’s own test suite. It seems like it relies on some extensions in Django’s test runner, for example the __new__ method creates multiple subclasses based on the --selenium argument. I don’t think this is portable.

I would only use the source of SeleniumTestCase as inspiration for your own test case class. Similar to the documented example of LiveServerTestCase.

3 Likes