"element.dispatchEvent is not a function" seems to be a notorious JavaScript error and it does not really tell you anything useful. I am not sure if we could change that without significantly refactoring Selenium Core code.
After UDL is introduced, the id in the UID field can only be letters, digits, and underscore "_". I will take a look to see if we could add more useful information for UDL parser. Thanks, Jian On Tue, Apr 20, 2010 at 6:58 AM, Jonathan Share <[email protected]> wrote: > Hi, > > Another new error after upgrading to using CSS selectors (although it > may be that this code had not been called before). > > For the following model; > > ui.Form(uid: "nameAllocation", clocator: [name: "nameAllocation"]) { > Container(uid: "vehicles", clocator: [tag: "div", 'class': "segment"]) { > Repeat(uid: "vehicle", clocator: [tag: "div", id: > "fields-vehicle", direct: "true"]) { > InputBox(uid: "registration", clocator: [name: "*LicensePlate"]) > Selector(uid: "driver", clocator: [name: "*DriverName"]) > } > } > } > > On the following line in my code (where realIndex is 1); > > type "nameAllocation.vehicles.vehicle[${realIndex}].registration", > details.registration > > I get the exception at the end of this mail. If I call getSelector() > on the same UID I get the following; > > jquery=#fields-vehicle input[name*=LicensePlate] > > It seems clear here that we are missing the element definitions from > the Form and Container and an :eq(0) after #fields-vehicle (I know > it's a bad practice to use the same id on multiple elements but I have > no control over the markup myself). I'm going to take a closer look at > the markup to see if I can solve this in another manner but the error > message produced should at least be improved to make it more developer > friendly. > > Regards, > > Jonathan > > com.thoughtworks.selenium.SeleniumException: ERROR: Command execution > failure. Please search the forum at http://clearspace.openqa.org for > error details from the log window. The error message is: > element.dispatchEvent is not a function > at > com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97) > at > com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:91) > at sun.reflect.GeneratedMethodAccessor267.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:229) > at > org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:129) > at > org.telluriumsource.component.connector.CustomSelenium.getBundleResponse(CustomSelenium.groovy:257) > at sun.reflect.GeneratedMethodAccessor266.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88) > at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058) > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886) > at > groovy.lang.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:149) > at groovy.lang.MetaObjectProtocol$invokeMethod.call(Unknown Source) > at > org.telluriumsource.component.dispatch.Dispatcher.methodMissing(Dispatcher.groovy:56) > at sun.reflect.GeneratedMethodAccessor265.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88) > at > groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:813) > at > groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1107) > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1060) > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886) > at > org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:39) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:129) > at > org.telluriumsource.component.bundle.BundleProcessor.passBundledCommand(BundleProcessor.groovy:322) > at > org.telluriumsource.component.bundle.BundleProcessor$passBundledCommand.callCurrent(Unknown > Source) > at > org.telluriumsource.component.bundle.BundleProcessor.process(BundleProcessor.groovy:414) > at > org.telluriumsource.component.bundle.BundleProcessor$process.callCurrent(Unknown > Source) > at > org.telluriumsource.component.bundle.BundleProcessor.methodMissing(BundleProcessor.groovy:427) > at sun.reflect.GeneratedMethodAccessor259.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88) > at > groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:813) > at > groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1107) > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1060) > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886) > at > org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:39) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133) > at > org.telluriumsource.component.event.EventHandler$_type_closure11.doCall(EventHandler.groovy:224) > at sun.reflect.GeneratedMethodAccessor354.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88) > at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) > at > org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886) > at > org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:151) > at > org.telluriumsource.component.event.EventHandler$_type_closure11.doCall(EventHandler.groovy) > at sun.reflect.GeneratedMethodAccessor353.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88) > at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) > at > org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886) > at > org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:39) > at > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40) > at > org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:54) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:121) > at > org.telluriumsource.component.event.EventHandler$_processEvents_closure1.doCall(EventHandler.groovy:85) > at sun.reflect.GeneratedMethodAccessor290.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88) > at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) > at > org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886) > at groovy.lang.Closure.call(Closure.java:276) > at groovy.lang.Closure.call(Closure.java:289) > at > org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1167) > at > org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1143) > at org.codehaus.groovy.runtime.dgm$108.invoke(Unknown Source) > at > org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:270) > at > org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) > at > org.telluriumsource.component.event.EventHandler.processEvents(EventHandler.groovy:83) > at sun.reflect.GeneratedMethodAccessor288.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:266) > at > org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:51) > at > org.telluriumsource.component.event.EventHandler.type(EventHandler.groovy:220) > at > org.telluriumsource.component.event.EventHandler$type.call(Unknown > Source) > at > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40) > at > org.telluriumsource.component.event.EventHandler$type.call(Unknown > Source) > at > org.telluriumsource.dsl.BaseDslContext$_type_closure9.doCall(BaseDslContext.groovy:209) > at sun.reflect.GeneratedMethodAccessor352.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88) > at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) > at > org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886) > at > org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:39) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:129) > at org.telluriumsource.ui.object.InputBox.type(InputBox.groovy:22) > at org.telluriumsource.ui.object.InputBox$type.call(Unknown Source) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callSafe(AbstractCallSite.java:97) > at > org.telluriumsource.dsl.BaseDslContext.type(BaseDslContext.groovy:207) > at sun.reflect.GeneratedMethodAccessor356.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88) > at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) > at > org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:361) > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886) > at > org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66) > at > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:143) > at > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:155) > > -- > You received this message because you are subscribed to the Google Groups > "tellurium-users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<tellurium-users%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/tellurium-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "tellurium-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/tellurium-users?hl=en.
