繁体   English   中英

Python Selenium:我无法单击此退出按钮

[英]Python Selenium: I can't click this exit button

我尝试单击的确切按钮是:

  1. https://www.bungol.ca/map/location/toronto/吗?

  2. 关闭左侧的属性滑块

  3. 单击工具->打开列表

  4. 单击任何列表,您将获得如下内容:

关闭按钮的图像

这是我尝试做的事情:

time.sleep(5) #wait for page to fully load
driver.find_element_by_xpath("""/html/body/div[17]/div/div/div/button""").click()

time.sleep(5) #wait for page to load
driver.find_element_by_css_selector("""html body#body.modal-open div#listingInfoModal.modal.fade.show div.modal-dialog.modal-xl div.modal-content div.modal-body button.close""").click()

此CSS选择器将执行此操作。

#listingInfoModal button.close

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM