Official Selenium Blog

February 8, 2012

Announcing Selenium 2.19: the Prancing Unicorn release

Filed under: Releases — shs96c @ 4:53 pm UTC

You might be pleased to hear that Selenium 2.19 has been released (download it from here!). There’s one big user facing changing that we’d like to tell you about: the webdriver-backed selenium can now be used in supported languages.

By providing this capability, it’s possible to migrate from RC to the WebDriver APIs without rewriting all your tests in one fell swoop (which must be a Good Thing, right?) An example of how to use it in Python would be:

driver = RemoteWebDriver(desired_capabilities = DesiredCapabilities.FIREFOX)
selenium = DefaultSelenium('localhost', 4444', '*webdriver', 'http://www.google.com')
selenium.start(driver = driver)

Provided you keep a reference to the original webdriver and selenium objects you created you can use the two APIs interchangeably.  You’ll see that the magic is the “*webdriver” browser name passed to the selenium instance, and that we pass the webdriver instance when calling start().

We hope you like it!

PS: I have no idea why this is the Prancing Unicorn release, but it’s been a while since we named one :)

9 Comments »

  1. I’ve been using WebDriverBackedSelenium in my Java-based project for a while now, using the steps outlined in http://seleniumhq.org/docs/appendix_migrating_from_rc_to_webdriver.html#migrating-to-webdriver-reference

    Are you saying that it’s been newly released in other supported languages, or that it wasn’t completely finished before, or that you couldn’t use your WebDriver and WebDriverBackedSelenium objects interchangeably until now?

    Thanks,
    Jeff

    Comment by Jeff Clyne — February 8, 2012 @ 7:57 pm UTC | Reply

    • Until 2.19 the only implementation of the webdriver-backed selenium was for Java. With 2.19, the other languages can make use of this emulation through the selenium server. Put another way, nothing has changed for Java users.

      Comment by shs96c — February 8, 2012 @ 9:03 pm UTC | Reply

  2. Has a brony named that release? Hah.
    Either way, since you picked up the releasing speed, Selenium has gotten ever so much better. I love grid 2!

    Keep up the great work!

    Comment by White — February 9, 2012 @ 9:29 am UTC | Reply

  3. Hello,

    Is there any way to share a single session between selenium 2 (new API commands) and selenium 1 (old API commands)?

    Unfortunatelly, API for selenium 2 (JSON wire) creates session ID that is not shared with old selenium 1 API.

    This makes it impossible to use paralelly both APIs. The old API had some very nice commands, while missing some new features from new API.

    I could not find any API command like “setSessionId/mynewSessionID”.

    Any clues how to use old and new API at the same time sharing one session?

    Thank you.
    Lubos

    Comment by lubosdz — February 13, 2012 @ 11:25 am UTC | Reply

    • This is exactly the case that the new launcher mentioned above handles. You can do basically the same thing in Java too.

      Comment by shs96c — February 22, 2012 @ 11:13 am UTC | Reply

  4. Got it. se = name_by_which_Se_was_imported(“localhost”,4444,”*webdriver”,”http://and_so_forth”)

    It’s really, really cool.

    Comment by Frisco Del Rosario — February 22, 2012 @ 2:15 am UTC | Reply

  5. Thanks a lot for this release !

    By the way, I’ve found that PHPUnit_Selenium is supporting WebDriver API for PHP: I suggest it should be mentionned in the PHP support paragraph of Selenium download page ….

    Comment by poum — February 22, 2012 @ 8:16 am UTC | Reply

  6. How might this:

    driver = webdriver.Remote(desired_capabilities=DesiredCapabilities.FIREFOX)
    browser = selenium(‘localhost’, 4444, ‘*webdriver’, ‘http://www.google.com’)

    browser.start(driver=driver)

    browser.open(‘http://www.google.com’)

    result in this error?:

    TypeError: start() got an unexpected keyword argument ‘driver’

    Comment by Frisco Del Rosario — March 4, 2012 @ 6:01 am UTC | Reply

    • Sheeeeesh. Co-worker rolled back to v. 2.16.1. I broke something rolling forward to v. 2.19.

      Comment by Frisco Del Rosario — March 5, 2012 @ 10:38 pm UTC | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Rubric Theme Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 541 other followers

%d bloggers like this: