...
[webtest] (request.TargetHelper 94 ) ScriptException:
enclosed exception was "TypeError: Only one argument may be specified if
the first argument to RegExp.prototype.compile is a RegExp object.
(http://***.***.com:12004/j/v.js#450)"
...
And this is the code found on line 450 :
448 if(propertyOn(oRegexp=getProperty(element,"REGEXP"))&&sValue){
449 if(oRegexp.constructor!=RegExp)
450 oRegexp = new RegExp(oRegexp, "i");
451 if(!oRegexp.test(sValue)){
452 Validation.Err.raise(element, "Please enter a valid
value", "REGEXP",event);
453 return false;
454 }
455 }
I don't have a clue why he only gives this error running one of both
tests. It seems that he don't passes the if condition during the second
test...
really interesting, perhaps a bug in Rhino itself!
Do you have the possibility to add some "alert(...)" to see which way is
followed with normal browser and with webtest?
I guess that the "if(oRegexp.constructor!=RegExp)" causes the problem. Does
this code run as well under Firefox and IE?
Marc.