• Just as watermelon contains about 93% water, this WatirMelon blog contains about 93% Watir – edit: well maybe not anymore
  • WatirMelon is written and maintained by me: Alister Scott.
  • I work as a software tester, here in sunny climatic Brisbane in Australia.
  • As you would expect, the thoughts here are of my own and not my employer.  Please don’t wrongly attribute them.
  • Please don’t ask me Watir support questions on this page or this blog. Use the Watir community mailing list or Stack Overflow please.
  • You can contact me via alister dot scott at gmail dot com.
  • You can find me on LinkedIn: View Alister Scott's profile on LinkedIn
  • The watermelon header image is by Darwin Bell (Creative Commons).

23 thoughts on “About”

  1. I am using watir for automated testing of an application. In my application i want to use send keys option.I tried in various ways of giving send keys but its not working. Instead of send key its typing the Key spelling in text box. Note : – I am using firefox browser and using ubuntu 10.04 os for testing. Is this the reason for the failure of Send_keys.I am attaching an example that i used kindly reply.

    require “rubygems”
    require “watir-webdriver”
    browser = Watir::Browser.new :ff
    browser.text_field(:name, “q”).set “watir”
    browser.send_keys (“{ENTER}”)

    Narasimha Aluru


      1. I find it interesting that you ask people not to post support questions to your blog, but you answer them anyway. Regardless, you are a pillar of the Watir support community. If you had a donations page, I would gladly contribute!


  2. I am trying to automate a slider using watir-webdriver and ruby but am having no luck. I want to be able to manipulate the slider to either increase or decrease the value. I have searched everywhere and asked a few of my colleagues but no one has an answer. I am attaching a piece of HTML code for the slider. Any help would be much appreciated.

    Azher Hussain

    Liked by 1 person

  3. Thanks so much for your blog, it’s saved me many hours already. I’m looking into using a combination of watir and jenkins to run frontend tests for several of our applications. We currently use an ancient version of sitescope that doesn’t support javascript or any newer web techs.

    I’ve never touched Ruby before this, so it’s been a learning experience.

    Hoping maybe you might know off the top of your head what might be the issue here? Out of 10 servers, half of them (sometimes less, sometimes more) will fail looking for ajax driven results in a page. Taking a screenshot after the failures shows the missing data. To “fix” the issue, I find myself having to do this:

    browser.text_field(:name, “SearchField”).set “66852694”
    browser.button(:name, “submit”).click
    sleep 1
    checkhtml(mynode,”Search”,”#{browser.html}”,”(Account Info)”)

    Putting a sleep in there before I run my checkhtml subroutine seems to be the fix. But, I “thought” using a click was supposed to cause watir to wait until the page finished loading?
    Hate having to add a sleep after every click, some of our apps use 100+ webservers, so this will add quite a bit of time to a 10 step test.

    I’m passing the browser.html like that because on some pages, the text I’m looking for might be in a different frame and I hadn’t figured out how to handle that yet.

    Thanks again for a great blog.

    In case it makes a diff, what I’m using:

    require ‘watir-webdriver’
    require ‘headless’
    require ‘rubygems’
    require ‘thread’
    require ‘fileutils’

    ruby 1.9.2p290
    Red Hat Enterprise Linux Server release 5.4 (Tikanga)


    1. I’m sorry, just saw this bit… I’ll try and figure it out.

      “Please don’t ask me Watir support questions on this page or this blog. Use the Watir community mailing list or Stack Overflow please.”

      Thanks again.


      1. It is meant to wait until the browser is ready, but ajax calls can through that out.
        So, I’d try one of the ‘wait’ methods available on this page: http://watirwebdriver.com/waiting/ to wait for a known element to appear.
        I’m not sure what your checkhtml method does, but you shouldn’t need to use the html, you should be able to assert something in the DOM.


  4. Hello Alister,

    Do you perform API testing separated from UI testing?
    If yes, how do you choose which tests perform through the UI and which through the API?
    And maybe could you please recommend any ruby tool for API testing?



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s