如何使用selenium点击“结账”按钮?

时间:2017-03-07 23:33:45

标签: python html css selenium selenium-chromedriver

html如下: enter image description here

我尝试了多种方法,如driver.find_element_by_css_selector等。没有工作。请帮助

1 个答案:

答案 0 :(得分:0)

在不了解更多信息的情况下,尝试使用XPATH和.click()

driver.find_element_by_xpath('//a[@class="button checkout"]').click()