0

I want to get the HTML source of a webpage. I am aware I could get it using HttpRequest class (.NET Framework), but unfortunately, the HTML is not yet "fully formed" since the HTML I want would require clicking on a link/button at the webpage, which would then manipulate the HTML (and that's when I want to get the HTML source).

I've tried using the WebBrowser class/control (.NET Framework). Even though this might allow me to get the manipulated HTML source, the webpage I'm trying to request will have pop-ups, and I can't have pop-ups. Is there a way to do this?

1
  • 1
    Selenium, or maybe Headless Chrome could help you Commented Sep 26, 2019 at 23:28

1 Answer 1

1

If you have to click buttons, handle pop-ups, send post request etc.. you should take a look at Selenium. It gives you power to fully automates browsers and get any html on the page. You can await for some tag id exist and then get you html by instance. Selinum can run browsers without UI, adding the parameter "--headless" on the webdriver.

Sign up to request clarification or add additional context in comments.

1 Comment

This may just be what I'm looking for. Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.