开发者

Watin integration test failing with System.UnauthorizedAccessException when executing javascript

Our team got into work in the morning and we found that all of our Watin (2.1.0) tests were failing on our integration server with the following exception. The tests also no longer work locally against (IE8 or IE9)

WatiN.Core.Exceptions.RunScriptException : RunScript failed
  ----> System.UnauthorizedAccessException : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Note, that this error message is occuring when a list box jquery change event is being fired:

self.$country.bind('change', function (e) {
var country = $('option:selected', this);
if(country.val() == "??")
{                       
    self.$country.val('US');                    
}

We are at a complete loss as:

  • We have tried reverting all code changes prior to test failure and开发者_Python百科 they errors do not appear to be related
  • These tests have been running successfully for several months
  • No windows updates have been applied to the server
  • Network permissions have not been changed

Any insight into this error or suggestions would be greatly appreciated.


For references, we fixed this issue by adding the test site to the IE's trusted sites list and it has resolved the error message. Similar issue is here for reference: stackoverflow.com/questions/3986477/…



I have also run into this problem a lot of times, but in my case it occurred only when the element that was being manipulated was disabled.
Are you facing this problem even when you are running the test in DEBUG mode or is it only when you are running it as part of the suite with a test runner.
You might want to run the test in Visual Studio with the debugger attached and check the properties of the element that is being manipulated in the Quick Watch window. The exact line where the exception is thrown will be available in the Stack Trace where you are getting this exception.

Regards,
Ashish Narmen

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜