little samie
  • slingshot is for killing bugs
  • hat is backwards, good catch
  • Don't let his looks fool you. Samie's execution speed is extremely fast. He is as quick as Javascript running inside the browser under test.
  • Documentation


Simple Automation Module For Internet Explorer

Samie is now graciously accepting donations through PayPal.
Those who donate go to the top of the response to questions and bug fix que.

What is samie?

Samie Updates

04/21/2005 - Samie has been accepted for an article in the lastest version of

02/12/2005 - Samie 2.0 is now available.  Thanks to a suggestion by Danny R. Faught, you no longer need to use WaitForDocumentComplete or WaitForBusy in your Samie scripts.

01/13/2005 - Introducing Samie's Slingshot - a Samie GUI tool that will help you write automation scripts for an $11 donation. Just click on the PayPal button above.  Here is a short slingshot demo movie. (IE required for viewing.) You can find a tutorial located here.

09/28/2004 - Apparently, Samie could be having an effect on Mercury Profits.

05/08/2004 Samie now does popup windows that contain frames. Samie has come a long way since the original post on September 5, 2002.

Kris Wehner gave me a nice review on his blog

Samie has been able to perform and verify more than two hundred thousand unique testcases per day for the past two years at  He is also currently running regression tests for the National Leisure Group
I would like to give a big thanks to Misha Rybalov for solving access to popup windows.  He groked samie after about twenty e-mails, contributed the Verify and Index subroutines, enhanced it quite a bit for his own company and wrote an interface from Java to samie using XML-RPC.

I have added to cvs two simple modules.  The first lets you use a property file or command line with samie and the other offers a convenient way to use dbi to either get at a database for loading data or to store results.

Don't underestimate what can be done using the application server's database schema to hold your test data. Just think of the backend database as the perfect place to hold your samie data up front.  It probably already has tons of data that you can query from to fill every page as your browser presents html forms to samie.

I was taught this method by Matt Bowser.  Who learned it from Mike Haggerty. If you're serious about loading up samie with ton's of test data, it's actually a lot easier to query from the same schema that development uses than it is to rewrite your own methods and data structures.

Thanks for these two modules, and goes to Vincent Phan.
I am available for samie seminars.  Contact to discuss setting up your qa group with an unlimited number of active perl samie seats. Seminars range from learning PERL to creating a network harness that will run concurrent samie sessions, to just learning the samie basics. The documentation links below contain short samie recipes, to give those who already know perl a head start. Finally, I am considering doing some samie conference calls.

There is a venerable book out on the topic of Win32 perl.  Although I did not use it to write samie, after samie was done, I noticed some rather good explanations of the basics of what was accomplished.  The authors' name is Dave Roth . His book is called Win32 PerlProgramming. Specifically chapter 5 on OLE automation.

Which reminds me of a nice Oreilly website called Safari. With this site you can read as many as 5 different books for $10.00 a month.

Here is a link to a nice free perl tutorial for beginners Picking Up Perl

Many thanks to Bob Marchetti for getting so excited about the creation of samie, originally posting my code to the web and starting this sourceforge project, even though he didn't know how to use cvs! He also drew the humble picture of little samie and showed me this nice open source Perl IDE  for debugging.  I believe his original name for samie was bamie (basic) or wamie (windows).  Anyway he was the first user other than myself and is an excellent Quality Engineer.

Mr. Marchetti was also responsible for coaching me on how to change the belt on my clothes dryer, to which I will ever be grateful.

Bob and friends have been working on a python version of samie for a while now. His project is called Pamie.

If you would like to write in Ruby there are a bunch of folks putting together a worthy alternative to samie called WATIR


List of Features

  1.  samie is written in ActivePerl which means you inherit all PERL functionality including:
    1. regular expressions
    2. PERL dbi database access
    3. Many of the PERL cpan library functions
    4. It's lightweight - you can start it from the command line.
    5. No licensing fees.
  1. It uses Internet Explorers built in COM object which means you get a reference to Microsoft's dhtml for each window or each html frame in a window.  The dhtml DOM (Document Object Model) gives you
    1. All html functionality that Java Script can access which means
    2. The ability to change values of edit boxes, radio buttons, check boxes etc.
    3. The ability to click any object
    4. The ability to verify any text found in the html or any attribute or any object for that matter.

  2. Development is fairy easy - no keeping track of gui maps for each window - no separate table functions

  3. Maintenance is fairly easy because you are working with the same DOM that development works with to create web pages and write Java Script.  samie spins through the whole DOM looking for objects.  If these objects move around on the page due to spec requirements between builds.  samie will find them.
  4. Slingshot the samie GUI will help you find controls on a page and write samie scripts.

Setup info

How does samie know when a page is complete?

Samie 2.0, contains an internal function called WaitForDocumentComplete.  Whenever you call a function from samie that loads a new page, this function blocks your script from proceeding while samie watches for events being fired from Internet Explorer.

How is samie able to watch events being fired by Internet Explorer? contains the Event subroutine.  This subroutine has been setup to be a COM callback subroutine. Through it's connection to the Internet Explorer COM object Samie is able to catch an event whenever it is fired by Internet Explorer because IE actually calls Samie's Event subroutine. This is interprocess communication. Remember that the internal WaitForDocumentComplete has been blocking the samie script, but it does not block calls to the Event callback subroutine.

Now that we are hooked up to IE Events, I simply wait until the number of BeforeNavigate2 events is equal to the number of DocumentComplete events, then tell Samie to stop blocking and script execution continues.

Here is an example:

$seconds = Navigate("");
print "Yahoo took $seconds seconds to load.\n";

Here is a list of the functions currently available:


SourceForge Logo