Question

There are some HTML based games (ie bootleggers.us) that have a simple login form and after that your entire game experience revolves around submitting various forms and reading information from the website itself.

My Question is, what is the best way to go about writing a bot / automate the html-based game using C#?

My initial thought is to use the System.Net.HttpRequest and WebRequest classes to get the source html and parse using regexs to get the desired information.

However, I would like to avoid this if it is at all possible. Are there any solutions that abstract away some of this and make automating website interaction easier? Ie filling out forms, submitting forms, reading values from the website, etc? Some library?

Was it helpful?

Solution

You could use Watin: http://watin.sourceforge.net/

OTHER TIPS

No, you're pretty much going to have to "screen scrape" every page. You might consider writing most this in JavaScript instead of C#. Depending on the HTML of the game site, this could be more or less difficult depending on whether they provide good id attributes on the page elements, etc...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top