3

I keep getting errors with my storeEval script. In IDE the log keeps giving me "[error] Threw an exception: missing ; before statement". I don't know what to do because I have tried putting a similar command in this test from another test that works and it'll fail as well.

<tr> <td>storeText</td> <td>id=poCostForRow0</td> <td>EclipseCost</td> </tr> <tr> <td>rollup</td> <td>completeOrder</td> <td></td> </tr> <tr> <td>rollup</td> <td>loginApollo</td> <td></td> </tr> <tr> <td>click</td> <td>id=projectNameForRow0</td> <td></td> </tr> <tr> <td>storeText</td> <td>id=poCostForItem0ForPO0</td> <td>ApolloCost</td> </tr> <tr> <td>storeEval</td> <td>javascript { storedVars[&quot;EclipseCost&quot;].substring(9,16);}</td> <td>y</td> </tr>

2 Answers 2

1

try to change THIS

<tr>
    <td>storeEval</td>
    <td>javascript { storedVars[&quot;EclipseCost&quot;].substring(9,16);}</td>
    <td>y</td>
</tr>

for THIS

<tr>
    <td>storeEval</td>
    <td>storedVars['EclipseCost'].substring(9,16)</td>
    <td>x</td>
</tr>

(works for me)

You don't have to use javascript {} in storeEval which is designed for single statement. The error was probably caused by use of storeEval itself. If you switch storeEval for storeExpression, it would work, cause is designed for javascript processing.

-1

Instead of javascript{...} try to use javascript(...) (round brackets).

2
  • I tried that and it didn't work. Would you have any other suggestions?
    – Robert
    Jul 13, 2015 at 20:01
  • this is surely not a good answer
    – Dee
    Aug 29, 2015 at 10:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.