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!
精彩评论