Extract part of a text with selenium IDE and put it into variable

自古美人都是妖i 提交于 2019-12-01 13:58:19

I have solution, tricky 1

store  | Edit Exhibition Centre - 694575, Exhibition Center1 | string
store  | 1 | delimiter   
store  | javascript{storedVars['string'].split('- ')[storedVars['delimiter']]} | test
store  | 0 | delimiter1
store  | javascript{storedVars['test'].split(',')[storedVars['delimiter1']]} | output
echo   | ${output}

Try this 1, and let me know whether its working for you

Thendo

I Have an easy answer to this question. Try this code it will work.

<tr>
    <td>store</td>
    <td>Edit Exhibition Centre - 694575, Exhibition Center1</td>
    <td>string</td>
</tr>
<tr>
    <td>store</td>
    <td>javascript{storedVars['string'].substring(24)}</td>
    <td>string</td>
</tr>
<tr>
    <td>echo</td>
    <td>${string}</td>
    <td></td>
</tr>
<tr>
    <td>store</td>
    <td>javascript{storedVars['string'].substring(0,7)}</td>
    <td>string</td>
</tr>
<tr>
    <td>echo</td>
    <td>${string}</td>
    <td></td>
</tr>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!