Updating to Selenium 3 with Firefox

I struggled a bit with updating Selenium from 2.53 to 3.3.1, so I thought about documenting the steps. I’m going to skip any background trivia and get to the point. I’m assuming you are on Windows.

What you’ll need:

Now to run the tests you need to tell Selenium where to find the Firefox driver. To do this we are going to create a bat script, let’s be creative and call it selenium.bat. Insert copy paste the following into the selenium.bat:

java -jar -Dwebdriver.gecko.driver=geckodriver.exe selenium-server-standalone-3.3.1.jar

Obviously the geckodriver.exe, selenium JAR and the bat script need to be in the same folder. Just run the bat file and you’re ready to start updating your tests  🙂

Best Before Date of Code

I was listening to the Developer on Fire podcast Episode 197  with Neal Ford today. Nearing the end of the episode around 44:00 Neal mentioned something similar to what I have been thinking about on multiple occasions:

One of the dynamics I have noticed in my career is that, inevitably, if I look back at whatever I created two years ago it looks like it’s the most horrible thing, I’m so embarrassed by it. I can’t believe I did that. […] In fact I’m a little afraid if that stops happening.

I thought of it this way: The price of improving is feeling like an idiot for what you did before. No need to be that hard on yourself, but I sometimes do feel a small sting when I look at old code I wrote.

Discussing this with a former colleague of mine he pointed out that there’s no need to feel bad about old code since it was the best you could do at the time. It wasn’t intentionally bad. If it was, you probably would not feel bad about it.

So to reverse this thinking, the code (or whatever) you produce today has it’s best before date in two years from today if you are improving. When your code from years past still looks like the code you wrote today, it’s time to start thinking what to do about it.