Have you tried to call useTelluriumEngine(true)
before call getRepeatNum()? getRepeatNum() might only work for Tellurium new Engine. Need to double check. Thanks, Jian On Wed, Dec 29, 2010 at 12:58 AM, Rajshri <[email protected]> wrote: > Thanks Jian, > > I changed the UI module as you suggested and try to run > > getRepeatNum "MainFram.Left.Processes.ProcessLink" > > i am getting following error > > om.thoughtworks.selenium.SeleniumException: ERROR: Command execution > failure. Please search the Tellurium User Group at > http://groups.google.com/group/tellurium-users for error details from > the log window. The error message is: selenium[apiName] is undefined > at > > com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java: > 97) > at > > com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java: > 91) > 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.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.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 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.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.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.GeneratedMethodAccessor73.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 > groovy.lang.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java: > 149) > at groovy.lang.MetaObjectProtocol$invokeMethod.call(Unknown Source) > at > > org.telluriumsource.component.custom.Extension.methodMissing(Extension.groovy: > 20) > 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.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.dsl.BaseDslContext.getTeRepeatNum(BaseDslContext.groovy: > 1179) > at org.telluriumsource.dsl.BaseDslContext > $getTeRepeatNum.callCurrent(Unknown Source) > 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: > 151) > at > org.telluriumsource.dsl.BaseDslContext.getRepeatNum(BaseDslContext.groovy: > 1184) > at org.telluriumsource.dsl.BaseDslContext > $getRepeatNum.callCurrent(Unknown Source) > 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: > 151) > at module.CreateCaseModule.startSupport(supportcase.groovy:109) > at test.TestSupportCase.testCase(TestSupportCase.java:52) > 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.internal.runners.statements.RunBefores.evaluate(RunBefores.java: > 28) > 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 org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) > at > org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java: > 28) > at > org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java: > 31) > at org.junit.runners.ParentRunner.run(ParentRunner.java:236) > at > > org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java: > 45) > at > org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java: > 38) > at > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java: > 460) > at > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java: > 673) > at > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java: > 386) > at > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java: > 196) > > -Rajshri > > > On Dec 29, 2:37 am, Jian Fang <[email protected]> wrote: > > There is one obvious error in your UI module. The ui. should only appear > > once on the top level object because > > it is a pointer for the DSL parser. Try to change your UI module to > > > > ui.Frame(uid: "MainFram", name: "MainFram"){ > > Container(uid: "Left", clocator: [class: "leftContentTd"]) > > { > > Container(uid: "Processes", clocator: [tag: > > "form", position: > > "3"]){ > > Repeat(uid: "ProcessLink", > clocator: > > [tag: "table"]){ > > Image(uid: "Star", > clocator: > > [tag: "img"]) > > UrlLink(uid: "Process", > > clocator: [tag: "a"]) > > } > > } > > } > > } > > > > Hope this helps, > > > > Jian > > > > On Tue, Dec 28, 2010 at 4:17 AM, Rajshri <[email protected]> wrote: > > > Hi All, > > > > > ui.Frame(uid: "MainFram", name: "MainFram"){ > > > Container(uid: "Left", clocator: [class: "leftContentTd"]) > > > { > > > ui.Container(uid: "Processes", clocator: > > > [tag: "form", position: > > > "3"]){ > > > Repeat(uid: "ProcessLink", > clocator: > > > [tag: "table"]){ > > > Image(uid: "Star", > clocator: > > > [tag: "img"]) > > > ui.UrlLink(uid: > "Process", > > > clocator: [tag: "a"]) > > > } > > > } > > > } > > > } > > > > > I have UI module as above > > > I want to know match count of object for "ProcessLink" Uid > > > > > In my application i have a form and inside that as a indirect child, > > > it has a table, and inside that table, it has multiple tables as > > > indirect child. > > > > > Now the inner most table contains one image and one link. > > > > > that link is my process name. Now the link count is not fix and the > > > link label is also not fix. > > > > > know how may innermost table here because the no of table i have > > > means same no of process link i have. Logic is something like this > > > > > x=No of inner most table > > > y='My process name which i need to click' > > > > > If somehow I can get the count of > > > "MainFram.Left.Processes.ProcessLink" I will put a for loop > > > > > for i=1 to count > > > k=getText("MainFram.Left.Processes.ProcessLink["& i &"].Process") > > > if (k==y){ > > > click "MainFram.Left.Processes.ProcessLink["& i &"].Process" > > > } > > > > > Thanks in advance > > > Rajshri > > > > > -- > > > 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]> > <tellurium-users%[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]<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.
