Iframe Selenium查找框架,但不选择它

Iframe Selenium查找框架,但不选择它,iframe,selenium,selenium-rc,frame,Iframe,Selenium,Selenium Rc,Frame,我一直在尝试使用Selenium选择帧,但失败了。HTML代码如下所示: <html> <frameset rows="100,*" framespacing="0" frameborder="no" border="0"> <frame scrolling="no" title="Home" name="home_frame" src="http://localhost/home/home_frame.aspx?" marginheight="2" mar

我一直在尝试使用Selenium选择帧,但失败了。HTML代码如下所示:

<html>
<frameset rows="100,*" framespacing="0" frameborder="no" border="0">
    <frame scrolling="no" title="Home" name="home_frame" src="http://localhost/home/home_frame.aspx?" marginheight="2" marginwidth="0">
    <html>
        <body id="bodyC" class="Context">
                <table >
                    <tbody>
                        <tr class="homeBottom">                                                             
                            <div class="Styledhome">
                                <table style="border-width: 0pt;">
                                        <tr>
                                            <td>
                                                <div class="Layout_Center">
                                                    <ul id="hrl01" class="Layout_Tabs" >
                                                        <li id="hr101_Home" class="Layout_ActiveTab">
                                                            <a target="_top" href="http://localhost/home/default.aspx" onclick= "if(pagePreviouslyClicked()){return false;};">Home</a>
但它不选择主框架。我还尝试使用Selenium IDE记录测试,我只看到Selenium.SelectFramehome\u frame;我尝试删除relative=top部分,但它仍然没有选择框架home\u框架。当我将if Selenium.isElementPresentThome_帧放入时,它返回true。因此,它正在查找主框架,但没有选择它

如果我在这里做错了什么,请告诉我是否有其他方法可以做到这一点。谢谢

试试看:

$selenium.click("//a[text()='Home']")

选择帧后,您想做什么?Selenium.SelectFramehome\u帧是否会导致触发异常/超时?选择帧时您预计会发生什么?我更新了我的问题。我正在尝试单击“主页”选项卡。
$selenium.click("//a[text()='Home']")