Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jubula-dev] Extending Jubula concrete toolkit

Hi all,

I'm struggling with a toolkit extension which involves an extension of the concrete toolkit.
I'm running Jubula 8.0.0 (standalone).

This is what I am trying to do:

I want to test an application that uses a sliding motion on various controls (not necessarily slider controls).
The application currently uses JavaFX, but we might have a different UI framework in the future.
To cater for this (independency of control type/toolkit), I would like to introduce the new action in the concrete
toolkit.

I already succeeded doing the following:
* Building the example extension (for JavaFX toolkit).
* As a test, extending javafx.scene.control.Label with a new action "slide".
  I successfully triggered the action on a label during a test run.

Now, to make the new action available for all controls, I...
* ...declared an abstract component that extends guidancer.abstract.Widget, and a corresponding
  concrete component that realizes the new abstract component. The abstract component declares
  the new action. With this, the new "Slide" action is available for a "Graphics Component".

I am now struggling with where to implement the new action for the JavaFX toolkit.
My first approach goes like that:

        <abstractComponent type="foo.bar.abstract.Widget">
                <extends>guidancer.abstract.Widget</extends>
                <action name="CompSystem.Slide">
                        <method>rcSlide</method>
                        <!-- Params here -->
                </action>
        </abstractComponent>
        <concreteComponent type="foo.bar.concrete.Widget">
                <realizes>foo.bar.abstract.Widget</realizes>
        </concreteComponent>
        <toolkitComponent type="javafx.scene.control.LabelEx" visible="true">
                <realizes>foo.bar.concrete.Widget</realizes>
                <extends>javafx.scene.control.Label</extends>
                <testerClass>org.eclipse.jubula.rc.javafx.tester.LabelExTester</testerClass>
        </toolkitComponent>

The LabelExTester class (only) contains an rcSlide() method.

With this, I can successfully slide a control which is a javafx.scene.control.Label. But checking the text of the very same
control fails with "Operation not supported by the selected toolkit." It appears that my approach breaks the implementation
of the guidancer.abstract.Widget actions for javafx.scene.control.Label.

My questions are:
* Is it a good idea trying to extend the generic toolkit via a toolkit extension? Will this work at all?
  Does it make more sense to make the changes in the core?
* What is the problem with my approach? Why is "Check text" not available anymore?
* Is there a documentation of the elements in the ComponentConfiguration.xml file?

Any information is greatly appreciated!


Back to the top