Skip to content

Selenium 2.32.0 breaks Open Browser #194

Closed

Description

@matthewsac

Upgraded to version 20.0.1 of Firefox and Selenium version 2.32.0

When executing scripts in Robot Framework 2.7.7 using Selenium2Library 1.10.0, RF fails to open a Webdriver window in Firefox, and I get the following exception which repeats one time for every suite:
TypeError: environment can only contain strings

The command-line execution string looks like this (copied out of RIDE):
pybot.bat --variablefile C:\TL-Main\TLAutomation\qa.py --argumentfile c:\users\curtis~1.mat\appdata\local\temp\RIDEhirws5.d\argfile.txt --listener C:\Python27\lib\site-packages\robotide\contrib\testrunner\TestRunnerAgent.py:56558 C:\TL-Main\TLAutomation

Selenium can drive Firefox through Python without issue, and there are no issues with running the same scripts in Chrome or IE using the same command-line string.

I suspect but cannot confirm that the error is being caused by the way firefox_binary.py in the Webdriver library is being called, since this is the place where the Popen command is executed that tries to open Firefox (no stack trace is being given, sorry). I also investigated whether this change in FF 20.0.1 (https://bugzilla.mozilla.org/show_bug.cgi?id=846848) was the culprit - I changed the C:\TL-Main\TLAutomation path to (MACHINENAME)\C$\TL-Main\TLAutomation and it yielded identical results.

UPDATE: The reported behavior is limited to when Open Browser is used to open Webdriver windows on the local machine, either by explicitly specifying "browser=firefox" or by leaving it blank to allow Firefox to be chosen by default. This, however, works when invoked remotely in a setup where the local machine is set up as both a hub and a node in standalone:

Open Browser | http://www.cnn.com/ | remote_url="http://localhost:4449/wd/hub" | desired_capabilities=browser:firefox

UPDATE2: FF20 does not appear to be significant in the introduction of this bug. FF19 with Selenium 2.32.0 exhibits the same behavior, and rolling back 2.32.0 to 2.32.1 fixes it. The title of this issue was originally "FF20, Selenium 2.32.0 breaks Open Browser" but I have edited it to remove mention of FF20.

Activity

  1. suhanzhong commented on Apr 24, 2013

    @suhanzhong

    Should is the 2.32.0 release supports python3 result.
    in firefox_profile.py
    comments from __ future__ import unicode_literals Can be fixed
    or rolling back to 2.30.0

  2. j1z0 commented on Apr 24, 2013

    @j1z0
    Contributor

    Further update from my side, I can't reproduce this functionally at all on OSX, so I think this is a windows only issue.

  3. stevejefferies commented on Apr 29, 2013

    @stevejefferies
    Contributor

    For reference see the issue raised on the Selenium-WebDriver bug tracker (5508) - https://code.google.com/p/selenium/issues/detail?id=5508. There is a suggested patch (see PR in comment 5) which I can confirm works if people need to use 2.32.

  4. matthewsac commented on May 13, 2013

    @matthewsac
    Author

    Confirmed - the patch works as long as you're running locally. It's still broken if you're executing through a remote host, which I guess is to be expected. Either way, doesn't look like there's anything to do on this end. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions