Question

We are recording a test using Selenium IDE in Firefox.

We need to copy a value from a read-only field to an input field.

Is there a direct way I can refer the field or do I have to store and use it. An example would be great.

Thanks.

Was it helpful?

Solution

You'll need two commands, one to store and one to retrieve. Assuming the read-only field has a name of Foo and the the input field has a name of Bar, then in the three boxes for the commands:

Command: storeValue
Target: name=Foo
Value: variableName

Command: type
Target: name=Bar
Value: ${variableName}

Alternatively, the source in the file would be:

<tr>
    <td>storeValue</td>
    <td>name=Foo</td>
    <td>variableName</td>
</tr>
<tr>
    <td>type</td>
    <td>name=Bar</td>
    <td>${variableName}</td>
</tr>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top