Thanks for letting us know. It seems to be the new Engine API problem. I will create an issue to track it and fix it.
Thanks again, Jian On Fri, Jul 23, 2010 at 12:59 PM, Jade <[email protected]> wrote: > Thanks Jian! It worked fine by calling useTelluriumEngine(false); > > at the beginning of my test: > > @Test > public void testSetUserPreferences() { > useTelluriumEngine(false); > > Jade > > On Jul 23, 11:37 am, Jian Fang <[email protected]> wrote: > > Here is the code that threw the error: > > > > TelluriumApi.prototype.isChecked = function(locator) { > > var element = this.cacheAwareLocate(locator); > > if (element.checked == null) { > > throw new SeleniumError("Element is not a toggle-button."); > > } > > return element.checked; > > > > }; > > > > I assume you are using Tellurium new Engine. Have you tried to use > Selenium > > core by calling > > > > useTelluriumEngine(false) > > > > at the beginning of your test code and see what happens? > > > > Thanks, > > > > Jian > > > > On Fri, Jul 23, 2010 at 12:30 PM, Jade <[email protected]> wrote: > > > Hi Jian, > > > > > I looked at the example and I added a few more diagnostic tests. I'm > > > still stumped as to why this line of code > > > > > boolean checked = upm > > > > > > > .isChecked("Formprefs.ListTabOptions.FilterOptionsListFieldset.FilterOptionsList[1]"); > > > > > produces this error: com.thoughtworks.selenium.SeleniumException: > > > ERROR: Element is not a toggle-button. > > > > > Here are the diagnose results in case this sheds light on anything: > > > > > Diagnosis Result for > > > Formprefs.ListTabOptions.FilterOptionsListFieldset.FilterOptionsList[1] > > > > > ------------------------------------------------------- > > > > > Matching count: 1 > > > > > Match Elements: > > > > > --- Element 1 --> > > > > > <input name="LIST_ASSIGNED_TO" value="ASSIGNED_TO" checked="checked" > > > type="checkbox"> > > > > > Parents: > > > > > --- Parent 1 --- > > > > > <li class="ds-form-item odd"> > > > <div class="ds-form-content"> > > > <fieldset id="N100E3" class="ds-checkbox-field settings_onclick"> > > > <label> > > > <input name="LIST_ASSIGNED_TO" value="ASSIGNED_TO" checked="checked" > > > type="checkbox">Assigned To</label> > > > </fieldset> > > > </div> > > > </li> > > > > > Closest: > > > > > Closest: > > > > > --- closest element 1 --- > > > > > <input name="LIST_ASSIGNED_TO" value="ASSIGNED_TO" checked="checked" > > > type="checkbox"> > > > > > It looks like it's finding the checkbox but I can't use the checkbox > > > in any methods such as getValue() or isChecked() > > > > > stack trace: > > > > > com.thoughtworks.selenium.SeleniumException: ERROR: Element is not a > > > toggle-button. > > > at > > > > > > com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java: > > > 97) > > > at > > > > > > com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java: > > > 91) > > > at sun.reflect.GeneratedMethodAccessor57.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.GeneratedMethodAccessor56.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.GeneratedMethodAccessor55.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.GeneratedMethodAccessor43.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.CallSiteArray.defaultCall(CallSiteArray.java: > > > 40) > > > at > > > > > > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java: > > > 117) > > > at > > > > > > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java: > > > 129) > > > at > > > org.telluriumsource.component.data.Accessor.isChecked(Accessor.groovy: > > > 52) > > > at > > > org.telluriumsource.component.data.Accessor$isChecked.call(Unknown > > > Source) > > > at > > > > > > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java: > > > 40) > > > at > > > > > > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java: > > > 117) > > > at > > > > > > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java: > > > 129) > > > at org.telluriumsource.dsl.BaseDslContext > > > $_isChecked_closure36.doCall(BaseDslContext.groovy:497) > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > at > > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: > > > 39) > > > 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.AbstractCallSite.call(AbstractCallSite.java: > > > 117) > > > at > > > > > > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java: > > > 125) > > > at > org.telluriumsource.ui.object.CheckBox.isChecked(CheckBox.groovy: > > > 48) > > > at org.telluriumsource.ui.object.CheckBox$isChecked.call(Unknown > > > Source) > > > at > > > > > > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java: > > > 40) > > > at > > > > > > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java: > > > 117) > > > at > > > > > > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java: > > > 125) > > > at > > > org.telluriumsource.dsl.BaseDslContext.isChecked(BaseDslContext.groovy: > > > 495) > > > at > > > > > > test.admin.SettingsJUnitTestCase.testSetUserPreferences(SettingsJUnitTestCase.java: > > > 78) > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > at > > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: > > > 39) > > > at > > > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: > > > 25) > > > at java.lang.reflect.Method.invoke(Method.java:597) > > > at org.junit.runners.model.FrameworkMethod > > > $1.runReflectiveCall(FrameworkMethod.java:44) > > > at > > > > > > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java: > > > 15) > > > at > > > > > > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java: > > > 41) > > > at > > > > > > org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java: > > > 20) > > > at > > > > > > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java: > > > 76) > > > at > > > > > > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java: > > > 50) > > > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) > > > at > org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) > > > at > org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) > > > at > > > > ... > > > > read more ยป > > -- > 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.
