擅长:python、mysql、java
<p>问题不在于引用,而是因为你在一个框架内。在</p>
<p>首先,你需要在他的内部切换:</p>
<pre><code>frame = driver.find_element_by_xpath("//frame[@name='menufrm']")
driver.switch_to_frame(frame)
</code></pre>
<p>现在,您可以访问您的链接:</p>
^{pr2}$
<p>访问完此框架内所需的所有内容后,需要切换到默认内容:</p>
<pre><code>driver.switch_to_default_content()
</code></pre>