Daily log - April 16, 2009
by Sean Cribbs
Cucumber/Webrat with Selenium I spent most of today trying to get our Cucumber setup running on Selenium and producing the same results as plain Webrat rails mode. A few things I found out:
click_button, passing a label or id, doesn’t work exactly the same way with Selenium. In most cases, you can just use the plain
click_button, especially if there’s only one visible button on the page. In cases where you can’t, it’s best to call Selenium directly, or cheat with the
- If you have post-conditions (“Then” steps) that check the validity of things in the database, make sure to include in the
selenium.wait_for_pagein the action before, or at the top of the post-condition step. This will make sure Selenium has finished what it’s doing before you check the database.
- You can easily provide alternate actions inside your step definitions with
:seleniummode). If you find you’re doing this too much, it might be better to provide separate step definition files for each mode.
I didn’t finish this last night because…
I was at an event in Chapel Hill called the “YouTube Tournament”, organized by some students at UNC SILS, where my wife is attending graduate school. (If you follow me on Twitter, that’s all those #yttour messages. No, my account wasn’t compromised.) 12 people were contestants, and played their favorite strange/funny/unique videos to be judged against their opponent at each round. Here’s a list of the ones I can remember, in no particular order (some have explicit language):
- Pickle Surprise
- GANGSTA BARNEY
- kittens inspired by kittens
- Balloon Fail
- Knives VS Cops
- 1-900-HOT-PREZ #2
- Powerthirst 2: Re-domination
- My name is John Daker
- Flea Market Montgomery Mini Mall Rap
- Crazy Raccoon House Party
- Christian the Lion (There’s a bunch of versions of this video, I couldn’t find the exact one.)
- Shoes the Full Version
- Pretty much everywhere it’s gonna be hot
- Richard Simmons Flips out!
- Be Aggressive
- Anchor Laughs at Murder Live On the Air
In addition to videos from the contestants, the event organizers played a few of their favorites during breaks. We saw two cheesy Toto videos, a “literalized” remake of A-ha’s “Take On Me”, and a Rickroll, but this one was my favorite non-competition video of the night.
UPDATE: Here’s some more I found by searching twitter for #yttour.