<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -203,12 +203,16 @@ var busyOff = function(){
 //     $('ide').style.display = 'block';
 // };
 
+var updateSpeed = function(){
+  windmill.serviceDelay = $('execSpeed').value;
+};
+
 var openSettings = function() {
     //Turn off explorers and recorder
     windmill.ui.recorder.recordOff();
     windmill.ui.domexplorer.domExplorerOff();
     windmill.ui.assertexplorer.assertExplorerOff();
-
+    $('execSpeed').value = windmill.serviceDelay;
     //$(id).style.display = 'block';
     jQuery(&quot;#dialog&quot;).dialog('open');
     // $('ide').style.display = 'none';</diff>
      <filename>windmill/html/js/wm/global.js</filename>
    </modified>
    <modified>
      <diff>@@ -28,7 +28,7 @@ var windmill = new function() {
 
     this.serviceDelay = 0;
     this.serviceDelayRunning = 0;
-    this.serviceDelayDefer = 800;
+    this.serviceDelayDefer = 0;
 
     this.safeWaits = true;
     </diff>
      <filename>windmill/html/js/wm/windmill.js</filename>
    </modified>
    <modified>
      <diff>@@ -26,6 +26,7 @@ windmill.xhr = new function() {
     
     //Keep track of the loop state, running or paused
     this.loopState = false;
+    this.actionQueued = false;
     
     //If the are variables passed we need to do our lex and replace
     this.processVar = function(str){
@@ -38,11 +39,16 @@ windmill.xhr = new function() {
       return str;
     }
     
+    this.goWait = function(){
+      windmill.xhr.actionQueued = true;
+      windmill.controller.waits.forElement(windmill.xhr.action.params, windmill.xhr.action);
+    };
+    
     this.runAction = function(){
       var _this = windmill.xhr;
       
       //setup state
-      windmill.serviceDelay = windmill.serviceDelayRunning;
+      //windmill.serviceDelay = windmill.serviceDelayRunning;
       windmill.stat(&quot;Running &quot; + _this.action.method + &quot;...&quot;);
       windmill.ui.playback.setPlaying();
       //Put on windmill main page that we are running something
@@ -77,10 +83,34 @@ windmill.xhr = new function() {
             //Start the action running timer
               windmill.xhr.action_timer.startTime();
               //Wait/open needs to not grab the next action immediately
-              if ((_this.methodArr[0] == 'waits')) {
+              //waits and nodes that have a lookup that isn't returning
+              //if there is no node, this will be false
+              //if there is a node, but it doesn't return it will throw
+              //else we have a node
+              try {
+                _this.node = lookupNode(_this.action.params);
+              } catch(err){
+                _this.node = null;
+              }
+              
+              //auto wait for only UI actions
+              //where the lookup fails.
+              if ((_this.node == null) &amp;&amp; 
+                  (_this.methodArr[0] != 'waits') &amp;&amp;
+                  (_this.methodArr[0] != 'asserts')){
+                    
+                windmill.pauseLoop();
+                _this.action.params.aid = action.id;
+                _this.goWait();
+                return;
+              }
+              
+                            
+              if (_this.methodArr[0] == 'waits'){
                   windmill.pauseLoop();
                   _this.action.params.aid = action.id;
               }
+              //asserts., waits.
               if (_this.methodArr.length &gt; 1){
                   //if asserts.assertNotSomething we need to set the result to !result
                   if (_this.action.method.indexOf('asserts.assertNot') != -1) {
@@ -128,7 +158,7 @@ windmill.xhr = new function() {
               //Sometimes this is a huge dom exception which can't be serialized
               //so what we want to use is the message property
               if (error.message){
-                _this.action.params.error = error.message;
+                _this.action.params.error = error.message + &quot;&quot; + error.lineNumber;
               } else { 
                 _this.action.params.error = error; 
               }
@@ -188,7 +218,7 @@ windmill.xhr = new function() {
             if (_this.action.method != 'defer') {
               _this.runAction();
             } else {
-              windmill.serviceDelay = windmill.serviceDelayDefer;
+              //windmill.serviceDelay = windmill.serviceDelayDefer;
               windmill.ui.playback.resetPlayBack();
               windmill.stat(&quot;Ready, Waiting for tests...&quot;);
             }
@@ -320,7 +350,17 @@ windmill.xhr = new function() {
         }
     };
     this.setWaitBgAndReport = function(aid, result, obj) {
-        if (!obj) { return false; }
+        if (windmill.xhr.actionQueued){
+          windmill.xhr.actionQueued = false;
+          windmill.xhr.runAction();
+          windmill.continueLoop();
+          return;
+        }
+        
+        if (!obj) { 
+          windmill.continueLoop();
+          return false; 
+        }
         
         var action = $(aid);
         var output = $(aid+&quot;result&quot;);
@@ -362,5 +402,6 @@ windmill.xhr = new function() {
           windmill.xhr.sendReport(obj.method, result, windmill.xhr.action_timer, undefined);
         }
         windmill.xhr.action_timer.write(obj.params);
+        windmill.continueLoop();
     };
 };</diff>
      <filename>windmill/html/js/wm/xhr.js</filename>
    </modified>
    <modified>
      <diff>@@ -51,6 +51,7 @@
           });
         });
     });
+    
 	&lt;/script&gt;
 &lt;/head&gt;
 &lt;body&gt;
@@ -169,12 +170,16 @@
 
     &lt;/div&gt;
         
-    &lt;div id=&quot;dialog&quot; style=&quot;padding-top:0px;margin-top:0px;&quot;&gt;
+    &lt;div id=&quot;dialog&quot; title=&quot;Windmill Settings&quot; style=&quot;padding-top:0px;margin-top:0px;&quot;&gt;
       &lt;div id=&quot;settings&quot; style=&quot;font-size:12px;&quot;&gt;
        		&lt;form id='settingsForm' name='settingsForm'&gt;
-       			&lt;h3 style=&quot;color:#25444e&quot;&gt;Windmill Settings&lt;/h3&gt;
+            &lt;br&gt;
        		  &lt;strong&gt;System&lt;/strong&gt;&lt;br&gt;
        		&lt;table&gt;
+       		  &lt;tr&gt;
+       				&lt;td&gt;Test Execution Speed:&lt;/td&gt;
+       				&lt;td&gt; &lt;input type=&quot;text&quot; name=&quot;execSpeed&quot; value=&quot;0&quot; id=&quot;execSpeed&quot; size=&quot;4&quot; onchange=&quot;updateSpeed()&quot;&gt;&lt;/td&gt;
+       			&lt;/tr&gt;
        			&lt;tr&gt;
        				&lt;td&gt;Throw JavaScript errors, full debug:&lt;/td&gt;
        				&lt;td&gt; &lt;INPUT TYPE=checkbox UNCHECKED ID='throwDebug'&gt;&lt;/td&gt;</diff>
      <filename>windmill/html/remote.html</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ce323ddbd287f6c8068356e6edd11ed28736397d</id>
    </parent>
    <parent>
      <id>02e84ebef42dcd71668789558a37a3610e0c4d5c</id>
    </parent>
  </parents>
  <author>
    <name>Adam Christian</name>
    <email>adam.christian@gmail.com</email>
  </author>
  <url>http://github.com/mde/windmill/commit/a8393fc3ea62289ee5384a55c5ce7bcfc02380de</url>
  <id>a8393fc3ea62289ee5384a55c5ce7bcfc02380de</id>
  <committed-date>2009-09-14T18:42:49-07:00</committed-date>
  <authored-date>2009-09-14T18:42:49-07:00</authored-date>
  <message>Merge branch 'auto-wait'</message>
  <tree>3ad05735b3581b06dffc14ce99f16390c8da3137</tree>
  <committer>
    <name>Adam Christian</name>
    <email>adam.christian@gmail.com</email>
  </committer>
</commit>
