dinsdag 7 april 2009

WatiN How To screen cast

I have been thinking for a while about creating a How To screen casts series about WatiN. Last week I sat down and experimented a bit with Jing by TechSmith (the creators of CamtasiaStudio).

With Jing it really is very easy to get started with recording and not falling into the trap of creating the visually perfect video with Camtasia. Which, at the end, never gets done. I also like the 5 minute constraint that Jing enforces. This really makes you to focus on the core of things you want to example or show. And last but not least, they offer a 2 GB free storage on screencast.com to host your videos.

For this How To trial episode I used this blog about adding your own elements to WatiN. Let me know what you think about it? Do you like the length, the amount of information, should I do more like these and which topics would you like to be explained?

Watch the episode.

Technorati Tags:

Introducing the DialogHandlerHelper

Many questions on the watin-users mailinglist (and about WatiN in general) are about handling dialogs with WatiN. WatiN has build in support for handling many of Internet Explorers dailogs but it is hard to find out which DialogHandler is the right one for the job.

WatiN 2.0 beta 1 introduced the new DialogHandlerHelper class. DialogHandlerHelper can be used to investigate which DialogHandler can be used for a specific dialog. The following example shows you how to use the DialogHandlerHelper .

image

Lets walk through the example. First it creates an IE instance and navigates to a page. Then an instance of DialogHandlerHelper is created and registered with the DialogWatcher. A button is clicked which shows a dialog. The DialogHandlerHelper will now inspect the dialog and close it. Finally the CandidateDialogHandlers are written to the console window for you to inspect and create your final solution.

For this example that would be:

image

 

Just a thought

To make it even more simple, wouldn’t it be great if someone combined the following into a windows forms app:

  • http://www.codeproject.com/KB/dialog/FindWindow.aspx: To let the user point at the dialog that needs to be automated.
  • The code inside DialogHandlerHelper to inspect the chosen dialog and find candidate dailoghandlers.
  • And, when a Dialoghandler is available for the dialog, uses the the class documentation that comes with the dialoghandler to show you example code about using that specific dialoghandler.

Volunteers?

Technorati Tags: