Seems to be the Groovy variable problem and also please use Container
instead of DIV for container type object.

Please try the following UI module,

        ui.Container(uid: "tree_node", clocator: [id: "\"${home_node_id}\"",
class: "*aui-tree-content"]) {

        ui.Container(uid: "tree_node", clocator: [id: "\"${home_node_id}\"",
class: "*aui-tree-content"]) {
            Div(uid: "hitarea", clocator: [class: "*aui-tree-hitarea"],
direct: "true", respond: ["click"])
            Div(uid: "icon", clocator: [class: "*aui-tree-icon"], direct:
"true", respond: ["click"])
            Container(uid: "label", clocator: [class: "*aui-tree-label"],
direct: "true", respond: ["click"]) {
                UrlLink(uid: "link", clocator: [:], direct: "true", respond:
["click"])
            }
        }

It works for me and please see the LiferayTestCase test case I created for
you on tellurium subversion trunk/core.

Thanks,

Jian

On Thu, Feb 24, 2011 at 3:45 AM, Michel <[email protected]> wrote:

> Hi I am working for a project at Volkswagen where the Liferay portal
> server software is being used for all B2C for their brands like VW. I
> am trying to use tellurium here now with mixed success.
> The hard part is with javascript generated stuff like trees (in this
> case in the control panel > pages aka sitemap; see a visual example
> here: http://liferaycms.files.wordpress.com/2011/01/przechwytywanie.png
> )
> I need to be able to exand nodes (or collapse..), here is a sample
> html-snippet for a node:
>
> <div id="aui-3-2-0PR1-11841" class="aui-helper-clearfix aui-tree-node-
> content aui-tree-data-content aui-tree-node-content aui-tree-node-io-
> content aui-tree-collapsed aui-dd-drop aui-dd-draggable">
>       <div class="aui-tree-hitarea"></div>
>       <div class="aui-tree-icon"></div>
>       <div style="-moz-user-select: none;" class="aui-tree-label aui-
> helper-
> unselectable">
>               <a href="http://local.ci.appfactory.vw.com/group/
> control_panel/
> manage?
>
> p_p_id=156&amp;p_p_lifecycle=0&amp;p_p_state=maximized&amp;p_p_mode=view&amp;doAsGroupId=11600&amp;refererPlid=11862&amp;_156_struts_action=
> %2Fgroup_pages%2Fedit_pages&amp;_156_tabs1=public-
>
> pages&amp;_156_tabs2=pages&amp;_156_tabs3=children&amp;_156_redirect=&amp;_156_groupId=11600&amp;_156_selPlid=12420">dealers</
> a>
> </div></div>
>
> To expand/collapse I need to click on on the div with class "aui-tree-
> hitarea" (actually to have the click event getting fired), to
> accomodate this I use the next structure:
>
>       ui.Div(uid: "tree_node", clocator: [id: "${home_node_id}",
> class: "*aui-tree-content"]){
>               Div(uid: "hitarea", clocator: [class: "*aui-tree-
> hitarea"], direct: "true", respond: ["click"])
>               Div(uid: "icon", clocator: [class: "*aui-tree-icon"],
> direct: "true", respond: ["click"])
>               Div(uid: "label", clocator: [class: "*aui-tree-
> label"], direct: "true", respond: ["click"]){
>                   UrlLink(uid: "link", clocator: [:], direct:
> "true", respond: ["click"])
>               }
>       }
>
> now if I use something like <click "tree_node.hitarea"> I get an
> exception with next trace:
>
> ====================================================================================
> 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: JSON.parse
> JavaScript Error Stack:
> {anonymous}(null)@http://localhost:4444/selenium-server/core/scripts/
> utils.js:589
>
> printStackTrace()@http://localhost:4444/selenium-server/core/scripts/
> utils.js:574
>
> {anonymous}("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:
> JSON.parse")@http://localhost:4444/selenium-server/core/scripts/
> selenium-remoterunner.js:276
>
> {anonymous}([object Error])@http://localhost:4444/selenium-server/
> core/
> scripts/selenium-executionloop.js:127
>
> {anonymous}(-5)@http://localhost:4444/selenium-server/core/scripts/
> selenium-executionloop.js:81
>
> {anonymous}(-5)@http://localhost:4444/selenium-server/core/scripts/
> htmlutils.js:60{anonymous}(null)@http://localhost:4444/selenium-
> server/
> core/scripts/utils.js:589,printStackTrace()@http://localhost:4444/
> selenium-server/core/scripts/utils.js:574,{anonymous}("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: JSON.parse")@http://localhost:
> 4444/selenium-server/core/scripts/selenium-remoterunner.js:276,
> {anonymous}([object Error])@http://localhost:4444/selenium-server/
> core/
> scripts/selenium-executionloop.js:127,{anonymous}(-5)@http://
> localhost:
> 4444/selenium-server/core/scripts/selenium-executionloop.js:81,
> {anonymous}(-5)@http://localhost:4444/selenium-server/core/scripts/
> htmlutils.js:60
> com.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: JSON.parse
> JavaScript Error Stack:
> {anonymous}(null)@http://localhost:4444/selenium-server/core/scripts/
> utils.js:589
>
> printStackTrace()@http://localhost:4444/selenium-server/core/scripts/
> utils.js:574
>
> {anonymous}("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:
> JSON.parse")@http://localhost:4444/selenium-server/core/scripts/
> selenium-remoterunner.js:276
>
> {anonymous}([object Error])@http://localhost:4444/selenium-server/
> core/
> scripts/selenium-executionloop.js:127
>
> {anonymous}(-5)@http://localhost:4444/selenium-server/core/scripts/
> selenium-executionloop.js:81
>
> {anonymous}(-5)@http://localhost:4444/selenium-server/core/scripts/
> htmlutils.js:60{anonymous}(null)@http://localhost:4444/selenium-
> server/
> core/scripts/utils.js:589,printStackTrace()@http://localhost:4444/
> selenium-server/core/scripts/utils.js:574,{anonymous}("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: JSON.parse")@http://localhost:
> 4444/selenium-server/core/scripts/selenium-remoterunner.js:276,
> {anonymous}([object Error])@http://localhost:4444/selenium-server/
> core/
> scripts/selenium-executionloop.js:127,{anonymous}(-5)@http://
> localhost:
> 4444/selenium-server/core/scripts/selenium-executionloop.js:81,
> {anonymous}(-5)@http://localhost:4444/selenium-server/core/scripts/
> htmlutils.js:60
>       at
>
> com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:
> 97)
>       at
>
> com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:
> 91)
>       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
> 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
> 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.flush(BundleProcessor.groovy:
> 372)
>       at org.telluriumsource.component.bundle.BundleProcessor
> $flush.call(Unknown Source)
>       at
> org.telluriumsource.dsl.GlobalDslContext.pause(GlobalDslContext.groovy:
> 236)
>       at org.telluriumsource.dsl.GlobalDslContext
> $pause.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 ui.Theme.expandTree(Theme.groovy:128)
>       at test.Header.testSpike(Header.java:69)
>
>
> ====================================================================================
>
>
> How to fix this? I tried more stuff but so far unsuccessful.....
>
> Cheers, Michel
>
> --
> 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.
>
>

-- 
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