I have an html page in a whole HttpWebResponse this way:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(sslServerHost);
response = (HttpWebResponse)request.GetResponse();
When I go to the same URL in a browser, I get a page with two buttons. I need to click one of them:
<form id="confirmationForm" name="confirmationForm" action="/oauth/oauth/authorize"
method="post">
<input name="user_oauth_approval" value="true" type="hidden"/>
<button name="authorize" type="submit" class="allow-button">
Allow access
</button>
</form>
How can I click the button with name “authorize” programmatically using the HttpWebResponse that I got?
The easiest way to solve this is to load up the page in a web browser with an HTTP proxy like Fiddler running then click the button and see the response. Copy that out then use that for the request to click the button.