<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>andthennothing.net: Show, don't tell</title>
  <subtitle type="html">&amp;ldquo;first there was a three-legged monkey...&amp;rdquo;</subtitle>
  <id>tag:andthennothing.net,2005:Typo</id>
  <generator uri="http://typo.leetsoft.com" version="4.0">Typo</generator>
  <link href="http://andthennothing.net/xml/atom10/article/692/feed.xml" rel="self" type="application/xml+atom"/>
  <link href="http://andthennothing.net/archives/2006/02/20/show-dont-tell" rel="alternate" type="text/html"/>
  <updated>2008-05-22T08:54:14+00:00</updated>
  <entry>
    <author>
      <name>Jason Jin</name>
    </author>
    <id>urn:uuid:229e4af1-9626-4e61-8ec3-0fafc748aa97</id>
    <published>2008-05-22T08:53:27+00:00</published>
    <updated>2008-05-22T08:54:14+00:00</updated>
    <title>Comment on Show, don't tell by Jason Jin</title>
    <link href="http://andthennothing.net/archives/2006/02/20/show-dont-tell#comment-2566" rel="alternate" type="text/html"/>
    <content type="html">Good! A good tool!</content>
  </entry>
  <entry>
    <author>
      <name>Harryharasuthan</name>
    </author>
    <id>urn:uuid:ddcaa607-ef32-4512-b53e-3586bff85d30</id>
    <published>2008-03-17T09:25:02+00:00</published>
    <updated>2008-03-17T09:25:06+00:00</updated>
    <title>Comment on Show, don't tell by Harryharasuthan</title>
    <link href="http://andthennothing.net/archives/2006/02/20/show-dont-tell#comment-2562" rel="alternate" type="text/html"/>
    <content type="html">finally got something to work on... i tries watir but it doesn't have this record feature which are similar to excel macros.... and its really helpful cuz we don't need a DOM inspector to workaround... thnx alot... :)</content>
  </entry>
  <entry>
    <author>
      <name>alice</name>
    </author>
    <id>urn:uuid:ba243e01-5a2c-4742-bca4-38573beb4f0e</id>
    <published>2008-01-04T23:09:54+00:00</published>
    <updated>2008-01-04T23:10:19+00:00</updated>
    <title>Comment on Show, don't tell by alice</title>
    <link href="http://andthennothing.net/archives/2006/02/20/show-dont-tell#comment-2549" rel="alternate" type="text/html"/>
    <content type="html">when I did the following, I got error.
C:\deardiary&gt;rake test_plugins
(in C:/deardiary)
rake aborted!
Don't know how to build task 'test_plugins'</content>
  </entry>
  <entry>
    <author>
      <name>lisa</name>
    </author>
    <id>urn:uuid:bae4f8f1-6999-47e4-bae5-4a285dec6538</id>
    <published>2006-07-20T03:08:17+00:00</published>
    <updated>2006-07-20T03:08:31+00:00</updated>
    <title>Comment on Show, don't tell by lisa</title>
    <link href="http://andthennothing.net/archives/2006/02/20/show-dont-tell#comment-1296" rel="alternate" type="text/html"/>
    <content type="html">Wonderful! I got many benefit from it. Thanks a lot.</content>
  </entry>
  <entry>
    <author>
      <name>Sean</name>
    </author>
    <id>urn:uuid:675cad53-d567-45af-8641-6b03d9f6acca</id>
    <published>2006-03-15T19:41:59+00:00</published>
    <updated>2006-03-15T19:41:59+00:00</updated>
    <title>Comment on Show, don't tell by Sean</title>
    <link href="http://andthennothing.net/archives/2006/02/20/show-dont-tell#comment-909" rel="alternate" type="text/html"/>
    <content type="html">Whoops.  That was it.  :)  Thanks!</content>
  </entry>
  <entry>
    <author>
      <name>Jonas</name>
    </author>
    <id>urn:uuid:7be600b9-fe65-4c22-a1a7-9544bfdcf5b4</id>
    <published>2006-03-15T18:33:16+00:00</published>
    <updated>2006-03-15T18:33:17+00:00</updated>
    <title>Comment on Show, don't tell by Jonas</title>
    <link href="http://andthennothing.net/archives/2006/02/20/show-dont-tell#comment-908" rel="alternate" type="text/html"/>
    <content type="html">The screencast is an embedded Flash movie in this post. Have you disabled/not installed Flash?</content>
  </entry>
  <entry>
    <author>
      <name>Sean</name>
    </author>
    <id>urn:uuid:d68a5f8c-020b-4752-833b-6f7ac29843cd</id>
    <published>2006-03-15T16:15:38+00:00</published>
    <updated>2006-03-15T16:15:40+00:00</updated>
    <title>Comment on Show, don't tell by Sean</title>
    <link href="http://andthennothing.net/archives/2006/02/20/show-dont-tell#comment-907" rel="alternate" type="text/html"/>
    <content type="html">Am I missing something?  Where's the screencast?  The link just goes to another post, which then links to think one again.</content>
  </entry>
  <entry>
    <author>
      <name>Jonas</name>
    </author>
    <id>urn:uuid:82fa0ebe-f226-43fa-89a4-0d74f60435f1</id>
    <published>2006-03-01T18:26:32+00:00</published>
    <updated>2006-03-01T18:26:53+00:00</updated>
    <title>Comment on Show, don't tell by Jonas</title>
    <link href="http://andthennothing.net/archives/2006/02/20/show-dont-tell#comment-706" rel="alternate" type="text/html"/>
    <content type="html">I'm glad you liked it! And thanks for your work on Selenium, it's such a great tool!</content>
  </entry>
  <entry>
    <author>
      <name>Jason Huggins</name>
    </author>
    <id>urn:uuid:708bd102-38c9-4dc4-8af3-7fd39c105830</id>
    <published>2006-03-01T06:01:43+00:00</published>
    <updated>2006-03-01T06:01:44+00:00</updated>
    <title>Comment on Show, don't tell by Jason Huggins</title>
    <link href="http://andthennothing.net/archives/2006/02/20/show-dont-tell#comment-705" rel="alternate" type="text/html"/>
    <content type="html">Holy flippin' cow! This is cool stuff. Each and every day I'm floored by the all new stuff being done with Selenium. Many thanks for the screencast. I'll be showing this to lots of folks back here at ThoughtWorks. :-) 

Cheers!</content>
  </entry>
  <entry>
    <author>
      <name>Jonas</name>
    </author>
    <id>urn:uuid:2fdeefce-1aee-449b-9fd1-73266184d221</id>
    <published>2006-02-21T20:31:45+00:00</published>
    <updated>2006-02-21T20:31:45+00:00</updated>
    <title>Comment on Show, don't tell by Jonas</title>
    <link href="http://andthennothing.net/archives/2006/02/20/show-dont-tell#comment-697" rel="alternate" type="text/html"/>
    <content type="html">Thanks guys!&lt;br /&gt;&lt;br /&gt;

Paul: I'd guess that programmers prefer RSelenese, and non-programmers (e.g. testers) Selenese. The main benefit of using Selenese is of course the excellent Selenium IDE. But to each his own, they are all rendered the same.&lt;br /&gt;&lt;br /&gt;

François: &lt;a href='http://www.ntwind.com/taskswitchxp/' rel="nofollow"&gt;TaskSwitchXP&lt;/a&gt; :-)</content>
  </entry>
  <entry>
    <author>
      <name>François</name>
    </author>
    <id>urn:uuid:342aa7ad-73c9-485f-9d8b-8a2333a48db2</id>
    <published>2006-02-21T19:57:42+00:00</published>
    <updated>2006-02-21T19:57:50+00:00</updated>
    <title>Comment on Show, don't tell by François</title>
    <link href="http://andthennothing.net/archives/2006/02/20/show-dont-tell#comment-696" rel="alternate" type="text/html"/>
    <content type="html">My my...  Fantastic.  Need to do it myself.  Please, what are you using that gives you that special Alt+Tab ?</content>
  </entry>
  <entry>
    <author>
      <name>Paul Clip</name>
    </author>
    <id>urn:uuid:ccdc4d7e-68cc-42d8-bce0-03b8c02b5e6a</id>
    <published>2006-02-21T05:29:01+00:00</published>
    <updated>2006-02-21T05:29:04+00:00</updated>
    <title>Comment on Show, don't tell by Paul Clip</title>
    <link href="http://andthennothing.net/archives/2006/02/20/show-dont-tell#comment-695" rel="alternate" type="text/html"/>
    <content type="html">Excellent. Sellenium has been on my radar for a while but I never got 'round to trying it. Your demo covered a lot of ground.

I particularly liked the inclusion of an .rsel example. I can't imagine creating a comprehensive set of test cases in straight "selenese".

</content>
  </entry>
  <entry>
    <author>
      <name>badcarl</name>
    </author>
    <id>urn:uuid:1150847e-f6b9-4bd2-823d-bbe3576321d7</id>
    <published>2006-02-21T01:31:40+00:00</published>
    <updated>2006-02-21T01:31:44+00:00</updated>
    <title>Comment on Show, don't tell by badcarl</title>
    <link href="http://andthennothing.net/archives/2006/02/20/show-dont-tell#comment-694" rel="alternate" type="text/html"/>
    <content type="html">Fantastic presentation.  I had looked into selenium before and it looked interesting, but now I'm convinced.</content>
  </entry>
  <entry>
    <author>
      <name>Jonas Bengtsson</name>
      <email>jonas.b@home.se</email>
    </author>
    <id>urn:uuid:2ce70164-545b-4666-b8e6-8de1ad9a0052</id>
    <published>2006-02-20T18:45:00+00:00</published>
    <updated>2008-07-13T21:17:33+00:00</updated>
    <title>Show, don't tell</title>
    <link href="http://andthennothing.net/archives/2006/02/20/show-dont-tell" rel="alternate" type="text/html"/>
    <content type="html">&lt;ins&gt;Selenium on Rails has &lt;a href="http://www.openqa.org/selenium-on-rails/"&gt;moved&lt;/a&gt;.&lt;/ins&gt;

&lt;p&gt;There is this great tradition in the Rails community to create screencasts and I really like them so here's a screencast of &lt;a href="http://andthennothing.net/archives/2006/02/19/new-version-of-selenium-on-rails"&gt;Selenium on Rails&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In the demo I create a new Rails project, install Selenium on Rails, create a test case using &lt;a href="http://www.openqa.org/selenium-ide/"&gt;Selenium IDE&lt;/a&gt;, create another in RSelenese, and run all the test as a Rake task.&lt;/p&gt;

&lt;p&gt;The only setup not shown are installation/configuration of Selenium IDE and win32-open3.&lt;/p&gt;&lt;script language="javascript"&gt;
/* Jesse Ruderman
 * July 18, 2004
 *
 * Remaining problems:
 *   IE sometimes crashes on exit after using the this script.
 *   In IE, it is a little ugly because IE doesn't support border-radius.
 *   In IE, it does not work at standalone Flash URLs.
 */

function setupSeekBar() {

setTimeout(initFlashControls, 100);

function initFlashControls()
{
  var count = 0;

  function tt(elem)
  {
    if (typeof elem.TotalFrames != "undefined") /* do not coerce elem.StopPlay to bool, because that breaks IE */
    {
      addFlashControls(elem);
      ++count;
    }
  }

  var i, x;

  for (i = 0; x = document.getElementsByTagName("object")[i]; ++i)
    tt(x);

  for (i = 0; x = document.getElementsByTagName("embed")[i]; ++i)
    tt(x);

}


function addFlashControls(flash)
{
  var controlsDiv = document.createElement("div");

  /* Put the controls under the Flash. 
   *
   * If the Flash is an &lt;embed&gt; in an &lt;object&gt;, we do not want to touch the &lt;object&gt;, because that would make
   * Mozilla re-test whether the &lt;object&gt; is broken and reset the &lt;embed&gt;.  So in that case, we put the controls
   * under the &lt;object&gt;.
   */
  var where = flash;
  while (where.parentNode.tagName.toLowerCase() == "object")
    where = where.parentNode;
  where.parentNode.insertBefore(controlsDiv, where.nextSibling);

  /* Construct controls using DOM2 instead of innerHTML.
   * In Mozilla, innerHTML= is like innerText= at standalone flash URLs.
   */
  var table = document.createElement("table");
  controlsDiv.appendChild(table);
  
  var row = table.insertRow(-1);
  
  var pauseButton = document.createElement("button");
  pauseButton.appendChild(document.createTextNode("Pause"));
  var buttonCell = row.insertCell(-1);
  buttonCell.appendChild(pauseButton);
  
  var slider = row.insertCell(-1);
  slider.width = "100%";
  
  var visibleSlider = document.createElement("div");
  visibleSlider.style.position = "relative";
  visibleSlider.style.height = "10px";
  visibleSlider.style.width = "100%";
  visibleSlider.style.MozBorderRadius = "4px";
  visibleSlider.style.background = "#aaa";
  slider.appendChild(visibleSlider);
  
  var thumb = document.createElement("div");
  thumb.style.position = "absolute";
  thumb.style.height = "20px";
  thumb.style.width = "10px";
  thumb.style.top = "-5px";
  thumb.style.MozBorderRadius = "4px";
  thumb.style.background = "#666";
  visibleSlider.appendChild(thumb);
  

  var sliderWidth;
  var paused = false;
  var dragging = false;

  table.width = Math.max(parseInt(flash.width) || 0, 400);
  
  addEvent(pauseButton, "click", pauseUnpause);
  addEvent(slider, "mousedown", drag);
  addEvent(slider, "drag", function() { return false; }); /* For IE */
  window.setInterval(update, 30);

  function pauseUnpause()
  {
    paused = !paused;

    pauseButton.style.borderStyle = paused ? "inset" : "";

    if (paused)
      flash.StopPlay();
    else
      flash.Play();
  }

  function update()
  {
    sliderWidth = parseInt(getWidth(slider) - getWidth(thumb));

    if (!paused &amp;&amp; !dragging)
      thumb.style.left = parseInt(flash.CurrentFrame() / totalFrames() * sliderWidth) + "px";
  }

  function dragMousemove(e)
  {
    var pageX = e.clientX + document.body.scrollLeft; /* cross-browser, unlike e.pageX, which IE does not support */
    var pos = bounds(0, pageX - getX(slider) - 5, sliderWidth);
    var frame = bounds(1, Math.ceil(totalFrames() * pos / sliderWidth), totalFrames() - 2);

    thumb.style.left = pos + "px";

    flash.GotoFrame(frame);
  }

  function release(e)
  {
    removeEvent(document, "mousemove", dragMousemove);
    removeEvent(document, "mouseup", release);
    if (!paused)
      flash.Play();
    dragging = false;
  }

  function drag(e)
  {
    addEvent(document, "mousemove", dragMousemove);
    addEvent(document, "mouseup", release);
    dragging = true;
    dragMousemove(e);
  }



  /* Boring functions, some of which only exist to hide differences between IE and Mozilla. */

  function bounds(min, val, max)
  {
    return Math.min(Math.max(min, val), max);
  }

  function totalFrames()
  {
    /* This is weird.  TotalFrames differs between IE and Mozilla.  CurrentFrame does not. */

    if (typeof flash.TotalFrames == "number")
      return flash.TotalFrames; /* IE */
    else if (typeof flash.TotalFrames == "function")
      return flash.TotalFrames(); /* Mozilla */
    else
      return 1; /* Partially loaded Flash in IE? */
  }

  function getWidth(elem)
  {
    if (document.defaultView &amp;&amp; document.defaultView.getComputedStyle)
      return parseFloat(document.defaultView.getComputedStyle(elem,null).getPropertyValue("width")); /* Mozilla */
    else
      return parseFloat(elem.offsetWidth); /* IE (currentStyle.width can be "auto" or "100%") */
  }

  function getX(elem)
  {
    if (!elem) return 0;
    return (elem.offsetLeft) + getX(elem.offsetParent);
  }

  function addEvent(elem, eventName, fun)
  {
    if (elem.addEventListener) /* Mozilla */
      elem.addEventListener(eventName, fun, false);
    else /* IE */
      elem.attachEvent("on" + eventName, fun);
  }

  function removeEvent(elem, eventName, fun)
  {
    if (elem.addEventListener)
      elem.removeEventListener(eventName, fun, false);
    else
      elem.detachEvent("on" + eventName, fun);
  }
}
}

setupSeekBar()
&lt;/script&gt;

&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="1024" height="768"
 codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"&gt;
 &lt;param name="movie" value="/files/selenium_on_rails-demo.swf"&gt;
 &lt;param name="play" value="true"&gt;
 &lt;param name="loop" value="False"&gt;
 &lt;param name="quality" value="low"&gt;
&lt;embed src="/files/selenium_on_rails-demo.swf" width="1024" height="768" play="true"
 loop="False" quality="low" type="application/x-shockwave-flash"
 pluginspage="http://www.macromedia.com/go/getflashplayer"&gt;
&lt;/embed&gt;&lt;/object&gt;

&lt;p&gt;Generated by &lt;a href="http://www.unixuser.org/~euske/vnc2swf/"&gt;pyvnc2swf&lt;/a&gt;&lt;/p&gt;</content>
  </entry>
</feed>
