Note that there are some explanatory texts on larger screens.

plurals
  1. POWhen Web Browsing from code, how do you send information to an <input .* type="Submit"> and retrieve the resulting link?
    primarykey
    data
    text
    <p>Similar threads may be:</p> <p><a href="https://stackoverflow.com/questions/4564352/how-do-i-programmatically-send-information-to-a-web-service-in-c-sharp-with-net" title="How do I programmatically send information to a web service in C# with .NET?">How do I programmatically send information to a web service in C# with .Net?</a><br> <a href="https://stackoverflow.com/questions/8058326/maintain-button-submit-value-when-using-link-to-submit-a-form" title="Maintain button submit value when using link to submit a form">Maintain button submit value when using link to submit a form</a><br> <a href="https://stackoverflow.com/questions/5423087/looking-how-to-send-multiple-values-with-an-input-type-submit-form" title="Looking how to send multiple values wit an input type=submit form">Looking how to send multiple values with an input type=submit form</a><br> <a href="https://stackoverflow.com/questions/8729319/how-send-a-form-with-javascript-when-input-name-is-submit" title="How send a form with Javascript when input name is &quot;submit&quot;?">How send a form with Javascript when input name is "submit"?</a><br> <a href="https://stackoverflow.com/questions/2785357/how-do-you-submit-a-form-with-javascript-with-a-input-type-button" title="How do you submit a form with javascript with an &lt; input type=&quot;button&quot;&gt;">How do you submit a form with javascript with an &lt; input type="button"></a> </p> <p>...All of the above seem to almost answer the question...but I'm totally mystified. I think something along the lines of "Net.Post(something)" is how it is done...but I am not sure. </p> <p>I am currently using F#, and I have figured out how to parse links. I also figured out how to catch the various search bars and submission buttons with regexes.<br> I would like to use my code to search for something on a search engine by specifically: </p> <p><strong>First</strong>, obtaining the HTML</p> <p><strong>Second</strong>, Scraping the HTML for the various buttons, text bars, and links</p> <p><strong>Third</strong>, use some unknown method/device/tool/function to send a search thread to a text box...</p> <p><strong>Fourth</strong>, Simulate an actual mouse click on the submit "button" that appears on the website...</p> <p>...</p> <p>Then, upon reciept of the server's response, pull the HTML from the next site.<br> Here is my link code as it stands:</p> <pre><code> type Url(x:string)= member this.Tostring = sprintf "%A" x member this.Request = System.Net.WebRequest.Create(x) member this.Response = this.Request.GetResponse() member this.Stream = this.Response.GetResponseStream() member this.Reader = new System.IO.StreamReader(this.Stream) member this.Html = this.Reader.ReadToEnd() let linkex = "href=\s*\"[^\"h]*(http://[^&amp;\"]*)\"" let getLinks (txt:string) = [for m in Regex.Matches(txt,linkex) -&gt; m.Groups.Item(1).Value ] let collectLinks (url:Url) = url.html |&gt; getLinks </code></pre> <p>... I know how to grab the search box strings and whatnot...the question is, when I go to, say, google.com and grab the search bar the same way I grab the links, update the value field with my search string, how do I then submit the updated search bar to google's server?</p> <p>Secondly, how do I do it if I want to update it and then simulate a mouse click? </p> <p>In other words, I want to interact with websites the way the user interacts with websites. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload