Welcome to WatirMelon.Blog!

From today you may notice this blog has a new domain name: WatirMelon.Blog!

I am very excited to be one of the first blogs in the world with a .blog address, before the new .blog domain officially goes live on November 21. If you’re interested in a .blog address for your blog (on WordPress or otherwise), you can register your interest now in any .blog domain name via the get.blog site.

I will continue to own the old domain WatirMelon.com so any links using that domain will continue to function by redirecting to the new watirmelon.blog domain 😎

Minesweepers Anonymous

Once upon a time there lived a couple who loved playing massively multiplayer online role-playing video games with each other (World of Warcraft or Destiny or something). The thing about these games is that they’re a bit like exercise/fitness where you need to keep playing them to keep your score high, and if you don’t you play them (or exercise) enough your score (or fitness) starts dropping which makes it much less fun overall.

So playing these games all went well for the couple, for a while.

Continue reading “Minesweepers Anonymous”

Checking web element styles using WebDriverJs

I try to avoid incorporating any or layout/style based checks or locators into my automated end to end tests since these typically change more often leading to a higher test maintenance burden.

But I did have a circumstance recently where I wanted to check that a change I dynamically made to a page was reflected in the resultant web element’s style.

Continue reading “Checking web element styles using WebDriverJs”

Unit Testing Randomness

Let’s imagine hypothetically you were working on software that placed landmines in a minefield grid and you had a function that given the dimensions of a minefield, and a safe cell, you had to randomly place a certain number of landmines in the other cells of the grid. It looks something like this:

Continue reading “Unit Testing Randomness”