'Log in to the admin.'

def admin_login(self, username, password, login_url='/admin/'):

    self.selenium.get(('%s%s' % (self.live_server_url, login_url)))
    username_input = self.selenium.find_element_by_name('username')
    username_input.send_keys(username)
    password_input = self.selenium.find_element_by_name('password')
    password_input.send_keys(password)
    login_text = _('Log    in')
    self.selenium.find_element_by_xpath(('//input[@value="%s"]' % login_text)).click()
    self.wait_page_loaded()
