【发布时间】:2022-07-25 01:18:15
【问题描述】:
无法点击关闭按钮 class="close whitebutton"
<button type="button" class="close whitebutton" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
尝试如下class_name,还是不行,不知道为什么?:
driver.find_element(By.CLASS_NAME, "whitebutton").click()
【问题讨论】:
-
如果你运行
btn = driver.find_element(By.CLASS_NAME, "whitebutton")然后运行 type(btn)你会得到什么? -
请显示您要选择的标记。
-
添加url,我们会尝试点击它。
标签: python selenium selenium-webdriver web-crawler