Forums

Upgrading Firefox version for Selenium use

I'm running a Selenium script and the webpage I'm pulling information from refuses the connection because the version of Firefox on the virtual machines is so old. It's currently version 17, released November, 2012.

Any chance of this getting updated to a more recent version? Selenium would probably also need to be updated as they only work with recent version. The current Selenium version is 2.33

We're not going to be able to update Firefox for some time. You could install the linux64 Firefox of your choice by downloading and unpacking the Firefox binary, though.

You can fairly easily upgrade selenium by using a virtualenv and installing the version you want to work with.

How do i know which version of firefox am i using?

firefox --version

Just an aside: Since I posted that message about installing a new version of Firefox, I have actually tried it and I wasn't able to get it to work. It looks like, at present, the latest version of Firefox that will work on PythonAnywhere is already installed. We will have to have a look at what we need to change in order to get a newer version of Firefox installed and working.

  1. How can I install an older version of firefox in a virtual enviroment since i cannot use sudo.
  2. I am trying to run selenium to test my web. When I run them from pythonanywhere console it works but i am trying to implement it inside my web page, and it is not working. throws this error.

Message: The browser appears to have exited before we could connect. If you specified a log_file in the FirefoxBinary constructor, check it for details.

It pop when i try to open webdriver.

        profile = self._set_profile(proxy)
    for retry in range(3):
        try:
            self.browser = webdriver.Firefox(firefox_profile=profile)
            break
        except Exception, e:
            self.logger.error("error loading webdriver: %s",e,exc_info=True)
            time.sleep(3)
    else:
        self.logger.error("cannotload driver")

You can't install a different version of Firefox on PythonAnywhere.

SPecify a log_file in the FirefoxBinary constructor and have a look in the resulting file.

Selenium Webdriver 2.53.0 works with Firefox 46.0. You can find the the mentioned version at https://support.mozilla.org/en-US/kb/install-older-version-of-firefox. You can check the details in the above link. Also I'm a selenium tester and I have a web page which describes about the selenium testing. If your audience is also interested in Selenium Testing, they can take a look here: Selenium Training Course