下面是我的HTML代码片段和我尝试的代码。我需要单击集成控制台菜单项。我试着像下面这样,但什么也没有发生,也没有错误。请帮助我使用标签内的文本选择特定的菜单项。你知道吗
driver.find_element_by_xpath(".//td[contains text(),'Integrated Consoles']").click()
HTMl示例代码段
<td nowrap="" id="MENU_TD110"> Integrated Consoles </td>
<td nowrap="" id="MENU_TD110"> System Information </td>
<td nowrap="" id="MENU_TD110"> More Tools </td>
在
contains
方法中缺少括号()
,请按如下方式括起来,然后尝试-相关问题 更多 >
编程相关推荐