Search code examples
c#winformsscreen-scraping

How do I navigate a website programmatically from a windows forms application?


I am developing a windows forms application, in this application I am controlling a website.

The website has a login button which when clicked takes the user to a second page containing a link.

I would like my application to navigate through the login button page (effectively clicking the login button) and then have it click the link on the second page.

How do I do this?


Solution

  • this should work.

    webbrowser.Document.All["ID OF ELEMENT (I THINK NAME WORKS TOO)"].InvokeMember("click");

    but yeah, also -- this is a duplicate question.