Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » How to set object recognition profile by jubula's java swing api?
How to set object recognition profile by jubula's java swing api? [message #1809862] Thu, 25 July 2019 02:50 Go to next message
Li Huan is currently offline Li HuanFriend
Messages: 7
Registered: April 2019
Junior Member
Hello,
I found pretty odd that my UI automation cases run very unsteadily in both Jubula's ITE and java API. For example, today it runs fine, but tomorrow it reminds me component not found ,although I wait enough time before any operation in my cases ,and no changes have been made in my application under test. I think maybe it's the object recognition config is inaccurate enough.
All of my application's components has a unique JLable. How to configure the object recognition profile correctly?And most importantly,how to configure it in Jubula's java swing API?
Re: How to set object recognition profile by jubula's java swing api? [message #1810050 is a reply to message #1809862] Tue, 30 July 2019 06:38 Go to previous messageGo to next message
Marvin Mueller is currently offline Marvin MuellerFriend
Messages: 194
Registered: March 2012
Senior Member
Are you using [1] Naming (or giving component id's) for all of your components? This might help that these components are found reliably. Keep in mind that they are really unique. If you have done this you must create new object mappings for those components.

If you want to change the object recognition there are two ways:
import org.eclipse.jubula.client.StandardProfiles;
...
    AUT aut = agent.getAUT(startAUT, SwingComponents.getToolkitInformation());
    aut.setProfile(StandardProfiles.GIVEN_NAMES)
    aut.connect();

or:
import org.eclipse.jubula.client.MakeR;
...		
    aut.setProfile(MakeR.getProfileFactory().createProfile("myOwnProfile", 70, 30, 0, 90));
    aut.connect();


best regards
Marvin Mueller

[1] https://help.eclipse.org/2019-06/topic/org.eclipse.jubula.client.ua.help/content/html/userManual/toolkit/ch04s02s03.html#naming-components
Re: How to set object recognition profile by jubula's java swing api? [message #1810161 is a reply to message #1810050] Fri, 02 August 2019 02:51 Go to previous messageGo to next message
Li Huan is currently offline Li HuanFriend
Messages: 7
Registered: April 2019
Junior Member
Thanks! But, our components under test don't have the name property, and id is pure number and not unique. There are some pages have several components use the same id. In this case, how to locate the component by text?

How does the jubula recognize the components?what's the difference of hierarchy and context?How to set the recognition profile properly?
Re: How to set object recognition profile by jubula's java swing api? [message #1810551 is a reply to message #1810161] Tue, 13 August 2019 11:54 Go to previous message
Marvin Mueller is currently offline Marvin MuellerFriend
Messages: 194
Registered: March 2012
Senior Member
This is a very problematic thing, either the components should get naming if there are to many which are the similar or it might every time get some hiccups.
Defining the profile in an other way, might work, but e.g. for form most of the time it is not reliably. You should ask the developer to set uniqe (but not random) Names for the components.
You can try to set it only to use hierarchy and context, but i doubt that it is reliably.
The Hierarchy is the complete Path up to the root Component. The Context can be more seen like the Neighbours of this component(also the component which have the same parent component).

best regards
Marvin Mueller
Previous Topic:Jubula ITE Won't Launch
Next Topic:How to setup Junit and Jacoco for remote AUT?
Goto Forum:
  


Current Time: Tue Dec 10 08:48:01 GMT 2019

Powered by FUDForum. Page generated in 0.01539 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top