Add Text To A Value

Add Text to a value

To append text onto a value, so for example, I have stored a value of 2,000 and when I visit another page it has a value of  “2,000 miles”.  To make life easy, I simply append “miles” to the 2,000 value, so I can verify it is present.

Copy & Paste into the source tab of the selenium test case:

 <!–Add word miles to number value of mileage–>

<tr>

            <td>storeEval</td>

            <td>’${Miles}’ + ‘ miles'</td>

            <td>Miles</td>

</tr>

 <!–This will display the stored value–>

<tr>

            <td>echo</td>

            <td>${Miles}</td>

            <td></td>

</tr>

Leave a Reply