S
S
Sergey Nizhny Novgorod2016-08-14 09:43:09
JavaScript
Sergey Nizhny Novgorod, 2016-08-14 09:43:09

Why does selenium open about:blank and not the required page?

Hello.
I did a selenium test. I start the web server, I start the test. The browser opens, in the URL line - about:blank&utm_content=firstrun. Well, actually, there are no pages of the site.
The test itself:

from django.test import LiveServerTestCase
from selenium import webdriver
from selenium.webdriver.common.keys import Keys

class LoginTestCase(LiveServerTestCase):

    def setUp(self):
        self.selenium = webdriver.Firefox()
        super(LoginTestCase, self).setUp()

    def tearDown(self):
        self.selenium.quit()
        super(LoginTestCase, self).tearDown()

    def test_login_webdriver(self):
        selenium = self.selenium
        #Opening the link we want to test
        selenium.get('http://127.0.0.1:8000/auth/login/')
        #find the form element
        username = selenium.find_element_by_id('username')
        password = selenium.find_element_by_id('password')
        submit = selenium.find_element_by_id('submit')

        #Fill the form with data
        username.send_keys('testuser')
        password.send_keys('testpass')

        #submitting the form
        submit.send_keys(Keys.RETURN)

Did I forget to specify some environment data?
________
Added chromedriver - prescribed Path to it - everything works. It can be seen that webdriver.Firefox() is really some kind of broken one.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
Kovalsky, 2016-04-28
@ACCNCC

map.sort(function(a, b) {
    return a.value - b.value;
});

D
dom1n1k, 2016-04-28
@dom1n1k

The error of the author's version is that the conversion to a numeric type (plus sign) is behind the bracket, that is, it is performed after the comparison. And it is necessary to - first they led to numbers, then everything else.

E
ELF64, 2016-08-14
@Terras

Try downgrading firefox selenium2.ru/news/178-firefox-48.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question