擅长:python、mysql、java
<p>右键单击inspect部分中的<code>HTML</code>元素。
然后转到<code>Copy > Copy XPath</code>。
那就用这个代码</p>
<pre><code>title = driver.find_element_by_xpath("copied_xpath").get_attribute("title")
href = driver.find_element_by_xpath("copied_xpath").get_attribute("href")
text = driver.find_element_by_xpath("copied_xpath").text
</code></pre>