Typing in a IFrame with Selenium IDE

2019-04-11 01:53发布

I'd like to type something in a IFrame with Selenium IDE but I don't know how to do this.

Thanks a lot!

3条回答
Fickle 薄情
2楼-- · 2019-04-11 02:33

You have to select the iframe and then type

selenium.selectFrame("css=iframe.widget[<a_css_identifier>]");
selenium.type(<your_object_or_text_box>, <typed_content>);

The statements are in java, but you should be able to find selectFrame and type in the IDE.

查看更多
女痞
3楼-- · 2019-04-11 02:47

Try

<tr> 
    <td>selectFrame</td> 
    <td>edit</td> 
    <td></td> 
</tr> 
<tr> 
    <td>type</td> 
    <td>xpath=//html/body</td> 
    <td>my text</td> 
</tr> 
查看更多
对你真心纯属浪费
4楼-- · 2019-04-11 02:57

You can use the Selenium IDE command 'selectFrame' to focus within an iframe. Use the Target field to enter the iframe id.

查看更多
登录 后发表回答