<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>andthennothing.net: Show, don't tell</title>
    <link>http://www.andthennothing.net/archives/2006/02/20/show-dont-tell</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>&amp;ldquo;first there was a three-legged monkey...&amp;rdquo;</description>
    <item>
      <title>"Show, don't tell" by Jason Jin</title>
      <description>Good! A good tool!</description>
      <pubDate>Thu, 22 May 2008 08:53:27 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:229e4af1-9626-4e61-8ec3-0fafc748aa97</guid>
      <link>http://www.andthennothing.net/archives/2006/02/20/show-dont-tell#comment-2566</link>
    </item>
    <item>
      <title>"Show, don't tell" by Harryharasuthan</title>
      <description>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... :)</description>
      <pubDate>Mon, 17 Mar 2008 09:25:02 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:ddcaa607-ef32-4512-b53e-3586bff85d30</guid>
      <link>http://www.andthennothing.net/archives/2006/02/20/show-dont-tell#comment-2562</link>
    </item>
    <item>
      <title>"Show, don't tell" by alice</title>
      <description>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'</description>
      <pubDate>Fri, 04 Jan 2008 23:09:54 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:ba243e01-5a2c-4742-bca4-38573beb4f0e</guid>
      <link>http://www.andthennothing.net/archives/2006/02/20/show-dont-tell#comment-2549</link>
    </item>
    <item>
      <title>"Show, don't tell" by lisa</title>
      <description>Wonderful! I got many benefit from it. Thanks a lot.</description>
      <pubDate>Thu, 20 Jul 2006 03:08:17 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:bae4f8f1-6999-47e4-bae5-4a285dec6538</guid>
      <link>http://www.andthennothing.net/archives/2006/02/20/show-dont-tell#comment-1296</link>
    </item>
    <item>
      <title>"Show, don't tell" by Sean</title>
      <description>Whoops.  That was it.  :)  Thanks!</description>
      <pubDate>Wed, 15 Mar 2006 19:41:59 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:675cad53-d567-45af-8641-6b03d9f6acca</guid>
      <link>http://www.andthennothing.net/archives/2006/02/20/show-dont-tell#comment-909</link>
    </item>
    <item>
      <title>"Show, don't tell" by Jonas</title>
      <description>The screencast is an embedded Flash movie in this post. Have you disabled/not installed Flash?</description>
      <pubDate>Wed, 15 Mar 2006 18:33:16 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:7be600b9-fe65-4c22-a1a7-9544bfdcf5b4</guid>
      <link>http://www.andthennothing.net/archives/2006/02/20/show-dont-tell#comment-908</link>
    </item>
    <item>
      <title>"Show, don't tell" by Sean</title>
      <description>Am I missing something?  Where's the screencast?  The link just goes to another post, which then links to think one again.</description>
      <pubDate>Wed, 15 Mar 2006 16:15:38 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:d68a5f8c-020b-4752-833b-6f7ac29843cd</guid>
      <link>http://www.andthennothing.net/archives/2006/02/20/show-dont-tell#comment-907</link>
    </item>
    <item>
      <title>"Show, don't tell" by Jonas</title>
      <description>I'm glad you liked it! And thanks for your work on Selenium, it's such a great tool!</description>
      <pubDate>Wed, 01 Mar 2006 18:26:32 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:82fa0ebe-f226-43fa-89a4-0d74f60435f1</guid>
      <link>http://www.andthennothing.net/archives/2006/02/20/show-dont-tell#comment-706</link>
    </item>
    <item>
      <title>"Show, don't tell" by Jason Huggins</title>
      <description>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!</description>
      <pubDate>Wed, 01 Mar 2006 06:01:43 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:708bd102-38c9-4dc4-8af3-7fd39c105830</guid>
      <link>http://www.andthennothing.net/archives/2006/02/20/show-dont-tell#comment-705</link>
    </item>
    <item>
      <title>"Show, don't tell" by Jonas</title>
      <description>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; :-)</description>
      <pubDate>Tue, 21 Feb 2006 20:31:45 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:2fdeefce-1aee-449b-9fd1-73266184d221</guid>
      <link>http://www.andthennothing.net/archives/2006/02/20/show-dont-tell#comment-697</link>
    </item>
    <item>
      <title>"Show, don't tell" by François</title>
      <description>My my...  Fantastic.  Need to do it myself.  Please, what are you using that gives you that special Alt+Tab ?</description>
      <pubDate>Tue, 21 Feb 2006 19:57:42 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:342aa7ad-73c9-485f-9d8b-8a2333a48db2</guid>
      <link>http://www.andthennothing.net/archives/2006/02/20/show-dont-tell#comment-696</link>
    </item>
    <item>
      <title>"Show, don't tell" by Paul Clip</title>
      <description>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".

</description>
      <pubDate>Tue, 21 Feb 2006 05:29:01 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:ccdc4d7e-68cc-42d8-bce0-03b8c02b5e6a</guid>
      <link>http://www.andthennothing.net/archives/2006/02/20/show-dont-tell#comment-695</link>
    </item>
    <item>
      <title>"Show, don't tell" by badcarl</title>
      <description>Fantastic presentation.  I had looked into selenium before and it looked interesting, but now I'm convinced.</description>
      <pubDate>Tue, 21 Feb 2006 01:31:40 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:1150847e-f6b9-4bd2-823d-bbe3576321d7</guid>
      <link>http://www.andthennothing.net/archives/2006/02/20/show-dont-tell#comment-694</link>
    </item>
    <item>
      <title>Show, don't tell</title>
      <description>&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;</description>
      <pubDate>Mon, 20 Feb 2006 18:45:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:2ce70164-545b-4666-b8e6-8de1ad9a0052</guid>
      <author>jonas.b@home.se (Jonas Bengtsson)</author>
      <link>http://www.andthennothing.net/archives/2006/02/20/show-dont-tell</link>
      <trackback:ping>http://www.andthennothing.net/articles/trackback/692</trackback:ping>
    </item>
  </channel>
</rss>
