views:

384

answers:

1

I've been thinking about this and can't seem to find a way to do this: I've got some code running on WatiN 2.0 which connects to a site via an SSL tunnel, and after performing certain tasks (which there're no other feasible ways to automate without relying on a browser) should be able to download an image from the very same SSL connection. The image is served dynamically depending on some state generated during navigation, and is not served but through the SSL connection associated with the aforementioned state, so I really need to stick with WatiN + IE.

Thanks in advance

+1  A: 

If I understand you correctly, you are trying to go to a web page (via multiple steps) and then save a copy of an image (dynamically generated) on that page right?

If so, I don't think there's a way to do this built in to WatiN, but I stumbled across a thread on the WatiN mail list archive which may help.

Basically it looks like you can use WatiN to dynamically generate some javascript to run against your page and copy the image to the clipboard & then grab the image from the clipboard in your test code.

Hope that is of some help to you...

Alconja
Dirty solution to say the least, but will do in this circumstance :) Thanks for your help!
emaster70