Reputation: 1065
I use Selenium IDE to make some test. When I store variable like this :
<tr>
<td>store</td>
<td>RandomProductRef</td>
<td>XXX</td>
</tr>
I can't use it sometimes like this :
<tr>
<td>type</td>
<td>css=#ctl00_ctl00_ContentPlaceHolder2_ChildPlaceHolder2_txtSearch</td>
<td>${RandomProductRef}</td>
</tr>
It type ${RandomProductRef} in the input... I've used the same way for an auth form and its works
Someone know why ? Thanks
Upvotes: 0
Views: 801
Reputation: 84
You should change the first command to save the text "XXX" to the variable "RandomProductRef".
<tr>
<td>store</td>
<td>XXX</td>
<td>RandomProductRef</td>
</tr>
<tr>
<td>type</td>
<td>css=#ctl00_ctl00_ContentPlaceHolder2_ChildPlaceHolder2_txtSearch</td>
<td>${RandomProductRef}</td>
</tr>
Upvotes: 0
Reputation: 1515
You should set variable name to the value input of Selenium IDE:
<tr>
<td>store</td>
<td>XXX</td>
<td>RandomProductRef</td>
</tr>
Then
<tr>
<td>echo</td>
<td>${RandomProductRef}</td>
<td></td>
</tr>
gives XXX
Upvotes: 1
Reputation: 29032
The only reason I could see that not working, is because your selector #ctl00_ctl00_ContentPlaceHolder2_ChildPlaceHolder2_txtSearch
might be invalid at the time of execution.
Make sure that that element is present at the time of executing your type
action, and that should work.
Upvotes: 0