My dream CI tool

Continuous integration is a great concept! It works really well in giving fast feedback to the developers and team when things go wrong. It forces everyone to think about build stability all the time. There are plenty of tools out there to help you build your code fast and often. However, I still have not found a tool that just satisfies all of the teams needs. A lot of the tools have some cool features that overlap, and some really good features that do not overlap at all but would make your life so much easier. Here is a short list of items I’d like to see in my ideal tool. The tool needs to...
read more

JavaScript alerts in Selenium 2, webdriver and capybara

Every once in a while you will receive a JavaScript alert on your web page, thankfully not so much nowadays! This is a bit of a pain to get rid of those pesky pop-ups because selenium does not seem to provide an easy way to get rid of those pop-ups. Until now! Edit: Jari Bakken has pointed out a better way to solve this. [cc lang="ruby"] driver.switch_to.alert.accept driver.switch_to.alert.dismiss [/cc] will work if you are dealing directly with webdriver. In case you are dealing with Capybara it will look like this [cc...
read more

Basic Auth in URL for Firefox in WebDriver (Ruby)

Update 11/8/11 I’ve submitted the fix i mentioned here to the selenium folks, it seems that the fix is now applied in newest version of webdriver. So, this is a moot point (Updated 8/19/11 to work with webdriver 0.2.x, see the edit comment below) WebDriver does not yet support basic auth, as of today (5/25/11 version 0.1.4) it does not seem like it will be supported anytime soon. This becomes a bit of an issue if you need to test a site that is behind basic auth. Luckily there is a quick work around, but only for Firefox at the moment. I am working with ruby and webdriver version 0.1.4, I...
read more

Spicy Pickles and Rats!

I can hear you saying: “What is he smoking?” Why on earth would anyone name a project “Spicy Pickles and Rats” it’s terrible! The name came from combination of all technologies which are involved, selenium, cucumber, sauce labs, capybara. Salt and cucumber makes a pickle, add a little sauce labs to make it spicy, and Capybara is a type of rodent… thus the name. That out of the way, let’s talk about making all of those things to play nicely together. I’ve put together a sample project for this article, you can find it on my GitHub account. This code...
read more

Selenium2 Wait For AJAX with WebDriver

This is based on my initial post of Selenium Wait For Ajax. Int his example I will be showing jQuery wait for ajax, but you can re-read the previous post for prototype and Dojo and integrate it with this example. After upgrading to Selenium2, I am now using WebDriver for driving Selenium tests. Has a lot of cool features that Selenium1 didn’t have, so I highly recommend upgrading to Selenium2. Ran into the same issue as with Selenium 1, need to wait for AJAX. Luckily Webdriver gives you some shortcuts you can take. We will be using the execute_script method that is on the WebDriver::Driver...
read more

Uploading files with Selenium

Do you need to test a website, where you have to upload a file? Picture for a profile, or maybe a CSV to be parsed and displayed on the page? You are in luck, Selenium has some built in commands to let you do that out of the box. The “attachFile” command on the RC will take care of uploading an image for you. The Ruby wrapper for it is @selenium.attach_file(FIELD, FILE_URL). Here is the RDoc. If you are not using the Ruby driver, look at the documentation of your driver to find how to do it since it is a standard RC command and not Ruby only. So far I’ve tested this in Firefox 3, IE...
read more

« Previous Entries

WordPress Loves AJAX