I have a index.html file which includes scripts.js
in scripts.js:
function Add(arg1, arg2)
{
if(typeof(arg1) == 'string') arg1 = parseInt(arg1);
if(typeof(arg2) == 'string') arg2 = parseInt(arg2);
return arg1 + arg2;
}
in my C# code:
[Test]
public void Tescik()
{
Assert.AreEqual(sel.GetEval(@"this.browserbot.getUserWindow().Add(2,3);"), 5, "Adding...");
}
when run in NUnit it fails with:
ERROR: Threw an exception: this.browserbot.getUserWindow().Add is not a function
any suggestions what's wrong? I have both sel.start() and stop()