Reputation: 1249
I am trying to write a code which automatically fills in a textbox inside of an external webpage. So I write code below inside of a buttonclick event and what I want it to do is, just load the external webpage and fill the existing textbox with a text. However, I couldn't get this working. It doesn't set anything at all.
String Url2dehands = "http://www.hereisthewebsite.be";
HtmlWeb mvWeb = new HtmlWeb();
HtmlDocument doc = mvWeb.Load(Url2dehands);
HtmlNode mvTextBox = doc.DocumentNode.SelectSingleNode("//input[@id='id_ofthe_textbox']");
mvTextBox.InnerHtml= "assdsda";
Upvotes: 2
Views: 1014
Reputation: 166
I think what you need might be http://docs.seleniumhq.org/
Selenium automates browsers. That's it. What you do with that power is entirely up to you. Primarily it is for automating web applications for testing purposes, but is certainly not limited to just that. Boring web-based administration tasks can (and should!) also be automated as well.
Also, you can use Selenium IDE. This will write code for you in a set of different languages. You can then use this code to automate the process.
Upvotes: 1