I see, so you are after a method that returns you the window that is in the foreground? I don't know how to do this, all the logic to find the window to act upon is in our javascript driver... I am not sure how to do this. :(
However, getting the window by caption should be doable, and I'll get this in for the next release.
- Federico