I need to write a C# code for grabbing contents of a web page. Steps looks like following
- Browse to login page
- I have user name and a password, provide it programatically and login
- Then you are in detail page
- You have to get some information there, like (prodcut Id, Des, etc.)
- Then need to click(by code) on Detail View
- Then you can get the price for that product from there.
- Now it is done, so we can write detail line into text file like this…
ABC Printer::225519::285.00
Please help me on this, (Even VB.Net Code is ok, I can convert it to C#)
The WatiN library is probably what you want, then. Basically, it controls a web browser (native support for IE and Firefox, I believe, though they may have added more since I last used it) and provides an easy syntax for programmatically interacting with page elements within that browser. All you’ll need are the names and/or IDs of those elements, or some unique way to identify them on the page.