擅长:python、mysql、java
<p>当页面滚动到按钮时,类为<code>.LoadingDots.regular</code>的元素保持不变,但其父元素添加了新的类<code>hidden</code>。您可以检查是否使用<code>get_attribute</code>函数添加了该类。您也可以直接用类<code>spinner_display_area</code>找到它</p>
<pre><code>while True:
driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
loading_dots = driver.find_element_by_class_name('spinner_display_area')
if 'hidden' in loading_dots.get_attribute('class'):
break;
</code></pre>