Question

I am making a bot that simulates a human user using a specific website.

When the user uses the site here is what happens

  1. the user uploads a file by using the site's Browse button and then clicks Upload
  2. the server responds immediately and the user sees a Please Wait gif
  3. in the meantime the server is evaluating the file for errors. When it is done it redirects, and the user is take to a new .aspx page where they can correct the errors.

What I am not able to do w the bot is make it wait to get the redirect info.

The bot hits the website with this line of code (VB.NET)

Dim Response As HttpWebResponse = CType(Request.GetResponse(), HttpWebResponse)

The Response has the Please Wait gif in it, not the Errors.aspx page. Somehow I need to make the bot, execute that line of code above then, sorta listen to the same port(?) and wait for the web server to send another response.

Ideas?

Était-ce utile?

La solution

I ended up just sleeping the thread, then hitting the url again, repeatedly till I got the response I wanted.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top