My code is:
browser = webdriver.Chrome()
wait = WebDriverWait(browser, 10)
data = wait.until(EC.element_to_be_clickable((By.CSS_SELECTOR, '#search_result_former > div.re-content.search-mode-content > div.list-container > ul > li:nth-child(1) > div > div.item-footer > div > a:nth-child(1)')))
The HTML is:
<div class="btn-group clear">
<a href="javascript:;" class="btn btn-operation" role="detail">详览</a>
<a href="javascript:;" class="btn btn-operation" role="lawState" an="CN201820052763" pn="CN207117855U">法律状态</a>
<a href="javascript:;" class="btn btn-operation" role="proposor" _name="信阳农林学院;" _address=" 河南省信阳市羊山新区新24大街信阳农林学院;" _zipcode="464000;" _country="">申请人</a>
<a href="javascript:;" role="addAnalysis" class="btn btn-operation">+ 分析库</a>
<a href="javascript:;" role="favorite" class="btn btn-operation">收藏</a>
<a href="javascript:;" role="translate" _id="CN201820052763.420180316XX" class="btn btn-operation btn-translate">翻译</a>
</div>
The result after I run my code:
*raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:*
Actually, I can see the element. I mean, the element has been loaded. I have tried XPATH, but it doesn't work.