Click the javascript popup through webdriver

前端 未结 6 761
再見小時候
再見小時候 2020-12-05 10:58

I am scraping a webpage using Selenium webdriver in Python

The webpage I am working on, has a form. I am able to fill the form and then I click on the Submit button.

6条回答
  •  我在风中等你
    2020-12-05 11:24

    If you want to Accept or Click the popup, regardless of for what it is then

    alert.accept
    

    Where alert is object of class selenium.webdriver.common.alert.Alert(driver) and accept is method of that object

    Source

提交回复
热议问题