Monday, October 17, 2011

Using the InternetExplorerDriver for WebDriver

Are you getting this error when trying to use the InternetExplorerDriver for WebDriver (Selenium 2.0)?


"Unexpected error launching Internet Explorer. Protected Mode must be set to the same value (enabled or disabled) for all zones. (NoSuchDriver)"

Don't worry, it's easier to fix than it sounds: Simply go into your Internet Options of Internet Explorer, select the Security tab, and all four zones to have the same Protected Mode value (either all on or all off). That's it!

Sample Code

using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.IE;
namespace WebDriverTests
    public abstract class WebDriverTestBase
        public IWebDriver WebDriver { get; set; }
        public void TestFixtureSetUp()
            WebDriver = new InternetExplorerDriver();
        public void TestFixtureTearDown()
            if (WebDriver != null)
        public void SetUp()
            WebDriver.Url = "about:blank";
    public class GoogleTests : WebDriverTestBase
        public void SearchForTom()
            WebDriver.Url = "";
            IWebElement searchBox = WebDriver
            searchBox.SendKeys("Tom DuPont");
            IWebElement firstResult = WebDriver
                .FindElement(By.CssSelector("#search cite"));
            Assert.AreEqual("", firstResult.Text);
Shout it


Saturday, October 8, 2011

What did Battlestar Galactica and Farscape have in common?

Thinking back on it, a lot.

The following analysis is written to show how easy it is to describe both shows simultaneously; the numbered notations distinguish the specific details for each show. While I realized that this little write up is probably a few years too late, it was still a blast to write.

While the first two seasons start off sounding somewhat formulaic, it is still amazing just how similar the shows are, and the specific similarities in seasons three and four are just uncanny.

Season 1 - Starts off great.

The show immediately sets itself apart from other shows on television with a strong and diverse cast of characters (1), a very unique sound track (2), high production value special effects (3), and a fresh take on realistic science fiction for television. The first season is mostly episodic, but consistently maintains a running story with strong character development. Viewers that tuned in every week loved the semi-serial format, but each episode was still a fun ride that you could easily jump in an enjoy.

Season one ends by masterfully bringing together all of the background story threads. A main supporting character finally has experiences a key event that we have been waiting for all season; they will never be the same (4). The characters find something that they have been looking for (5), and are immediately ambushed by the enemy. The cliffhanger has our heroes divided; leaving some in harm's way while the others have no choice by abandon their comrades for the time being (6). When the ending credits rolled, we were screaming for more.

Battlestar Galactica
  1. A slew of side characters.
  2. Unique Celtic music and drums.
  3. Unique camera shaking/zooming.
  4. Boomer is revealed to everyone as being a Cylon.
  5. Directions to Earth.
  6. People are stranded on both Caprica and Cobalt.
  1. Unique cast of diverse not humans.
  2. Unique chanting thing.
  3. Muppets in space.
  4. Moya gives birth to Tayln.
  5. John finds out the wormhole tech is in his head.
  6. John and D'Argo are floating in space, Tayln is stolen by Crais.

Season 2 - The high point.

It takes a few episodes, but our characters reunite and the shows basic formula returns. In this season we see production values increase, the main character relationships finally take on the evolved forms that we will know and love for the rest of the show (1, 2), and we get by far the strongest and most universally acclaimed season in the series.

Plot wise, this is the season that finally embarks on the large story arc that can only be resolved with the end of series (3). While season one could have been ended at any time with a simple event, we have now established enough interwoven sub plots and character back stories to commit to seasons of gradual resolution.

The season two finale is some of the best television ever written. Several major events that we have been waiting for all season finally happen (4, 5), at the end of their conclusion our characters are left in radically different positions then they were before (6, 7). Just when it looks like everything might work out, our antagonists show up and leave our heroes in danger (8). I realize how formulaic this sounds, but damn did it work.

Battlestar Galactica
  1. Adama and Roslin start falling for each other.
  2. Lee and his father come to an understanding with each other.
  3. They actually have a direction to earth.
  4. They find a habitable planet.
  5. The next election is held.
  6. Baltar is president.
  7. Most of the crew now lives on New Caprica.
  8. The Cylons show up and occupy New Capria.
  1. John and Aeryn start falling for each other.
  2. John and D'Argo finally become best friends.
  3. John needs to unlock the wormhole knowledge in his head.
  4. The Scorpius clone takes over John's mind.
  5. D'Argo's son is held ransom.
  6. John is insane.
  7. Aeryn is dying.
  8. Scorpius breaks into the lab during John's surgery.

Season 3 - The downward slope.

Season three starts off with a great intro, it resolves the cliffhanger for the previous season well, but it does not send us straight back to our basic formula. While it could have been a good thing to veer off course for a little while, the show drags out this new dynamic for too long. Our characters remain angry, bitter, and sad for basically the entire first of the season (1). By the time things get back to "normal" we are specifically tired of the characters themselves, we are ready to have fun again.

It is also worth noting that this season becomes far more serial than the previous seasons. We now experience entire episodes that really don't stand up on their own. Given how many little plot threads have been woven into the the series by this point, this is not that surprising. True fans know what is going on and they know that a conclusion is coming, but new comers will be discouraged if they try to pick up and start watching any standalone episode in season three.

Our spirits are raised with a great mid-season event, the same high caliber writing and events that we got with the premier itself (2). Unfortunately after we return from mid-season break we go right back to some boring meandering. At this point we know that some major plot resolution is right on the horizon, but rather than take some extra time to set that up we are instead given more filler while we wait for the finale.

Now just before the finale we do get some great stuff, more plot threads are tied up, and more characters finally conclude some of their subplots with great development (3). Really the last few episodes before the finale are well put together, and were worth the multiple season wait.

Then we get to the finale: a complete and under piece of contrived crap. No one saw it coming because it defied common sense (4), it violated establish rules of the universe (5), and it literally undid some of the best character development that the show had (6). The finale was not only garbage in and of itself, but it was also an insult to the show itself, and a giant middle finger to the fans.

Battlestar Galactica
  1. The crew is divided from New Capria.
  2. Adam threatens to nuke half the cast.
  3. Baltar goes on trial, Lee acquits him, Laura's cancer returns.
  4. Starbuck is magically resurrected?
  5. Tie was supposed to be a veteran from the first war!
  6. Tyrol is a cylon, not a man of the people.
  1. Zhaan is facing a slow death.
  2. John's clone dies a great death.
  3. The crew attacks Scorpius, Tayln and Crais self-sacrifice.
  4. The crew splits up, why?
  5. Worm holes now magically appear in the middle of nowhere.
  6. The crew splits up, why?

Season 4 - ...and the s***fest begun!

The season starts by not answering any of the questions raised in the previous cliffhanger (1, 2). The character changes introduced at the last minute of the previous season have undone nearly all of our character relationships (3). Our main protagonist has been demoted from being the leader to just some guy (4). Useless new side characters are introduced for no reason, and they will do nothing for the rest of the series (5). The primary plot thread of the series took a right turn (4), and much of what we thought we knew about the universe that we were playing in has been altered (6, 7). Change can be good, but this wasn't just change, it was a mid series reboot where we lost our save file.

Worst of all, this season will see drama like we have never seen it before. The drama becomes infectious, it takes center stage, it overshadows everything else that is going on, and it is just unrelatable and fake. The show goes from being a realistic science fiction with some great and dramatic character development, to just being a science-less Grey's Anatomy. I cannot over state this enough: I f***ing hated it.

The season crawls along at a snail's pace of drabby depressing episodes until we finally reach the bottom of the barrel, the mid-season finale. We finally accomplish what the primary goal of the entire series: we finally reach earth. And it sucks. And then we leave. And we never come back. And that's it. (No notations required.)

By now, as unfortunately loyal viewers, we know that the series is ending after this season. So we swallow our pride and finish out season four just so that we can say we saw the whole thing through.

The season four finale ends things pretty well for the material that it had to work with (8), but it's still lack luster (9). It's like the last 20 seconds of a roller coaster ride when you are pulling back in to the loading area: you remember the good times, you are glad you did it, it was probably worth the wait, but best loops were long ago and now you just have an upset stomach.

Battlestar Galactica
  1. Why was there a power outage?
  2. Where did the wake up music trigger thing come from?
  3. Let's just summarize this by saying that everyone hates everyone else.
  4. Lee resigns and becomes a politician because he got in an argument with daddy...really?
  5. What purpose did Baltar's cult serve?
  6. The Cylons, self admittedly, never had anything even resembling "a plan."
  7. The Cylons didn't make the skin jobs.
  8. Cylons fighting Cylons. On the inside of an asteroid belt. Next to a black hole. Ya, that was really cool.
  9. Starbuck was a ghost? Lame.
  1. Where did that worm hole come from?
  2. Why did the crew split up?
  3. I really am a broken record but, why did the crew split up?
  4. John (our adaptable hero) is now the crazy guy, and D'Argo (the angry guy) is the captain...really?
  5. Where did Noranti come from? Also, why do I care?
  6. Worm holes are now predefined by an existing network.
  7. We are traveling in "tormented space."
  8. The Peace Keeper Wars was really good; it threw out all the season four junk and just resolved the important stuff.
  9. Both sides just agree to stop fighting? Lame.

Epilogue - Lessons Learned

I think that we can learn some important lessons from these two shows, and hopefully not repeat their mistakes in the future. Because there are literally no sci-fi shows on television right now, I am unable to direct these comments directly at anyone or anything, and thus I'll keep them brief.

  • Map out your primary season plot points out in advance, and stick to them.
  • End your show when it is supposed to end; don't try to tack on more story later.
  • Increasing the amount of drama is not a substitute for plot development.
  • Don't do Stargate casting crossovers.

One finale note: I think that BStar and Farscape succeeded where Babylon 5 failed, and failed exactly where J. Michael Straczynski succeeded. The production value, casting, dialog, consistency, and episode to episode quality are all fantastic for both BStar and Farscape. However their inability to define, maintain, and eventually resolve a plot was disappointing. Perhaps someday Ronald D. Moore will partner with Straczynski to develop a show, and then I'll have to pay money and fly out to protest to whichever studio cancels it in mid-season.


Real Time Web Analytics