Hi Jian,

 Finally, figured the issue.

 In my tests I had been creating the GooglePageModules again, in
addition to the ones in init(). But in the tests, I was not calling
the
defineUi().

 Thanks for pointing this out.

Regards,
Ic

On Nov 18, 7:40 pm, Jian Fang <[email protected]> wrote:
> Did you call the defineUi() method?
>
> For example, your ui module is defined as
>
> class MyUiModule extends DslContext {
>    public void defineUi() {
>        ui.Container(uid: "Table", clocator: [tag: "table"]){
>        InputBox(uid: "Q", clocator: [tag: "input", title: "Google Search",
> class: "lst", name: "q"])
>        SubmitButton(uid: "GoogleSearch", clocator: [tag: "input", type:
> "submit", class: "lsb", value: "Google Search", name: "btnG"])
>        SubmitButton(uid: "ImFeeling", clocator: [tag: "input", type:
> "submit", class: "lsb", value: "I'm Feeling Lucky", name: "btnI"])
>   }
>
> }
>
> Then you need to call the defineUi() method before you use the UI module.
> Be aware, the "ui." is actually a UI 
> parser.http://code.google.com/p/aost/wiki/UserGuide070AppendixB#What_Is_the_...
> ?
>
> Once the UI module is parsed, the UI objects are stored in an object
> registry so that
> you can find them.
>
> Hope this helps.
>
> Thanks,
>
> Jian
>
> On Thu, Nov 18, 2010 at 8:24 AM, Icarus <[email protected]> wrote:
> > The browser is running now.
>
> > However, when I use the uiModule file generated from using TruMP IDE,
> > I get UIModuleObjectNotFoundError.
>
> > org.telluriumsource.exception.UiObjectNotFoundException: Cannot find
> > UI Object Table.Q
> >        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> > Method)
> >        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
> > Source)
> >        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
> > Source)
> >        at java.lang.reflect.Constructor.newInstance(Unknown Source)
> >        at
>
> > org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:
> > 77)
> >        at org.codehaus.groovy.runtime.callsite.ConstructorSite
> > $ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:
> > 102)
> >        at
>
> > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:
> > 52)
> >        at
>
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:
> > 190)
> >        at
>
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:
> > 198)
> >        at
>
> > org.telluriumsource.dsl.BaseDslContext.walkToWithException(BaseDslContext.groovy:
> > 155)
> >        at org.telluriumsource.dsl.BaseDslContext
> > $walkToWithException.callCurrent(Unknown Source)
> >        at
>
> > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:
> > 44)
> >        at
>
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:
> > 141)
> >        at
>
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:
> > 153)
> >        at
> > org.telluriumsource.dsl.BaseDslContext.keyType(BaseDslContext.groovy:
> > 217)
> >        at
> > org.telluriumsource.dsl.BaseDslContext$keyType.callCurrent(Unknown
> > Source)
> >        at
>
> > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:
> > 44)
> >        at
>
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:
> > 141)
> >        at
>
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:
> > 153)
> >        at NewGoogleStartPage.doGoogleSearch(NewGoogleStartPage.groovy:24)
> >         at
>
> > GoogleStartPageJavaTestCase.testGoogleSearch(GoogleStartPageJavaTestCase.java:
> > 22)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> >        at java.lang.reflect.Method.invoke(Unknown Source)
> >        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 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:
> > 49)
> >        at
> > org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:
> > 38)
> >        at
>
> > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
> > 467)
> >        at
>
> > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
> > 683)
> >        at
>
> > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:
> > 390)
> >        at
>
> > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:
> > 197)
>
> > Here is the UiModule file :
>
> >        ui.Container(uid: "Table", clocator: [tag: "table"]){
> >        InputBox(uid: "Q", clocator: [tag: "input", title: "Google Search",
> > class: "lst", name: "q"])
> >        SubmitButton(uid: "GoogleSearch", clocator: [tag: "input", type:
> > "submit", class: "lsb", value: "Google Search", name: "btnG"])
> >        SubmitButton(uid: "ImFeeling", clocator: [tag: "input", type:
> > "submit", class: "lsb", value: "I'm Feeling Lucky", name: "btnI"])
> > }
>
> > I have enabled useTelluriumEngine(true);
>
> > Thanks,
> > Ic
>
> > On Nov 18, 10:31 am, Icarus <[email protected]> wrote:
> > > I realize that TruMP is for that.
>
> > > Thanks,
> > > Ic
>
> > > On Nov 18, 10:10 am, Icarus <[email protected]> wrote:
>
> > > > Thanks John,
>
> > > >  That was the missing method call. I am not getting a
> > > > UiModelObjectNotFound Error, but think I need to just validate the Ui
> > > > Module file.
>
> > > > Is there a method for us to validate if a UiModule applies to a
> > > > particular web page ?
>
> > > > Thanks,
> > > > Ic
>
> > > > On Nov 17, 4:30 am, Jian Fang <[email protected]> wrote:
>
> > > > > Did you call connectSeleniumServer() before connect to the web under
> > > > > testing? Here is
> > > > > an example.
>
> > > > > Thanks,
>
> > > > > Jian
>
> > > > > public class GoogleTest extends TelluriumJUnitTestCase {
> > > > >     private static GoogleSearchModule gsm;
>
> > > > >     @BeforeClass
> > > > >     public static void initUi() {
> > > > >         gsm = new GoogleSearchModule();
> > > > >         gsm.defineUi();
> > > > >         connectSeleniumServer();
> > > > >     }
>
> > > > >     @Before
> > > > >     public void stat8cconnectToGoogle() {
> > > > >         connectUrl("http://www.google.com";);
> > > > >     }
>
> > > > >     @Test
> > > > >     public void testGoogleSearch() {
> > > > >         gsm.doGoogleSearch("tellurium Groovy Test");
> > > > >     }
>
> > > > >     @Test
> > > > >     public void testGoogleSearchFeelingLucky() {
> > > > >         gsm.doImFeelingLucky("tellurium automated Testing");
> > > > >     }
>
> > > > > }
> > > > > On Tue, Nov 16, 2010 at 3:24 PM, Icarus <[email protected]> wrote:
> > > > > > Hi,
>
> > > > > >  I was following the tutorial for using Tellurium from Eclipse :
>
> > > > > >  http://code.google.com/p/aost/wiki/CustomTelluriumEclipseProject
>
> > > > > > And I was able to get the project to run with some minor changes.
>
> > > > > > however,
>
> > > > > > When I run the testcases, I get the following error :
>
> > > > > > java.lang.NullPointerException: Cannot invoke method open() on null
> > > > > > object
> > > > > >        at
>
> > org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:
> > > > > > 77)
> > > > > >        at
>
> > org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:
> > > > > > 45)
> > > > > >        at
>
> > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:
> > > > > > 40)
> > > > > >        at
>
> > org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:
> > > > > > 32)
> > > > > >        at
>
> > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:
> > > > > > 40)
> > > > > >        at
>
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:
> > > > > > 116)
> > > > > >        at
>
> > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:
> > > > > > 124)
> > > > > >        at
>
> > org.telluriumsource.component.connector.SeleniumConnector.connectUrl(SeleniumConnector.groovy:
> > > > > > 54)
> > > > > >        at
>
> > org.telluriumsource.test.java.BaseTelluriumJavaTestCase.connectUrl(BaseTelluriumJavaTestCase.java:
> > > > > > 57)
> > > > > >        at
>
> > GoogleStartPageJavaTestCase.testGoogleSearch(GoogleStartPageJavaTestCase.java:
> > > > > > 19)
> > > > > >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)
> > > > > >        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
> > Source)
> > > > > >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
> > Source)
> > > > > >        at java.lang.reflect.Method.invoke(Unknown Source)
> > > > > >        at org.junit.runners.model.FrameworkMethod
> > > > > > $1.runReflectiveCall(FrameworkMethod.java:44)
> > > > > >        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].
For more options, visit this group at 
http://groups.google.com/group/tellurium-users?hl=en.

Reply via email to