I'm using Selenium IDE v3.4.4 in Chrome. I'm using the 'store text' to store an address (with line breaks) as a variable then running 'execute script' on that variable I get the error: Failed: Invalid or unexpected token
Html is like:
<tr>
<td>Address</td>
<td>
<span>"Unit 1"
<br>
"South Street"
<br>
"London"
</span>
</td>
</tr>
Command: store text
target: xpath=//tr[td='Address']/td[2]/span
value: custAdd
Command: execute script
target: return ${custAdd}.replace(String.fromCharCode(10),' ')
Value: CustAdd
I get the error. Failed: Invalid or unexpected token
What does work:
Without doing the 'execute script' I can use the variable with the 'type' command.
I can do the 'execute script' command on any other stored variable that has no line breaks.
I would expect this to work (it has done in an old version of selenium 2.9.1 on firefox).