Skip to main content



      Home
Home » Archived » Jubula » How to best handle button that has different locations depending on OS(Object mapping problem)
How to best handle button that has different locations depending on OS [message #723914] Fri, 09 September 2011 17:00 Go to next message
Eclipse UserFriend
Hello, I'm new to Jubula and I have run into my first problem. I'm hoping someone here may help me find the best solution possible.

I've recorded a test case that basically creates and launches a debug configuration (In Eclipse->Run/Debug Configurations...).

The problem I'm having is that the "Debug" button appears in different locations depending on the OS (Windows 7 and Ubuntu 11.04).
In Windows, the button appears to the left of the "Close" button and in Ubuntu it appears to the right.
When I execute the test case in Windows it works fine but under Ubuntu the "Close" button is clicked instead of "Debug".

To work around the problem, I created a test case that first checks the button's text and then clicks it and added an event handler that breaks execution if the check fails and clicks on the other button. The solution works but is not very practical as the text check will always fails (red mark in test result) under Ubuntu.

Is there a better way?

Thanks
Victor.

Re: How to best handle button that has different locations depending on OS [message #724321 is a reply to message #723914] Mon, 12 September 2011 01:33 Go to previous messageGo to next message
Eclipse UserFriend
Hi Victor,

You could take a look at this part of the documentation:
http://help.eclipse.org/indigo/topic/org.eclipse.jubula.client.ua.help/html/manual/node269.html

If the built-in method isn't working for you, then you could name the components in the affected dialog(s):
http://help.eclipse.org/indigo/topic/org.eclipse.jubula.client.ua.help/html/manual/node268.html

Hope that helps!
Alex
Re: How to best handle button that has different locations depending on OS [message #724701 is a reply to message #724321] Mon, 12 September 2011 17:59 Go to previous messageGo to next message
Eclipse UserFriend
Thank you Alex for your quick response.

I looked at "4.2.5 Component name generation in RCP" and I do have that option checked for my AUT but it is not helping in this case.

I also talked to our programmer and he tells me that those buttons are in Eclipse code and he was not sure whether we could setData(String key, String ComponentName) on those components.

For this particular case I have found a descent workaround. I can use Application->Key Combination->alt-d instead of clicking the button and which works under both Windows and Ubuntu.

I'm now looking into the possibility of extending Jubula and create a test step that can click on a component that matches the specified text. I glanced at the Extension API documentation and examples but I'm not really sure whether that is even possible yet.

Re: How to best handle button that has different locations depending on OS [message #724773 is a reply to message #724701] Tue, 13 September 2011 02:42 Go to previous messageGo to next message
Eclipse UserFriend
Victor Martin wrote on Mon, 12 September 2011 23:59

I'm now looking into the possibility of extending Jubula and create a test step that can click on a component that matches the specified text. I glanced at the Extension API documentation and examples but I'm not really sure whether that is even possible yet.


The extension mechanism currently allows only the addition of new components or of actions to existing components. The matching algorithm can't be changed or extended.

The only way to do this would be a new action on Application which would traverse the component tree and then perform the desired action. This would be a time consuming operation (which is one of the reasons it's not in Jubula right now).

Achim
Re: How to best handle button that has different locations depending on OS [message #724944 is a reply to message #724773] Tue, 13 September 2011 10:56 Go to previous message
Eclipse UserFriend
Thanks Achim, that is what I thought and I understand it will be slow but in some cases it may be useful. It would be better if instead of doing this at the Application level we could do it from the Shell (dialog) level. Maybe a step to "click on active shell button with text"

Thanks for you input
Victor.
Previous Topic:Copying variables to other variables
Next Topic:Configuration exception
Goto Forum:
  


Current Time: Sun Nov 09 18:36:19 EST 2025

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

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

Back to the top