How can I sync the html/session used between Django's 'Client' and Selenium's webdriver
问题 I'm trying to test that logged in users can log out on my Django site with Lettuce, Selenium and lettuce_webdriver. In my terrain.py I have: @before.all def setup_browser(): profile = webdriver.FirefoxProfile() profile.set_preference('network.dns.disableIPv6', True) world.browser = webdriver.Firefox(profile) world.client = Client(HTTP_USER_AGENT='Mozilla/5.0') And then when I 'login': @step(r'I am logged in as "(\w*)"') def log_in(step, name): world.client.login(username=name, password=name)