Hi John,

   I am using the following module definition for the html pasted below. When I 
run the test, I get the following error.
When I remove the Module Definition rest of the tests run fine. Can you let me 
know how my definition differs from TrUMP's?

Regards,

Manoj


//ERROR:
java.lang.NullPointerException: Cannot get property 'uid' on null object
    at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:56)
    at 
org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:153)
    at 
org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:29)
    at 
org.codehaus.groovy.runtime.callsite.GetEffectivePogoPropertySite.callGroovyObjectGetProperty(GetEffectivePogoPropertySite.java:49)
    at org.tellurium.object.Container.add(Container.groovy:27)
    at org.tellurium.object.Container$add.call(Unknown Source)
    at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:43)
    at org.tellurium.object.List$add.call(Unknown Source)
    at org.tellurium.dsl.UiDslParser.setParent(UiDslParser.groovy:103)
    at groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:134)
    at groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:64)
    at 
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeOnDelegationObjects(ClosureMetaClass.java:424)
    at 
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:346)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892)
    at 
org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
    at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:47)
    at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite..java:142)
    at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:150)
    at module.BRHomePage$_defineUi_closure6.doCall(BRHomePage.groovy:54)
    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:86)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:234)
    at 
org.codehaus.groovy..runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892)
    at 
org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
    at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:47)
    at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:142)
    at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:150)
    at module.BRHomePage$_defineUi_closure6.doCall(BRHomePage.groovy)
    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:86)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:234)
    at 
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892)
    at groovy.lang.Closure.call(Closure.java:279)
    at groovy.lang.Closure.call(Closure.java:274)
    at groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:143)
    at groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:64)
    at 
org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
    at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:43)
    at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
    at module.BRHomePage.defineUi(BRHomePage.groovy:48)
    at test.BRHomePageTestCase.initUi(BRHomePageTestCase.java:22)
    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.internal.runners.ClassRoadie.runBefores(ClassRoadie.java:49)
    at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:36)
    at 
org.junit.internal.runners.JUnit4ClassRunner..run(JUnit4ClassRunner.java:42)
    at 
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
    at 
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
    at 
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
    at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
    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.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
    at 
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)

//MY MODULE DEFINITION:

         ui.Container(uid:"subnav", clocator:[tag:"ul",id:"subnav"]){
             Container(uid: "CoreLinks", clocator:[tag: "li", id: 
"core_links"]){
                 List(uid:"links", clocator:[tag: "ul"], separator: "li"){
                     UrlLink(uid: "all", clocator:[:])
                 }
             }
             UlrLink(uid: "subscribe", colocator:[tag:"li", id: "subscribe"])
         }


//TrUMP Generated Definition:
Container(uid: "root", clocator: [tag: "ul", id: "subnav"]){
    Container(uid: "T4dd", clocator: [tag: "ul"]){
        UrlLink(uid: "a0", clocator: [tag: "a", text: "Front Page", href: "/"])
        UrlLink(uid: "a1", clocator: [tag: "a", text: "Top Writers", href: 
"/top-writers"])
        UrlLink(uid: "a2", clocator: [tag: "a", text: "Activities", href: 
"/activities"])
        UrlLink(uid: "a3", clocator: [tag: "a", text: "Write", href: 
"/articles/new"])
    }
    UrlLink(uid: "a4", clocator: [tag: "a", text: "Subscribe to Front Page", 
href: "/articles;feed?tag_id=1"])
}


// HTML UNDER TEST:

<ul id="subnav">
<li id="core_links">
<ul>
<li class="active">
<a href="/" style="background-color: rgb(169, 218, 146);">Front Page</a>
</li>
<li>
<a href="/top-writers" style="background-color: rgb(169, 218, 146);">Top 
Writers</a>
</li>
<li>
<a rel="nofollow" href="/activities" style="background-color: rgb(169, 218, 
146);">Activities</a>
</li>
<li>
<a href="/articles/new" style="background-color: rgb(169, 218, 146);">Write</a>
</li>
<li/>
</ul>
</li>
<li id="subscribe">
<a href="/articles;feed?tag_id=1" style="background-color: rgb(169, 218, 
146);">Subscribe to Front Page</a>
</li>
</ul>



----- Original Message ----
> From: John <[email protected]>
> To: tellurium-users <[email protected]>
> Sent: Tuesday, June 16, 2009 1:08:01 PM
> Subject: Re: TrUMP Generated DSL.
> 
> 
> Sorry for replying late. I am a bit busy today.
> 
> For the List part, you can rely on its parent for locating because its
> parent has an ID. For example, you can use
> 
> ui.Container(uid: "CoreLinks", clocator:[tag: "li", id: "core_links"])
> {
>     List(uid:"links", clocator:[tag: "ul"], separator: "li"){
>         UrlLink(uid: "all", clocator:[:])
>     }
> }
> 
> for the List part. Since you only have couple elements, you can also
> use Container instead of List to describe all of the "li" elements.
> 
> Thanks,
> 
> Jian
> 
> On Jun 16, 2:26 pm, Manoj Chavan wrote:
> > Thank you Jian, That worked I am moving along. I need another help in 
> > defining 
> the GUI Module for the following
> > html.
> >
> > 

> >     
        * 
> >         
  > >
> >             
        * 
> >                 Front Page
> >             
> >             
        * 
> >                 Top Writers
> >             
> >             
        * 
> >                 Activities
> >             
> >             
        * 
> >                 Write
> >             
> >             
        * 
> >                 Edit
> >             
> >         
> >     
> >
> >     
        * 
> >            Subscribe to Front Page
> >     
> > 
> >
> >
> >
> > >From: Jian Fang 
> > >To: [email protected]
> > >Sent: Monday, June 15, 2009 1:51:17 PM
> > >Subject: Re: TrUMP Generated DSL.
> >
> > >>We updated the Tellurium core to upgrade to Selenium 1.0.1. Your problem 
> > >>is 
> caused by the fact that Selenium 1.0.1
> > >changed the multiple window flag to a single window flag and our core in 
> trunk has been updated for that. Please update
> > >>your Maven project to use the latest 0.6.0 snapshot and use custom server 
> server 1.0.1-te.
> >
> > >Thanks,
> >
> > >Jian
> >
> > >On Mon, Jun 15, 2009 at 2:58 PM, Manoj Chavan wrote:
> >
> > >Ok.. used org.junit.Assert.assertTrue() to continue. My code used to 
> > >compile 
> and execute the tests with out any problem
> > >>>>Once I introduced this assert statement (sounds weird) I am now getting 
> this error. Nothing in my build/classpaths has changed.
> > >>What is missing.
> >
> > >>Regards,
> >
> > >>Manoj
> >
> > >>Configure Embedded Selenium Server using configuration file
> > >>>>groovy.lang.MissingPropertyException: No such property: singleWindow 
> > >>>>for 
> class: org.openqa.selenium.server.RemoteControlConfiguration
> > >>    at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:49)
> > >>>>    at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.setProperty(ScriptBytecodeAdapter.java:485)
> > >>    at
> > >> 
> org.tellurium.server.SeleniumServerDaemon.run(SeleniumServerDaemon.groovy:84)
> > >>    at org.tellurium.server.SeleniumServerDaemon$run.call(Unknown Source)
> > >>    at 
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:43)
> > >>>>    at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
> > >>    at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
> > >>    at 
> org.tellurium.server.EmbeddedSeleniumServer.setUpSeleniumServer(EmbeddedSeleniumServer.groovy:41)
> > >>>>    at 
> org.tellurium.server.EmbeddedSeleniumServer$setUpSeleniumServer.callCurrent(Unknown
>  
> Source)
> >
> > >>    at 
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:47)
> > >>>>    at
> > >> 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:142)
> > >>    at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:146)
> > >>    at 
> org.tellurium.server.EmbeddedSeleniumServer.runSeleniumServer(EmbeddedSeleniumServer.groovy:52)
> > >>>>    at 
> org.tellurium.server.EmbeddedSeleniumServer$runSeleniumServer.call(Unknown 
> Source)
> > >>    at 
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:43)
> > >>    at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
> > >>>>    at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
> > >>    at 
> org.tellurium.framework.TelluriumFramework.start(TelluriumFramework.groovy:97)
> > >>    at
> > >> org.tellurium.framework.TelluriumFramework$start.callCurrent(Unknown 
> Source)
> >
> > >>    at 
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:47)
> > >>    at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:142)
> > >>    at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:146)
> > >>    at 
> org.tellurium.framework.TelluriumFramework.start(TelluriumFramework.groovy:108)
> > >>    at 
> org.tellurium.test.java.TelluriumJavaTestCase.setUpForClass(TelluriumJavaTestCase.java:23)
> >
> > >>    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.internal.runners.ClassRoadie.runBefores(ClassRoadie.java:49)
> > >>>>    at 
> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:36)
> > >>    at 
> org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
> > >>    at 
> org..apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
> > >>>>    at 
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
> > >>    at 
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
> > >>>>    at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
> > >>    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.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
> > >>    at 
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
> > >>Configure Selenium Client using configuration file
> > >>Jun 15, 2009 11:53:49 AM 
> com.thoughtworks.selenium.grid.tools.ThreadSafeSeleniumSessionStorage 
> startSeleniumSession
> > >>INFO: Contacting Selenium RC at localhost:4444
> > >>>>Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 5.348 
> > >>>>sec 
> <<< FAILURE!
> >
> > >>>From: Manoj Chavan 
> >
> > >>>To: [email protected]
> > >>>Sent: Monday, June 15, 2009 11:11:20 AM
> >
> > >>>Subject: Re: TrUMP Generated DSL.
> >
> > >>>Hi Jian,
> > >>>   I Checked the POM file and see the following in the xml.
> >
> > >>>
> > >>>            junit
> > >>>>>>            junit
> > >>>            4.4
> > >>>            test
> > >>>        
> >
> > >>>  How do I use the assert functionality?
> >
> > >>>Manoj
> >
> > >>>>From: Jian Fang 
> > >>>>To: [email protected]
> > >>>>Sent: Friday, June 12, 2009 5:39:25 PM
> > >>>>Subject: Re: TrUMP Generated DSL.
> >
> > >>>>>>>>TelluriumJavaTestCase extends BaseTelluriumJavaTestCase, which does 
> not extend TestCase. The reason is that we use JUnit 4.4 and higher to
> > >>>>leverage the JUnit annotations such as @Test, @Before, @BeforeClass, 
> > >>>>and 
> so on. Please check your pom file to see if you have JUnit 4 included.
> >
> > >>>>You can use
> >
> > >>>>mvn dependency:tree
> >
> > >>>>to show the dependency tree.
> >
> > >>>>Thanks,
> >
> > >>>>Jian
> >
> > >>>>On Fri, Jun 12, 2009 at 5:53 PM, Manoj Chavan 
> wrote:
> >
> > >>>>>>>>>Hi,
> >
> > >>>>>    Does TelluriumJavaTestCase extend TestCase? I am using 
> 'assertTrue/assertEquals' in the test case
> > >>>>>and I am getting 'cannot find symbol; symbol: method 
> assertTrue(boolean)/assertEquals(java.lang.String, java.lang.String);
> >
> > >>>>>location : class test.BRHomepage .....
> > >>>>>    I tried "include org.junit.*;" in my header... I dont get any 
> > >>>>> errors 
> while building clean, but while executing 'Maven Test'.
> > >>>>>What am I missing.
> >
> > >>>>>Regards,
> >
> > >>>>>Manoj
> >
> > >>>>>>From: Jian Fang 
> > >>>>>>To: [email protected]
> > >>>>>>Sent: Wednesday, June 10, 2009 5:36:16 PM
> >
> > >>>>>>Subject: Re: TrUMP Generated DSL.
> >
> > >>>>>>>>>>>>Glad you got it working. Please let us know if you have any 
> further questions.
> >
> > >>>>>>Thanks,
> >
> > >>>>>>Jian
> >
> > >>>>>>On Wed, Jun 10, 2009 at 6:18 PM, Manoj Chavan 
> wrote:
> >
> > >>>>>>>Thank you... that was it... dont know how I missed it...
> > >>>>>>>>>>>>>>Successfully ran my very first Tellurium test case...
> >
> > >>>>>>>Manoj
> >
> > >>>>>>>>From: Jian Fang 
> > >>>>>>>>To: [email protected]
> > >>>>>>>>Sent: Wednesday, June 10, 2009 2:55:30 PM
> >
> > >>>>>>>>Subject: Re: TrUMP Generated DSL.
> >
> > >>>>>>>>>>>>>>>>Seems you missed the "{" after the Container. The UI module 
> should be
> > >>>>>>>>        ui.Container(uid:"modulartab", colocator:[tag:"div",class: 
> "tabs"]){
> >
> > >>>>>>>>        List(uid: "menu", clocator: [tag: "ul", id: 
> "modular-tab-menu"],separator: "li"){
> >
> > >>>>>>>>>               UrlLink(uid: "all", clocator: [:])
> > >>>>>>>>>>>>>>>>>>         }
> > >>>>>>>>       }
> >
> > >>>>>>>>Otherwise, the DSL parser cannot parse the UI module correctly. 
> > >>>>>>>>What 
> does "{}" mean here?
> > >>>>>>>>Actually, it represents a Groovy closure!
> >
> > >>>>>>>>On Wed, Jun 10, 2009 at 5:07 PM, Manoj Chavan 
> wrote:
> >
> > >>>>>>>>>>>>>>>>>>Getting NoMethodFound exception for the following UI 
> > >>>>>>>>>>>>>>>>>>groovy 
> definition.
> >
> > >>>>>>>>>>>>>>>>>>public class BRHomePage extends DslContext {
> > >>>>>>>>>>>>>>>>>>     public void defineUi() {
> > >>>>>>>>>>>>>>>>>>         ui.Container(uid:"modulartab", 
> colocator:[tag:"div",class:"tabs"])
> >
> > >>>>>>>>>        List(uid: "menu", clocator: [tag:
> >
> > ...
> >
> > 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