javascript error while recording a web test with Visual Studio 2010 recorder
I'm currently recording Web Performance Tests using Visual Studio 2010. The recorder is working fine except for a javascript that is triggered in a popup (fckEditor file manager).
When editing HTML content in fckEditor, we can add an hyperlink. Clicking on the link tool open a popup with a file browser on the server. All files are displayed as hyperlink with a onsubmit event:
OpenFile(fileUrl); return false;
The OpenFile function fails at the following line:
window.top.opener.SetUrl( fileUrl ) ;
The following e开发者_如何学Pythonrror is thrown:
SCRIPT5007: Unable to get value of the property 'SetUrl': object is null or undefined frmresourceslist.html, line 92 character 2
This error only appears when recording with MS Recorder. Following the exact same steps on IE without the Recorder on is working fine.
Does anyone had the same type of issue?
As per MSDN:
A downside to this recording method is that it can fail to record requests made by JavaScript (for example, on AJAX sites), ActiveX controls, and some types of pop-up windows, since Internet Explorer does not always raise the necessary events. In most cases, these problems can be solved by manually adding the missed requests back into the Web test, as described later in this document.
http://msdn.microsoft.com/en-us/library/ms364082(v=vs.80).aspx
Even if this documentation is intended to Visual Studio 2005, I believe that it is still valid for VS 2010.
you can solve this by making parse dependent Requests property = false for every single request and you can make some custom web plugin test so you can generalize this property for all the requests
精彩评论