如何在selenium ide中自动化自动完成标签?

时间:2012-07-18 11:22:37

标签: selenium-ide

<tr>
    <td>clickAt</td>
    <td>css=ul.token-input-list-facebook</td>
    <td></td>
</tr>
<tr>
    <td>setCursorPosition</td>
    <td>id=token-input-SongTags</td>
    <td></td>
</tr>
<tr>
    <td>type</td>
    <td>id=token-input-SongTags</td>
    <td>n</td>
</tr>
<tr>
    <td>setCursorPosition</td>
    <td>id=token-input-SongTags</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>id=token-input-SongTags</td>
    <td></td>
</tr>

我尝试了上述步骤来自动执行自动填充标记,但这不起作用,

有人可以帮助我吗?

1 个答案:

答案 0 :(得分:2)

<tr>
    <td>clickAt</td>
    <td>css=(first click)</td>
    <td></td>
</tr>
<tr>
    <td>type</td>
    <td>id=(second click)</td>
    <td>${tagname}</td>
</tr>
<tr>
    <td>typeKeys</td>
    <td>id=(second click)</td>
    <td>${tagname}</td>
</tr>
<tr>
    <td>pause</td>
    <td>3000</td>
    <td></td>
</tr>
<tr>
    <td>focus</td>
    <td>id=(second click)</td>
    <td></td>
</tr>
<tr>
    <td>keyDown</td>
    <td>id=(second click)</td>
    <td>\40</td>
</tr>
<tr>
    <td>keyDown</td>
    <td>id=(second click)</td>
    <td>\40</td>
</tr>
<tr>
    <td>keyDown</td>
    <td>id=(second click)</td>
    <td>\13</td>
</tr>