Iustina,

I see you point and it makes sense to add mouseOver and mouseOut to
the base object UiObject
so that each UI object has the two methods.

I will commit the changes soon.

Thanks,

Jian

On Jan 4, 1:48 pm, iv <[email protected]> wrote:
> Jian,
>
> the application I'm currently testing has a suite of menus, which are
> getting expanded on a *mouseOver* action. If I would trigger a
> *click*, for example, it will select the first menu item, collapse the
> menu and navigate as necessary. In my case, I really need a
> *mouseOver* to simulate the menu expansion...
>
> I believe you have built a similar mouseOver/MouseOut behaviour within
> SelectMenu and SimpleMenu UiObjects.
>
> What else would be appropriate for this situation?
>
> Thanks
> Iustina
>
> On Jan 3, 2:25 pm, [email protected] wrote:
>
> > Iustina,
>
> > The following call should not be made explicitly,
>
> > mouseOver "headerForm.faultHeader"
>
> > since Container object does no have the mouseOver method defined.
>
> > Actually, if you define the respond attribute, the Javascript events
> > such as
> > mouseOver will be called implicitly by Tellurium and you do not need
> > to call
> > it manually. That is to say, if you have an action such as "click" and
> > your
> > UI has the respond attribute with value "mouseOver", the eventhandler
> > in
> > Tellurium will automatically call "mouseOver" first before call the
> > "click"
> > method.
>
> > Take a look at the click method in the EventHandler class,
>
> > def click(String locator, String[] events) {
> >         String[] defaultEvents = null
> >         if(extraEvent)
> >            defaultEvents = ["focus", "mouseOver"]
>
> >         processEvents(locator, events, defaultEvents){
> >            dispatcher.click(locator)
> >         }
>
> > }
>
> > and the processEvents method is as follows,
>
> >     protected void processEvents(String locator, String[] events,
> > String[] defaultEvents, Closure action){
> >         checkElement(locator)
> >         if(dispatcher.isElementPresent(locator)){
> >             Event[] evns = alg.sort(events, defaultEvents)
> >             evns.each { Event event ->
> >                 if(event == Event.ACTION)
> >                   action()
> >                 else
> >                   processingEvent(locator, event)
> >             }
>
> >         }
> >     }
>
> >     protected void processingEvent(String locator, Event event){
> >         switch (event){
> >             case Event.BLUR:
> >                 dispatcher.fireEvent(locator, "blur")
> >                 break
> >             case Event.FOCUS:
> >                 dispatcher.fireEvent(locator, "focus")
> >                 break
> >             case Event.MOUSEOUT:
> >                 dispatcher.mouseOut(locator)
> >                 break
> >             case Event.MOUSEOVER:
> >                 dispatcher.mouseOver(locator)
> >                 break
> >             default:
> >                 println "Warning: Unknown Event ${event.toString()}"
> >         }
> >     }
>
> > Hope this can help you understand the respond attribute better.
>
> > Thanks,
>
> > Jian
>
> > On Jan 3, 12:01 pm, iv <[email protected]> wrote:
>
> > > Thanks for providing the fix for Widget: it works like a charm for
> > > Checkboxes and Images now :)
>
> > > But I am still having the same error as before, for *mouseOver* over a
> > > Container:
>
> > > groovy.lang.MissingMethodException: No signature of method:
> > > org.tellurium.object.UiObject.mouseOver() is applicable for argument
> > > types: (org.tellurium.widget.Widget$_mouseOver_closure1) values:
> > > {org.tellurium.widget.widget$_mouseover_closu...@d1a1ab}
> > >         at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown
> > > Source)
> > >         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
> > > (DelegatingConstructorAccessorImpl.java:27)
> > >         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
> > >         at org.codehaus.groovy.runtime.MetaClassHelper.doConstructorInvoke
> > > (MetaClassHelper.java:535)
> > >         at 
> > > groovy.lang.MetaClassImpl.doConstructorInvoke(MetaClassImpl.java:
> > > 2356)
> > >         at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:
> > > 1255)
> > >         at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:
> > > 1185)
> > >         at org.codehaus.groovy.runtime.InvokerHelper.invokeConstructorOf
> > > (InvokerHelper.java:809)
> > >         at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNewN
> > > (ScriptBytecodeAdapter.java:230)
> > >         at org.tellurium.object.UiObject.methodMissing(UiObject.groovy:95)
> > >         at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
> > >         at sun.reflect.DelegatingMethodAccessorImpl.invoke
> > > (DelegatingMethodAccessorImpl.java:25)
> > >         at org.codehaus.groovy.reflection.CachedMethod.invoke
> > > (CachedMethod.java:86)
> > >         at 
> > > groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:
> > > 707)
> > >         at 
> > > groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:
> > > 679)
> > >         at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:930)
> > >         at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)
> > >         at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod
> > > (InvokerHelper.java:778)
> > >         at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod
> > > (InvokerHelper.java:758)
> > >         at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN
> > > (ScriptBytecodeAdapter.java:170)
> > >         at 
> > > org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodNSafe
> > > (ScriptBytecodeAdapter.java:178)
> > >         at org.tellurium.widget.Widget.mouseOver(Widget.groovy:75)
>
> > > On Jan 2, 6:25 pm, [email protected] wrote:
>
> > > > Iustina,
>
> > > > I committed the fix and upload the new tellurium jar file to the user
> > > > group as tellurium-0.6.0.jar. I cannot upload it to project web site
> > > > because all artifacts there will be archived.
>
> > > > Or you check out the core project source from trunk and then run ant
> > > > task
>
> > > > ant dist
>
> > > > to generate the tellurium jar file, which will be under dist/.
>
> > > > Please let me know if you have any further questions.
>
> > > > Thanks,
>
> > > > Jian- Hide quoted text -
>
> > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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