【发布时间】:2019-08-25 00:05:00
【问题描述】:
我有一个按钮,我想点击这个按钮,我愿意
login_form = driver.find_element_by_xpath("/html/body/div/h1/div[1]").click();
我的代码:
driver = webdriver.Firefox()
driver.get('http://www.textdet.com/')
e = driver.find_element_by_id("imagefile")
e.send_keys("/home/brm17/Desktop/ProjetFinDetude/image.png")
login_form = driver.find_element_by_xpath("/html/body/div/h1/div[1]").click();
但我明白了:
selenium.common.exceptions.NoSuchElementException:消息:无法 定位元素:/html/body/div/h1/div[1]
如何在python by selenium 上点击按钮Download bounding boxes,html
<h1 style="position: relative"><a href="/">Scene Text Detection Demos</a>
<div aria-label="..." role="group" class="btn-group" style="position: absolute; bottom: 10px; right: 0px;">
<!--<button id="toggle_text_propoals" type="button" class="btn btn-success btn-sm">Show text proposals</button>-->
<a href="download_bboxes/acdb4bb9-8b73-4020-bfe5-737316033e5e" type="button" class="btn btn-success btn-sm">Download bounding boxes</a>
</div>
</h1>
【问题讨论】:
标签: python selenium selenium-webdriver