I'm trying to follow up on this - I've added alerts before and after the function definition - both alerts popup when my script starts up -->> so user-extensions.js is being read :-)
for some reason, the function is not being 'registered' :-( could someone please add this to your user-extensions file and try it on a select box? the command should be 'assertListLength' - yes? // Compare length of select list to num Selenium.prototype.assertListLength = function(locator, num) { var element = this.page().findElement(locator); var expectedValue = num; var actualValue = element.options.length; Assert.equals(expectedValue, actualValue); }; On or about Thu, 22 Sep 2005 12:07:53 -0400 Warren Pollans <[EMAIL PROTECTED]> allegedly wrote: > Hello, > > I defined a function in user-extensions.js - trying to pattern it > after the examples given in user-extensions.js.sample. When I try to > use it, I get the following error. I restarted both selenium-server > and mozilla after editing user-extensions. What have I missed? I'm > using the svn build from sept 13 > > 1) Error: > test_d_whitelist(TC_mailset2_filters): > RuntimeError: Wrong content-type: > <?xml version='1.0'?> > <methodResponse> > <fault> > <value><struct> > <member> > <name>faultCode</name> > <value><int>8001</int></value> > </member> > <member> > <name>faultString</name> > <value><string>function assertListLength not found</string></value> > </member> > </struct></value> > </fault> > </methodResponse> > > > $ cat user-extensions.js > // Compare length of select list to num > Selenium.prototype.assertListLength = function(locator, num) { > // locator-strategies are automatically handled by" findElement" > var element = this.page().findElement(locator); > > // Create the text to verify > var expectedValue = num; > > // Get the actual element value > var actualValue = element.options.length; > > // Make sure the actual value matches the expected > Assert.equals("Length does NOT match", expectedValue, > actualValue); }; > _______________________________________________ > Selenium-users mailing list > Selenium-users@lists.public.thoughtworks.org > http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users _______________________________________________ Selenium-users mailing list Selenium-users@lists.public.thoughtworks.org http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users