Hi. I haven't been able to figure this one out. Trying to write an 
automated test that uses selenium.webdriver.firefox.webdriver

The manifest file has
FALLBACK:
/online.html /offline.html

So that at /online.html the browser displays the cached copy of 
/offline.html when the server is offline

Also, to simulate server unavailable for testing
/online.html returns a 200 response
/online.html?offline=1 returns 503

This all works fine when I browse manually
/online.html displays "I am online"
/online.html?offline=1 displays "I am a cached page"

I want the selenium test to get /online.html?offline=1 and see "I am a 
cached page" /offline.html
But it's only showing a blank page
I think it's stopping at the 503 and not loading from the app cache

    def test_offline(self):
        """Simulate site being offline"""
        self.selenium.get('%s%s' % (self.live_server_url, 
'/online.html?offline=1'))
        self.assertIn('cached page', self.selenium.page_source)

How can I make it test this? Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/YrAnOOsSaKAJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to