Official Selenium Blog

December 24, 2010

Selenium 2.0 beta 1 Release

Filed under: Uncategorized — shs96c @ 11:18 am GMT+0000

We recently released the first of the betas for Selenium 2. It’s available for Java, C# and Ruby. If you’ve been holding off trying Selenium 2 because of the alpha label, then the biggest improvement you’ll see is with the new WebDriver APIs, but there’s a lot more!

Of course, we’d love this release to be completely bug free, but this is, after all, a beta, so there are some known issues:

  • The selenium 1.x emulation using IE is a little flaky.
  • The ChromeDriver is not as capable as the others.
  • Anything in our bug list.

You can download it from here:

http://code.google.com/p/selenium/downloads/list

You can read the javadocs and the ruby docs.

An obvious question is “When will the beta end?” The short answer is when we’ve implemented the alerts and prompts and advanced user interactions APIs in all supported browsers. We expect there to be some flex in some APIs (removing deprecated methods, and within the advanced user interactions API) but what you have here is basically what you’re going to get when we hit 2.0 final. I have no idea how long this will take, but if you’re interested in helping out, let us know!

Thanks are due to all the committers who have worked so hard to get this code into shape. Thanks are also due to all the people who have taken the time to file bugs, ask for features and participated on the mailing lists. Thank you to you too, for going out and trying this new beta of Selenium 2.

You rock. 🙂

December 9, 2010

Atoms have come to Selenium IDE

Filed under: Uncategorized — adam goucher @ 10:11 pm GMT+0000

As mentioned in Simon’s Going Atomic: Why? and Going Atomic: How, part of the merging of Selenium and WebDriver is to share common code between the two. And as of the 1.0.10 release of Selenium IDE, this merged code, ‘atoms’ is now included.

Some early users of this release are noticing that this the atom that drives assertAttribute and verifyAttribute is causing their scripts to break. This post explains the ‘why’ and suggests how to fix them as well.

The HTML spec has the notion of a boolean attribute which is one that does something just by being there rather than by its value; checked and selected are two such examples of this. Optionally, you could give these boolean attributes a value that is the same as their name (checked=”checked”) and your page would still validate, but really, the browsers only care that the attribute exist.

Prior to 1.0.10, it was not uncommon for people to do something like

assertAttribute | checkbox@checked | checked

which fetches the value of the checked attribute on the checkbox with the id or name of checkbox and fails the script is the value is not checked.

In 1.0.10 though, that will fail even if it is checked. This is because checked is a boolean attribute and will now return either true or throw an exception saying the attribute doesn’t exist. Redoing the above step check that the boolean attribute is set results in:

assertAttribute | checkbox@checked | true

Thankfully, most of the real-world interaction with boolean attributes is focused on checked, disabled, hidden and selected and in these cases using assertAttribute is not really the right thing to do. Instead, the Selenium API provides wrappers for you to use.

checked assertChecked(locator), assertNotChecked(locator), verifyChecked(locator), verifyNotChecked(locator)
disabled assertEditable(locator), assertNotEditable(locator), verifyEditable(locator), verifyNotEditable(locator)
hidden assertVisible(locator), assertNotVisible(locator), verifyVisible(locator), verifyNotVisible(locator)
selected assertSelected*(locator, pattern), assertNotSelected*(locator, pattern), verifySelected*(locator, pattern), verifyNotSelected*(locator, pattern)

Checking for the absence of a boolean attribute that doesn’t have a nice wrapper is a bit of a pain though. In this example I am checking that the boolean attribute multiple is not on the select element with the name elephants.

assertEval | this.browserbot.findElement("css=select[name=elephants]").getAttribute("multiple"); | null

If you find yourself doing this very often, I suggest you wrap it up in a user-extension inside a plugin as something like

assertBooleanAttribute | css=select[name=elephants]@multiple | false
assertBooleanAttribute | css=select[name=elephants]@multiple | true

Hopefully this addresses some of the eventual ‘why the heck did my script break!?!?!’ problems that will no double crop up once Selenium IDE 1.0.10 gets wider distribution.

December 6, 2010

A Smattering of Selenium #35

Filed under: Uncategorized — adam goucher @ 11:29 am GMT+0000

(If I wasn’t still recovering from a cold there would be something witty here.)

November 30, 2010

Selenium Conference Survey

Filed under: Uncategorized — plightbo @ 2:32 am GMT+0000

Great news! Thanks to the initiative of our friends at Sauce Labs, we’re finally ready to host the first-ever Selenium Conference. We’re still working out a lot of the details, but so far we’ve decided this first conference will be sometime in April and hosted in San Francisco.

In order to figure out the rest of the details, we’re looking for feedback from the Selenium user community. Please take a moment to fill out the following survey. Your answers will help us properly plan the best possible conference.

http://bit.ly/fn8YyS

Thanks!

November 29, 2010

A Smattering of Selenium #34

Filed under: Uncategorized — adam goucher @ 12:48 pm GMT+0000

We’ll start this week with the official announcement of ‘Selenium 1.0 Testing Tools: Beginner’s Guide’ being available. Congrats David! (Still waiting for my copy…)

Oh. and I just noticed that this is the Selenium-iversay edition of these things.

November 22, 2010

A Smattering of Selenium #33

Filed under: Uncategorized — adam goucher @ 12:28 pm GMT+0000

…and here’s the links!

November 15, 2010

A Smattering of Selenium #32

Filed under: Uncategorized — adam goucher @ 12:15 pm GMT+0000

For those people paying attention to the goings-on in the Selenium world, yes, I am skipping something major until some of the details are worked out and announced. Until then, here are the links I accrued over the week.

  • Selenium uses Bamboo for its CI infrastructure. This week saw an upgrade to the latest version so if you want bleeding-edge code, get it here
  • The only browser Se has no real traction on right now is the BlackBerry one. But if someone wanted to tackle it, here is a post from Atomic Object on their BlackBerry development environment that would help kickstart things maybe.
  • Under the category of ‘let the language deal with things’ is html5lib for python and php which will parse html. Sometimes it is far faster to dump your attribute checks etc. to a native parser than let Se do it.
  • Scott Sims has released Selenium Fury upon the Ruby world. Think of it as a Page Factory implementation for Ruby.
  • Using Se-IDE and Easyb? Here is a thread on how to use the generated code without modification
  • JRuby is one of the better languages to use to write Se scripts in, and here are videos from JRubyConf 2010
  • Cheezy is writing a series on UI tests. So far there is How do we keep them from being brittle? and Part Two
  • Se2 for JS? Sure, why not. webdriver-js
  • Jari release the selenium-webdriver 0.1.0 gem this week. Why the big jump from 0.0.29 to 0.1.0? We’ve merged in the selenium-client gem into the main selenium codebase and now there is a single gem if you want to do 1.x or 2.x scripting.
  • Google Refine is just darn cool. I’m not really sure how it plays into automation, but I get the sneaky suspicion it could. Somehow.
  • The YUI Test has Se built right in.

November 8, 2010

A Smattering of Selenium #31

Filed under: Uncategorized — adam goucher @ 1:20 pm GMT+0000

The big news for last week was that I released Se-IDE 1.0.8 to very little fanfare. 1.0.9 should be a week or two and much more important a release.

  • Cheesecake! is isn’t nearly as impractical as Pacman, but still adds to the Se2 example bucket.
  • The London Se Meetup stuff from last week are starting to appear…
  • Some notes from CITCON last week as well. Seems like London was the place to be.
  • When designing automation frameworks (internal or external), the list of ways to make it hard to misuse should be kept in the back of your mind.
  • Of course your automation is under version control, right? RIGHT?!? What the Commit is rather amusing, if not a scathing satire. (hint: hit refresh)
  • Sauce Labs announced the availability of a CI API. But there is nothing to say that you couldn’t integrate their alternative annotation methods outside of CI too.
  • Harry Robinson did a session at CAST 2010 on ‘Exploratory Test Automation’ (which I missed; no, not bitter at all..) and I found his slides
  • If you are using the hosted Bamboo solution and most of your Se tests need windows, then here are instructions on how to create your own custom elastic agent image
  • Here is something fun, do you Hate or Love Se?
  • Slate seems like an interesting module for Python folks since it can parse and extract information from PDFs which is often a black hole in automation.
  • I continue to maintain that automation is programming (much to the annoyance of the classical black-box tester who is starting out with it) and that perhaps the easiest language to start learning is Python. Learn Python The Hard Way is a new book which looks like an ideal way to learn the language. I haven’t really gone through it to see which parts are more (or less) relevant to automation, but…
  • You’re cuking it wrong has lots of tips on how to write Cucumber scripts well.

November 1, 2010

A Smattering of Selenium #30

Filed under: Uncategorized — adam goucher @ 2:04 pm GMT+0000

I’ve missed a couple weeks due to travel and a complete system lock which meant I lost all the links I had open but not saved. So these are the ones I have recovered.

Oh, and both 2.0a6 and 2.0a7 have been released. We’re getting closer to the ‘API freeze’ which will mark the end of ‘alpha’ and the start of bug fixing (beta) for the final release.

October 8, 2010

Selenium 2.0a6 Released

Filed under: Releases — shs96c @ 3:59 pm GMT+0000

We are extremely pleased to announce the release of Selenium 2.0a6! Head over to the downloads page to get it while it’s hot, or wait just a little bit longer for it to appear in a maven repo near you. The .Net version will also be updated soon too, and the python and ruby libraries have been having smaller, more frequent releases all this time.

You’ll be pleased to hear that the Selenium 1.0 APIs have remained constant, so what’s changed? Here, in no particular order are the major changes you’ll find in 2.0a6:

  • Android support: you can now download the APK and run webdriver tests using Android 1.6 to 2.2.
  • Firefox 4 support.
  • Experimental IE9 support
  • New APIs for dealing with HTML5 elements (best implemented, for now, by the mobile webdrivers)
  • A richer .Net API
  • A move to Sizzle for locating elements using CSS in browsers that don’t have a native API for that.
  • Far better support for running your existing Selenium RC tests using WebDriver, helping you make a managed migration to the newer APIs.

There are also lots of nice touches for the more technically inclined, including the ability to re-use instances of FirefoxProfiles, better configurability when requesting a remote webdriver instance, better resource management and more shared code between the Selenium and WebDriver implementations.

Thank you to everyone who has taken the time to report a bug on our issue tracker, or raised problems on one of our mailing lists, or shown up for some of the banter on the IRC channel: without your involvement, the project wouldn’t be half as much fun, and wouldn’t be as capable as it is. Thanks are also due to the development team, who have poured an enormous amount of work into this release (538 revisions in under 90 days, or about 6 check-ins each and every day)

Hope you like it!

Next Page »

Create a free website or blog at WordPress.com.

Design a site like this with WordPress.com
Get started