擅长:python、mysql、java
<p><code>/text()</code>无效<code>.text</code>是从元素获取文本的属性</p>
<pre class="lang-py prettyprint-override"><code>nextMoonRise = driver.find_element_by_xpath('/html/body/div[1]/div[6]/main/article/section[1]/div/div[3]/p[7]')
print(nextMoonRise.text)
>>> Next Moonrise: Tomorrow00:05
</code></pre>