title: Defining variables in a Selenium IDE rollup
body: <p>I have a set of selenium commands that I want to combine into a rollup, however they contain the definition of a variable. I am trying to define and then access that variable from within the rollup but it does not seem possible?</p>
  
  <p>If I use Var3 as a variable I get a 'Var3 is not defined!' error. To get around this I use storedVars.Var3, but to rely on this I need to run the selenium rollup twice. </p>
  
  <p>Rollup is as follows:</p>
  
  <pre><code>manager.addRollupRule({
   name: 'TestVars'
   , description: 'Testing variables'
   , pre: 'Testing variables'
   , post: 'Variables tested'
   , args: [
          {
              name: 'Var1'
              , description: 'The tab where the id should exist'
              , exampleValues: ['Whateva']
          },
          {
              name: 'Var2'
              , description: 'The icon where the id should exist'
              , exampleValues: ['YourChoice']
          }
          ] 
  , commandMatchers: [
   ]
   , getExpandedCommands: function(args) {
   var commands = [];
   var Var1 = args.Var1;
   var Var2 = args.Var2;
  
   commands.push({
   command: 'store'
   , target: 'testVar3'
   , value: 'Var3'
   });
  
    commands.push({
   command: 'storeTitle'
   , target: 'Var4'
   });
  
     commands.push({
   command: 'storeEval'
   , target: 'alert("Var1: '+Var1+' Var2:'+Var2+' Var3:'+storedVars.Var3+' and Var4: '+storedVars.Var4+'")'
   });
    return commands;
        }
  });
  </code></pre>
  
  <p>Called from Selenium IDE:</p>
  
  <pre><code>&lt;tr&gt;
  &lt;td&gt;rollup&lt;/td&gt;
  &lt;td&gt;TestVars&lt;/td&gt;
  &lt;td&gt;Var1=456, Var2=789&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>Run the first time I get an alert:</p>
  
  <p><code>Var1: 456 Var2:789 Var3:undefined and Var4: undefined</code></p>
  
  <p>The second time I get an alert:</p>
  
  <p><code>Var1: 456 Var2:789 Var3:testVar3 and Var4: Defining variables in a Selenium IDE rollup - Stack Overflow</code></p>
  
  <p>To solve this I need to create multiple roll-ups each time the rollup defines a variable so separate that into another rollup and then run that - not really in the spirit of a 'rollup' but doable. </p>
  
  <p>Suggestions/comments welcome ;-)</p>