Using WebBrowser class from C# code you can have access to HTML document but automating the IE control is not as easy as it should be. You will have to take into account things like:
- browser events and timeouts: navigating, document complete
- an asynchronous programming model: web automation code mixed with event handlers
- document ready state
- HTML events - you'll have to fire the right events so web pages will react properly
- dealing with DOM and cross frames security restrictions
- manually writing web automation code
- attach to WebBrowser control so you can use Twebst objects
- optionally you can register to OnCancel event so you can cancel web automation at any point (the current web automation method will throw an error when canceled)
- generate web automation code with Open Twebst web recorder
- use the code in your C#/VB.Net Windows Forms project
Here is a sample that comes with Open Twebst setup and you can also download from here:
No comments:
Post a Comment