Python 使用复合类时没有此类元素

Python 使用复合类时没有此类元素,python,css,selenium-webdriver,Python,Css,Selenium Webdriver,我正在研究web UI自动化。我在复合班上遇到过。我在谷歌上搜索并找到了一种方法。但我也没有面临这样的元素例外。请帮忙 selenium.common.exceptions.NoSuchElementException: Message: no such element (Session info: chrome=52.0.2743.116) (Driver info: chromedriver=2.9.248315,platform=Windows NT 6.1 SP1 x86_64)

我正在研究web UI自动化。我在复合班上遇到过。我在谷歌上搜索并找到了一种方法。但我也没有面临这样的元素例外。请帮忙

selenium.common.exceptions.NoSuchElementException: Message: no such element
 (Session info: chrome=52.0.2743.116)
 (Driver info: chromedriver=2.9.248315,platform=Windows NT 6.1 SP1 x86_64)
下面是我正在努力实现自动化的html代码片段

<div id="prefill-two-up" class="two-up">
<div id="prefill-graduation-date" style="display: block;">
<!-- end grad date -->
<!-- begin hs date range -->
<div id="prefill-hs-date-range" style="display:none">
<!-- end hs date range -->
<p class="action-space">
<a class="btn action prefill-hs-done" data-hs-num="1" href="#">Done</a>
 or 
<a class="link-alt cancel-button-hs" data-hs-num="1" href="#">Cancel</a>
</p>
<div class="complete-form-error error" style="">
<span id="invalid-prefill-hs-form-open" class="message ui-state-error" style="display:none;">
</div>
也试过

 time.wait(10)
self.driver.find_element_by_css_selector("a.btn.action.prefill-hs-done").click()

请编辑您的帖子以包含异常详细信息。请编辑您的帖子以包含异常详细信息。
 time.wait(10)
self.driver.find_element_by_css_selector("a.btn.action.prefill-hs-done").click()