Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » storeValue action not working
storeValue action not working [message #987843] Wed, 28 November 2012 11:14 Go to next message
Yashveer Rana is currently offline Yashveer RanaFriend
Messages: 15
Registered: November 2012
Junior Member
Trying to store a value from a Spinner widget (SWT) using the ub_ctx_storeValue action. On object mapping, jubula identifies it as 'Graphics Component' (org.eclipse.swt.widgets.Spinner)
However, on executing, the test fails with the error : Operation not supported by the selected toolkit'

I'm currently using the rcp toolkit. I tried changing it to 'swt' but the AUT fails to startup( eclipse.exe in this case)

Please advise
Re: storeValue action not working [message #988249 is a reply to message #987843] Thu, 29 November 2012 06:08 Go to previous messageGo to next message
Yashveer Rana is currently offline Yashveer RanaFriend
Messages: 15
Registered: November 2012
Junior Member
Just so you know, a spinner widget is a component having a numeric field along with two small buttons that can increase or decrease the numeric value in the field.

http://www.eclipse.org/swt/widgets/gallery-spinner.png
Re: storeValue action not working [message #988287 is a reply to message #988249] Thu, 29 November 2012 09:46 Go to previous messageGo to next message
Yashveer Rana is currently offline Yashveer RanaFriend
Messages: 15
Registered: November 2012
Junior Member
I know the reason now..

Its because the spinner widget has default datatype of Integer (int) while jubula action storeValue assumes String. Looks like jubula is unable to perform an implicit conversion.

Any way i can store integer values ?
Re: storeValue action not working [message #988978 is a reply to message #988287] Tue, 04 December 2012 07:08 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1163
Registered: July 2009
Senior Member
Hi,

This one is new to me - I would have thought that we take the text regardless of its type. That it ends up as a string is logical (to me at least Wink ). I'll check and get back to you.

Best regards,
Alex
Re: storeValue action not working [message #989085 is a reply to message #988978] Tue, 04 December 2012 15:08 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1163
Registered: July 2009
Senior Member
Hi,

I've spoken to a developer and it would appear that the spinner is supported only as a "graphics component" (i.e. you can click it, check its existence etc), but it is not currently possible to e.g. check its text, store a value - these are actions on "Component with Text".

However, it *should* be possible to work around this Wink If you use "Store Property" (on Graphics Component) and use the text property of the spinner, then you should get the right result...

HTH,
Alex
Re: storeValue action not working [message #989413 is a reply to message #989085] Thu, 06 December 2012 07:15 Go to previous messageGo to next message
Yashveer Rana is currently offline Yashveer RanaFriend
Messages: 15
Registered: November 2012
Junior Member
I'm not the developer here.. Sad
How do i retrieve the property name?

[Updated on: Thu, 06 December 2012 07:16]

Report message to a moderator

Re: storeValue action not working [message #989428 is a reply to message #989413] Thu, 06 December 2012 08:17 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1163
Registered: July 2009
Senior Member
The property should be called "text" (I should have put it in quotes in the last post).
Re: storeValue action not working [message #989449 is a reply to message #989428] Thu, 06 December 2012 09:34 Go to previous messageGo to next message
Yashveer Rana is currently offline Yashveer RanaFriend
Messages: 15
Registered: November 2012
Junior Member
Thank you for the prompt reply.. A final call for help -
storeProperty stores the text in a 'Variable' data type (eg VAR_1). Whenever i try to reference this variable, (for eg: in checkStringValues action) it displays error saying incompatible datatype
How do i copy this value to another String or integer parameter
Re: storeValue action not working [message #990148 is a reply to message #989449] Tue, 11 December 2012 07:25 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1163
Registered: July 2009
Senior Member
Hi,

It sounds like you need the action to check numeric values instead of string values.

HTH,
Alex
Re: storeValue action not working [message #1059372 is a reply to message #987843] Fri, 17 May 2013 17:18 Go to previous messageGo to next message
anthony schorr is currently offline anthony schorrFriend
Messages: 6
Registered: May 2013
Junior Member
I am also trying to access the value of a spinner field, but using a property value of 'text' gives me a Configuration Error. am I missing something? i tried in single quotes, double quotes, all caps, all lower, initial caps, but nothing works, always the same result.
thanks!
Re: storeValue action not working [message #1059427 is a reply to message #1059372] Sat, 18 May 2013 09:36 Go to previous messageGo to next message
Achim Loerke is currently offline Achim LoerkeFriend
Messages: 352
Registered: July 2009
Location: Braunschweig, Germany
Senior Member

Hi Anthony

are you by any chance working with Swing? The discussions was on using SWT. The Swing Spinner doesn't have a Text property, it uses Value instead (see http://docs.oracle.com/javase/7/docs/api/javax/swing/JSpinner.html).

- Achim
Re: storeValue action not working [message #1060014 is a reply to message #1059427] Wed, 22 May 2013 14:28 Go to previous messageGo to next message
anthony schorr is currently offline anthony schorrFriend
Messages: 6
Registered: May 2013
Junior Member
Achim-

thanks, but no, I am using swt. org.eclipse.swt.widgets.Spinner

just cannot get the value out of it. or change it. very frustrating, but thanks for your help, it was an excellent guess!

Re: storeValue action not working [message #1060100 is a reply to message #1060014] Thu, 23 May 2013 06:37 Go to previous message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1163
Registered: July 2009
Senior Member
Ah, then this could be something else. Can you click on the spinner widget? My gut feeling is that you'd get the same error there as well. If so, then see if adding the jar from this ticket helps. If not, please enter a new ticket.

Thanks!
Alex
Previous Topic:Coordinates on GEF Canvas
Next Topic:Help:testexec run in windows ocurred
Goto Forum:
  


Current Time: Mon Nov 24 01:41:54 GMT 2014

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

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