Click to See Complete Forum and Search --> : Rusty VB developer - VB application for web - is this the best approach?


floodzone
April 26th, 2006, 10:06 PM
Hi,
I was wondering if some of you might be kind enough to give me some input on a small project that I need to do for work. I need to create a stand alone application to test an e-commerce site that uses a shopping cart. It needs to do the following strictly through code (not user-GUI-mouse type stuff):

* Create an instance of IE and go to a hardcoded URL
* Login to the site with a user name and password, "press" a submit button once this information has been entered
* Search the resulting page for particular .gifs, click on these .gifs - which will result in adding the item to the shopping cart (the .gifs are icons which are labeled "item in stock" - a regular user would click on these .gifs to add the item to his shopping cart)
* Wait a few minutes, refresh the page, and then locate the .gifs again and click on them (again adding the items to the shopping cart)
* Ideally set it up to run continuously for 24, 48, 72 hours etc...

Just to clarify, the site itself is completely finished. This is just an application that I need to develop to test that products are essentially "flowing" into inventory as available for purchase. I need an automated system to add certain items to a shopping cart as they become
available.

So my questions are this:
1) Does this sound like an appropriate project for VB?
2) VB 6 or .Net? I would like to keep it as simple as possible.
3) Do you see any potential problems by using VB for this?


I really appreciate any feedback or pointers on this....my VB skills are a little rusty, so I wanted to get some ideas before I just dive in. Thanks in advance.

Craig Gemmill
April 26th, 2006, 11:05 PM
Visual Basic is perfect for something like this.

I am going to recommend the latest VB.NET/Framework, as it will be the quickest and easiest way to do what you want.

Assuming that there is no important client-side scripting (AJAX included), you could even do this without creating an instance of IE.

floodzone
April 26th, 2006, 11:50 PM
Thank you. Is there a site you would recommend for checking out for some examples of code similar (or along the same lines) as I would like to create?

floodzone
May 5th, 2006, 12:06 PM
Just wanted to top this again....


Does anyone have a book they would recommend that might cover this kind of stuff?

Or any online resource?


Many thanks!!

Craig Gemmill
May 5th, 2006, 12:15 PM
Check out this code snippet that I posted for another thread:

http://www.codeguru.com/forum/showpost.php?p=1385282&postcount=7