views:

181

answers:

1

Hi All,

I'm currently using WatiN to run some javascript unit tests however everything works fine if I initialise the WatiN IE browser like this:

Browser browser = new IE("http://localhost/Project/tests.hyml");

However, as soon as I try to initialise the browser with a file uri, i.e.:

Browser browser = new IE("c:\\\\Projects\\Project\\tests.html");

or

Browser browser = new IE("file:///C:/Projects/Project/tests.hml");

The javascript appears to fail to load. I manually tested those file names and the tests work fine (after setting the Internet Options -> Advanced -> Security -> Allow Active Content...).

Is perhaps WaitN ignoring that Allow Active Content Setting? Has anyone encountered this? Any ideas?

Thanks for your help

Guido

+1  A: 

I think the URL should be file://C:\Projects\Project\tests.html

Two slashes after the file:, and backslashes from there on. Also, you typo-ed the file extension.

Yoenhofen
Wow that was easy, Thanks heaps
gatapia
Then upvote my response :)
Yoenhofen
Done, sorry forgot :)
gatapia