[Webtest] Issues with build1393 and 1416 with Script.aculo.us 1.6.4

Matt Raible webtest@lists.canoo.com
Mon, 9 Oct 2006 09:17:27 -0600


I tried upgrading my app to use the latest version of Script.aculo.us,
but it spits out the following error:

C:\Source\temp\appfuse\test\web\web-tests.xml:28: Canoo Webtest: R_1393.
Test failed.
Test step invoke (C:\Source\temp\appfuse\test\web\login.xml:1: )
named "get Login Page" failed with
 message "Step[invoke "get Login Page" (1/6)]: Script error loading
page executing webtest at: invok
e TypeError: Cannot read property "prototype" from null
(http://localhost:9234/appfuse/scripts/prototype.js#1320)

Line 1320 is:

copy(Form.Methods, HTMLFormElement.prototype);

The full method is:

Element.addMethods = function(methods) {
  Object.extend(Element.Methods, methods || {});

  function copy(methods, destination) {
    var cache = Element.extend.cache;
    for (var property in methods) {
      var value = methods[property];
      destination[property] = cache.findOrStore(value);
    }
  }

  if (typeof HTMLElement != 'undefined') {
    copy(Element.Methods, HTMLElement.prototype);
    copy(Form.Methods, HTMLFormElement.prototype);
    [HTMLInputElement, HTMLTextAreaElement,
HTMLSelectElement].each(function(klass) {
      copy(Form.Element.Methods, klass.prototype);
    });
    _nativeExtensions = true;
  }
}

The strange thing is my tests pass just fine in one checkout I have of
my project, and it fails with the error above in another.  I've diffed
the directories and found no difference between them.  Any ideas?  Is
this an issue with HtmlUnit not supporting the latest prototype
library?

Thanks,

Matt