Capturing javascript popups

后端 未结 2 437
走了就别回头了
走了就别回头了 2021-01-27 02:05

In WebBrowser, is there anyway to capture the stupid popups that are generated by javascript?

The ones which say \"Success\" or watever and have the \"Ok\" button.

2条回答
  •  情歌与酒
    2021-01-27 02:35

    I once needed to scrape a website using webbrowser where the site did all sorts of javascript I needed to bypass. My solution that time was to download the url with WebClient, parsing the html as a string and remove all javascript and then set the new html string as the Document of my WebBrowser.

    Maybe that is a good approach for you?

提交回复
热议问题