Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Jubula » Toolbar button in Properties view not found during test(but Object Mapping mode confirms its identity)
Toolbar button in Properties view not found during test [message #1302431] Fri, 18 April 2014 18:41 Go to next message
David Hickernell is currently offline David HickernellFriend
Messages: 85
Registered: October 2012
Member
My test involves a button in the toolbar of the Properties View that I create and show dynamically. I have mapped it with no problem in Object Mapping mode, and its technical name always shows up as the ID of the action (a subclass of org.eclipse.jface.action.Action) that it launches. But every time I try to activate this button in my test, or wait for it to become visible, I get a Component Not Found error. The screenshot in the test report clearly shows that the button is indeed there.

Does Jubula have any known issues with recognizing toolbar items that use Jface actions, or dynamically-created toolbar items, or toolbar items under any other conditions that might be in play here?
Re: Toolbar button in Properties view not found during test [message #1321230 is a reply to message #1302431] Tue, 29 April 2014 06:53 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi David,

I have a suspicion that if you remap the button when a test has failed that there will be a difference in the technical name (i.e. it will be collected as a new name). Can you see whether that's the case and have a look what the difference is in the technical name itself (via the properties view)? You could post the images for comparison as well.

Have you tried giving the component a name via setData?

Best regards,
Alex
Re: Toolbar button in Properties view not found during test [message #1322068 is a reply to message #1321230] Tue, 29 April 2014 17:17 Go to previous messageGo to next message
David Hickernell is currently offline David HickernellFriend
Messages: 85
Registered: October 2012
Member
The test case does not fail when I run it locally; it is only on our automated test server (running the same OS) that the error occurs, which does not really give me the opportunity to re-map anything afterwards.

I had not tried setData(), but I will try adding that to the code and seeing how the next build goes.
Re: Toolbar button in Properties view not found during test [message #1323193 is a reply to message #1322068] Wed, 30 April 2014 06:18 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
I see - thanks for the clarification. Remember you'll need to remap the component after it's received a name Wink

Keep us posted.
Re: Toolbar button in Properties view not found during test [message #1324499 is a reply to message #1323193] Wed, 30 April 2014 20:30 Go to previous messageGo to next message
David Hickernell is currently offline David HickernellFriend
Messages: 85
Registered: October 2012
Member
The name I gave each button with setData() was its action ID (the easiest distinguishing string I could reach at that point in the code), so when I went back to re-map it, the technical name was the same. I hoped that setting the name explicitly in the code would allow Jubula to find the buttons more consistently, but there was no change in behavior.
Re: Toolbar button in Properties view not found during test [message #1326260 is a reply to message #1324499] Thu, 01 May 2014 16:55 Go to previous messageGo to next message
David Hickernell is currently offline David HickernellFriend
Messages: 85
Registered: October 2012
Member
It seems that I am having the exact same problem Niels K was having in this thread:
http://www.eclipse.org/forums/index.php/m/710776/
It does not look like a solution was ever found.

EDIT: From the console output of the job on the test server, it seems to be getting:
AUT:org.eclipse.jubula.rc.common.exception.ComponentNotManagedException: unmanaged component with identifier: 'org.eclipse.jubula.tools.objects.ComponentIdentifier@51e3e961[component type=org.eclipse.swt.widgets.ToolItem,alternative name=<null>,hierarchy=[org.eclipse.swt.widgets.Shell_1, org.eclipse.swt.widgets.Composite_1, org.eclipse.swt.widgets.Composite_1, org.eclipse.ui.views.PropertySheet.toolbar, <my action id>]]'.
AUT:	at org.eclipse.jubula.rc.swt.components.SwtAUTHierarchy.findComponent(SwtAUTHierarchy.java:344) ~[org.eclipse.jubula.rc.swt.jar:na]
...


I am not sure why it shows an alternative name of <null>, but of note is the fact that the test suite is using the "Show View/Properties" menu command before selecting the object and trying to click the buttons, which seems to have contributed to Niels K's problem. Curiously, when I use the same command locally before doing the same thing, there is no problem.

[Updated on: Thu, 01 May 2014 17:06]

Report message to a moderator

Re: Toolbar button in Properties view not found during test [message #1326312 is a reply to message #1326260] Thu, 01 May 2014 17:30 Go to previous messageGo to next message
David Hickernell is currently offline David HickernellFriend
Messages: 85
Registered: October 2012
Member
I notice that when I look at the individual buttons in the Object Mapping, they show up with the expected technical names, but in the "Context" section of their properties, it still labels the sibling buttons as "org.eclipse.swt.widgets.ToolItem_1" and "org.eclipse.swt.widgets.ToolItem_2", rather than with their own technical names. Might this have something to do with what is going wrong?
Re: Toolbar button in Properties view not found during test [message #1341424 is a reply to message #1326312] Thu, 08 May 2014 13:29 Go to previous message
Marvin Mueller is currently offline Marvin MuellerFriend
Messages: 255
Registered: March 2012
Senior Member
Hello,
the alternative name = null is okay, this is for components which have e.g. text in it like labels. It is then set with the text or an part of the text as description. That the context is not named is also normal, we are not using names in the context.

Since the object mapping seems to have your given name <my action id> in it, either the component is really not named on the remote machine, or something is different in the hierarchy of the component. Please could you verify that your changes with the setData is also on the remote machine?
If this is the case than we could try to change values in the Configuration View in the Object Mapping editor. Maybe it helps to raise the name weight in the Configuration View or lower the Threshold a little bit.

Best regards,
Marvin
Previous Topic:Meaning of "-DGD_ignore_timeout=true"? AUT changes behavior
Next Topic:An error ocurred: Could not connect to AUT: AppName
Goto Forum:
  


Current Time: Fri Apr 26 15:14:43 GMT 2024

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

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

Back to the top