views:

603

answers:

1

Does anyone know of a way to script flash objects using WatiN?

I need a way to send arbitrary keystrokes to a flash application. I'm able to login with code such as this:

ie.TextField(Find.ById("email")).TypeText(username);
ie.TextField(Find.ById("password")).TypeText(password);

I'm looking for something like:

ie.FlashObject(Find.ById("flash-object")).TypeText("123");

Or if focus is set to the browser, flash responds, so free text would work:

ie.FreeText.TypeText("123");

Currently I'm using a windows forms app with SendKeys() and it's not very robust.

Thanks.

+1  A: 

There is Ruby library called FlashWatir. Not exactly what you were looking for, but close.

Željko Filipin
Thanks, I'll check it out.
Shane Cusson