So, you're on a Linux machine (like a boss), you have a pretty sweet battery of automated tests that you run against your web application on your CI server (which also runs Linux), but you have a few problems:
- Internet Explorer sucks and most defects are open due to it.
- You can't automate IE because all your systems are on Linux.
- You need to automate on IE, because 13% of your user base are either ignorant or corporate drones who can't change their browsers.
So what you do? You can't just quit and call it a day? Nope, you keep reading.
What you need?
- A windows machine (yeah, sorry about that, but you knew it was coming).
- Install on it selenium remote grid server on said machine, here's a guide how to set it up.
- Our good friend Ruby!
- selenium, selenium-webdriver and watir-webdriver gems.
That's great, but you're wondering "How do I make watir-webdriver connect to the remote selenium hub?", that's a great question, for that all you need it's to pass it the arguments you'd use for selenium-webdriver to do that. And to be honest I only know that because I've been digging into watir-webdriver's code on github and I know that all parameters you pass it are passed along to selenium, something that's not quite clear on watir's documentation or any guide you can find on the web.
What I needed was something that would have watir-webdriver connect to Firefox locally, but if I wanted IE it would connect remotely, so, thanks to the param ":desired_capabilities" you can specify which browser you want to open on your remote connection.
I've created a sample for this on github, which you can find here.