How do you use the dataDriven task with scriptStep?  My main question is how to 
use the values from the excel file in a dataDriven test with scriptStep.  I am 
trying to run a javascript on the values I get back from my excel file.
If I try this:
<dataDriven tableContainer="test.xls">
    <scriptStep language="javascript" keep="true" description="Test">
     location="Opt. Profile - Appt. Allocator - Allocator Run Options";
     switch (location){
      case "Opt. Profile - Appt. Allocator - Allocator Run Options" :
       ld=31;
       break;
      }
     step.setWebtestProperty('day', ld);
   </scriptStep>
   <echo message="#{day}"/>
   <echo message="${Location}"/>
   </dataDriven>
it works correctly.

If I try this:
<dataDriven tableContainer="test.xls">
    <scriptStep language="javascript" keep="true" description="Test">
     location=${Location};
     switch (location){
      case "Opt. Profile - Appt. Allocator - Allocator Run Options" :
       ld=31;
       break;
      }
     step.setWebtestProperty('day', ld);
   </scriptStep>
   <echo message="#{day}"/>
   <echo message="${Location}"/>
   </dataDriven>
I get the following error message in the report: "Error invoking script: 
org.mozilla.javascript.EvaluatorException: missing ; before statement 
(WebTest#1)"

So, how do I use the values from my excel file in my javascript code, if 
possible?


William Soula
QA Analyst

Pointserve, Inc.
110 Wild Basin Road
Suite 300
Austin, Texas 78746
O: 512.617.5311
F: 512.617.0466

Reply via email to