开发者

WatiN RunScript fails in FireFox

I have some WatiN tests in IE that I'm porting to FireFox (3.6, 4.0 not supported yet I think) and I have an error in the following code:

var browser = new FireFox(_baseUri);
browser.RunScript("alert('hello');")

Even though it runs fine in IE. I 开发者_如何学Cget the error "{"Error sending last message to jssh server: ReferenceError: alert is not defined"}".

I've tried lots of variations without any success. Any ideas?


Turns out I needed

browser.RunScript("window.alert('hello');");

D'oh!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜