Hi Jian,

I won't have time to debug this until next week (coming to end of
iteration). I am having a new problem however. Tellurium is not blurring the
images it clicks on and adding respond: ["blur"] doesn't work. This means
that if I have multiple comboBoxes on a page, the first one that is selected
will get changed everytime another is supposed to be selected.

UI module:

ui.Container(    uid: "Program",
                        clocator: [tag: "div",
                                   class: "x-form-item"],
                        group: "true"){

            Span(            uid: "label",
                            clocator: [tag: "a",
                                       text: "Program"])

            Container(        uid: "triggerBox",
                            clocator: [tag: "div",
                                       class: "x-form-element"],
                            group: "true"){
                InputBox(        uid: "inputBox",
                                clocator: [tag: "input",
                                           type: "text",
                                           readonly: "true"],
                                respond: ["focus", "mouseOver", "mouseOut",
"blur"])
                Image(            uid: "trigger",
                                clocator: [tag: "img",
                                           src:
"/ext/resources/images/default/s.gif"],
                                respond: ["focus", "mouseOver", "mouseOut",
"blur"])
           }
}

ui.Container(    uid: "Programs",
                        clocator: [tag: "div",
                                   class: "x-layer x-combo-list"],
                        group: "true"){
            Div(            uid: "header",
                            clocator: [tag: "div",
                                       class: "x-combo-list-hd"],
                                       text: "Programs")
            List(            uid: "list",
                            clocator: [tag: "div",
                                       class: "x-combo-list-inner"],
                            respond: ["click"]){
                Div(            uid: "all",
                                clocator: [:],
                                respond: ["click"])
            }
}

Method:

private void selectProgram(String program) {
        click "Program.triggerBox.trigger"
        pause waitTime
        click "Programs.list[1]"
        pause waitTime
}

This is an Ext.form.FormPanel extention and the comboBox is created like
this:

{
                            xtype: 'combo',
                            name: 'program',
                            fieldLabel: 'Program',
                            title: 'Programs',
                            lazyInit: false,
                            helpTip: 'program',
                            hiddenName: 'programId',
                            displayField: 'description',
                            valueField: 'id',
                            store: programStore,
                            editable: false,
                            triggerAction: 'all',
                            listeners: {
                                'select':
controller.onSelectProgram.createDelegate(controller)
                            },
                            anchor: '98%'
}

All of the associated Images and TextFields are on the page are behaving the
same way.

Thanks in advance,

Gabe

On Mon, Aug 10, 2009 at 11:25 PM, Jian Fang <[email protected]>wrote:

> Seems this is the second case that reported the same error:
> "element.dispatchEvent is not a function". I hope this is not
> caused by the conflict between jQuery and other Javascript library such as
> prototype or ExtJS.
>
> Could you do us a favor to debug the custom selenium core code we added in?
> Here is a hint on how to debug it,
>
>
> http://code.google.com/p/aost/wiki/UserGuide?tm=6#How_to_Debug_Selenium_Core
>
> Here is a thread discussing the similar problem,
>
>
> http://groups.google.com/group/tellurium-users/browse_thread/thread/cf2091a69132bd2b
>
> Please let us know what you find.
>
> Thanks,
>
> Jian
>
>
> On Mon, Aug 10, 2009 at 6:06 PM, Gabriel Johnson 
> <[email protected]>wrote:
>
>> Hi Jian,
>>
>> Thanks for the quick response and the respond attribute tip. I wanted to
>> use partial matching, but get an exception after calling useJQuerySelector:
>>
>>
>> -------------------------------------------------------------------------------
>> Test set: gov.usgswim.biodata.test.ProjectPageTestCase
>>
>> -------------------------------------------------------------------------------
>> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 16.436 sec
>> <<< FAILURE!
>> createProjectFillingOnlyRequiredFields(gov.usgswim.biodata.test.ProjectPageTestCase)
>> Time elapsed: 4.515 sec  <<< ERROR!
>> com.thoughtworks.selenium.SeleniumException: ERROR: Command execution
>> failure. Please search the forum at http://clearspace.openqa.org for
>> error details from the log window.  The error message is:
>> element.dispatchEvent is not a function
>>     at
>> com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97)
>>     at
>> com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:91)
>>     at
>> com.thoughtworks.selenium.DefaultSelenium.mouseOver(DefaultSelenium.java:243)
>>     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 groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1061)
>>     at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892)
>>     at
>> groovy.lang.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:142)
>>     at groovy.lang.MetaObjectProtocol$invokeMethod.call(Unknown Source)
>>     at
>> org.tellurium.dispatch.Dispatcher.invokeMethod(Dispatcher.groovy:26)
>>     at
>> org.codehaus.groovy.runtime.callsite.PogoInterceptableSite.call(PogoInterceptableSite.java:46)
>>     at
>> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
>>     at
>> org.tellurium.event.EventHandler.processingEvent(EventHandler.groovy: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.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:361)
>>     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.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
>>     at
>> org.tellurium.event.EventHandler$_processEvents_closure1.doCall(EventHandler.groovy:73)
>>     at sun.reflect.GeneratedMethodAccessor39.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: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:292)
>>     at
>> org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1165)
>>     at
>> org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1141)
>>     at org.codehaus.groovy.runtime.dgm$87.invoke(Unknown Source)
>>     at
>> org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:270)
>>     at
>> org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
>>     at
>> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
>>     at
>> org.tellurium.event.EventHandler.processEvents(EventHandler.groovy:69)
>>     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.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:266)
>>     at
>> org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:51)
>>     at
>> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:162)
>>     at org.tellurium.event.EventHandler.click(EventHandler.groovy:146)
>>     at org.tellurium.event.EventHandler$click.call(Unknown Source)
>>     at
>> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:43)
>>     at org.tellurium.event.EventHandler$click.call(Unknown Source)
>>     at
>> org.tellurium.dsl.BaseDslContext$_click_closure3.doCall(BaseDslContext.groovy:221)
>>     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.call(PogoMetaClassSite.java:39)
>>     at
>> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
>>     at org.tellurium.object.Button.click(Button.groovy:15)
>>     at org.tellurium.object.Button$click.call(Unknown Source)
>>     at
>> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:43)
>>     at org.tellurium.object.UrlLink$click.call(Unknown Source)
>>     at
>> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callSafe(AbstractCallSite.java:89)
>>     at org.tellurium.dsl.BaseDslContext.click(BaseDslContext.groovy:219)
>>     at org.tellurium.dsl.BaseDslContext$click.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:150)
>>     at
>> gov.usgswim.biodata.module.ProjectPage.createNewProject(ProjectPage.groovy:27)
>>     at
>> gov.usgswim.biodata.test.ProjectPageTestCase.createProjectFillingOnlyRequiredFields(ProjectPageTestCase.java:59)
>>     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.TestMethod.invoke(TestMethod.java:59)
>>     at
>> org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
>>     at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
>>     at
>> org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
>>     at
>> org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
>>     at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
>>     at
>> org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
>>     at
>> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
>>     at
>> org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
>>     at
>> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
>>     at
>> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
>>     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)
>>
>>
>> Here's the method that threw the exception:
>>
>> public void createNewProject() {
>>         click "SelectAProjectButtons.new"
>>         pause waitTime
>>  }
>>
>> And here's the module definition:
>>
>> ui.Container(    uid: "SelectAProjectButtons",
>>                 clocator: [tag: "table"],
>>                 group: "true"){
>>             Button(    uid: "setAsContext",
>>                     clocator: [tag: "button",
>>                                text: "Work on Project",
>>                                type: "button",
>>                                class: "x-btn-text"])
>>             Button(    uid: "new",
>>                     clocator: [tag: "button",
>>                                text: "Create New Project",
>>                                type: "button",
>>                                class: "x-btn-text"])
>>             Button(    uid: "view",
>>                     clocator: [tag: "button",
>>                                text: "View Project Profile",
>>                                type: "button",
>>                                class: "x-btn-text"])
>>             Button(    uid: "edit",
>>                     clocator: [tag: "button",
>>                                text: "Edit Project Profile",
>>                                type: "button",
>>                                class: "x-btn-text"])
>> }
>>
>> I didn't have this problem without using JQuery selector.
>>
>>
>>
>> On Mon, Aug 10, 2009 at 4:28 PM, Jian Fang <[email protected]>wrote:
>>
>>> Hi Gabe,*
>>>
>>> *To make the div clickable, simply add the respond attribute, such as  *
>>>
>>> * respond:["click"]
>>>
>>> to the div UI object. If the class is changing, is there any pattern
>>> there? For example, could you use a partial matching?
>>>
>>> You can try to use group for both the div and the table inside it. Once
>>> the table is located, you should
>>> be able to locate the div. Right now, the group locating is not so
>>> sophisticated and that is also the reason
>>> we want to move the group locating to the Engine side so that we can use
>>> pattern matching algorithm
>>> to exploit more information in the DOM tree.
>>> *
>>> *Nicolae Vintila discussed with me some time ago about adding support
>>> Ext2JS, but I don't think he
>>> started it because we want to refactor the Widget architecture in 0.7.0.
>>> As always, time is our enemy,
>>> I am overflowed with a lot of other tasks. You are welcome to add support
>>> for Ext2JS and we can discuss
>>> more details as you move forward.
>>>
>>> Thanks,
>>>
>>> Jian
>>>
>>>
>>> On Mon, Aug 10, 2009 at 4:47 PM, Gabriel Johnson <[email protected]
>>> > wrote:
>>>
>>>> Hi,
>>>>
>>>> I have the following html generated by Ext:
>>>>
>>>> <div id="ext-gen574" class="x-grid3-body"> <div class="x-grid3-row
>>>> x-grid3-row-first" style="width: 566px;"> //this is the one i
>>>> want                                      <--
>>>> <table class="x-grid3-row-table" cellspacing="0" cellpadding="0" border
>>>> ="0" style="width: 566px;">
>>>> <tbody>
>>>> <tr>
>>>> <td class="x-grid3-col x-grid3-cell x-grid3-td-0 x-grid3-cell-first"
>>>> tabindex="0" style="width: 352px;">
>>>> <div class="x-grid3-cell-inner x-grid3-col-0" unselectable="on">Alabama
>>>> Water Science Center</div>
>>>> </td>
>>>> <td class="x-grid3-col x-grid3-cell x-grid3-td-1" tabindex="0" 
>>>> style="width:
>>>> 92px;">
>>>> <div class="x-grid3-cell-inner x-grid3-col-1" unselectable="on">
>>>> Montgomery</div>
>>>> </td>
>>>> <td class="x-grid3-col x-grid3-cell x-grid3-td-2 x-grid3-cell-last"
>>>> tabindex="0" style="width: 116px;">
>>>> <div class="x-grid3-cell-inner x-grid3-col-2" unselectable="on">Alabama
>>>> </div>
>>>> </td>
>>>> </tr>
>>>> </tbody>
>>>> </table>
>>>> </div>
>>>> <div class="x-grid3-row x-grid3-row-alt" style="width: 566px;">
>>>> <table class="x-grid3-row-table" cellspacing="0" cellpadding="0" border
>>>> ="0" style="width: 566px;">
>>>> <tbody>
>>>> <tr>
>>>> <td class="x-grid3-col x-grid3-cell x-grid3-td-0 x-grid3-cell-first"
>>>> tabindex="0" style="width: 352px;">
>>>> <div class="x-grid3-cell-inner x-grid3-col-0" unselectable="on">Alaska
>>>> Science Center</div>
>>>> </td>
>>>> <td class="x-grid3-col x-grid3-cell x-grid3-td-1" tabindex="0" 
>>>> style="width:
>>>> 92px;">
>>>> <div class="x-grid3-cell-inner x-grid3-col-1" unselectable="on">
>>>> Anchorage</div>
>>>> </td>
>>>> <td class="x-grid3-col x-grid3-cell x-grid3-td-2 x-grid3-cell-last"
>>>> tabindex="0" style="width: 116px;">
>>>> <div class="x-grid3-cell-inner x-grid3-col-2" unselectable="on">Alaska
>>>> </div>
>>>> </td>
>>>> </tr>
>>>> </tbody>
>>>> </table>
>>>> </div>
>>>> </div>
>>>>
>>>> I'm trying to select the div w/ class: "x-grid3-row x-grid3-row-first"
>>>> but must use values in the child nodes to locate it. There doesn't seem to
>>>> be a module that uses grouping and is also clickable. Another issue is that
>>>> the div element I want to use has dynamically a changing class attribute.
>>>>
>>>> I'd greatly appreciated any assistance,
>>>>
>>>> Gabe
>>>>
>>>> p.s. - Is anyone currently working on the Ext JS extention? We're using
>>>> a lot of Ext on this project and I may be able to contribute some widgets
>>>> but didn't want to start writing them b/f finding out if someone is already
>>>> on it.
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
>
> >
>

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