Unfortunately, js code does not work under Selenium RC
Even in Inverted instrumenting mode.
I see js errors like these, when I simply open the page with instrumented js code:
Permission denied for <http://10.10.10.10:8080> to get property Window._$jscoverage from <>.
[Break on this error] if (typeof top.opener._$jscoverage...& top.opener._$jscoverage !== null) {
Open.js?...0032618 (line 5)
Permission denied for <http://10.10.10.10:8080> to get property Window._$jscoverage from <>.
[Break on this error] if (typeof top.opener._$jscoverage...& top.opener._$jscoverage !== null) {
Start....0032618 (line 5)
Permission denied for <http://10.10.10.10:8080> to get property Window._$jscoverage from <>.
[Break on this error] if (typeof top.opener._$jscoverage...& top.opener._$jscoverage !== null) {
locale...0032618 (line 5)
_$jscoverage is undefined
[Break on this error] _$jscoverage['locale.js'][9]++;
locale...0032618 (line 48)
Node was not found" code: "8
[Break on this error] Filtered chrome url chrome://flashblock/content/flashblock.xml
Error: Permission denied for <http://localhost:8080> to get property Window._$jscoverage from <>.
Source File: http://localhost:8080/jscoverage.js
Line: 34
if (w.opener && w.opener.top._$jscoverage) {
It looks like the fix mentioned above (a few months ago) may not work in all possible cases ... I am working on some changes in the Subversion repository which may fix the problem.
Generally, however, when using Selenium it may be better to use the approach described here (instead of opening a new window with jscoverage.html):