Skip to main content



      Home
Home » Archived » Jubula » convert integer to corresponding ascii value(Need to convert integer value to corresponding Ascii character)
convert integer to corresponding ascii value [message #1070209] Wed, 17 July 2013 08:59 Go to next message
Eclipse UserFriend
Hi,

I am quite new to Jubula and setting up my first Jubula- Test-Project.

The target of the testing is a Java -Swing-Application.
One step to test is the proper functioning of a mnemonic: the label for a test field has a mnemonic (pressing this key leads to getting the focus to this field).

To find out the mnemonic, I am using the "Store Property" - Action Type. The PROPERTY NAME is "displayedMnemonic". I store the property to a variable called "myMnemonic". This works fine.

Unfortunately, the "displayedMenmonic" property in Java is an Integer value: Java converts it , when using, to the corresponding letter ((f.e. 69 => "E")).
Therefore, the "myMnemonic" variable contains now "69" instead of "E".

To test the functioning of the Mnemonic, I use the "Key Combination" - Action Type. This Action Type takes as Input the parameter "BASE KEY". I use in my tests the content of "myMnemonic" as "$myMnemonic".

Because Jubula the "hits the keys "69" instead of "E", the step fails.

My Question:
- Can the input for BASE_KEY somehow masked to tell Jubula to use the char according to the ascii table instead of the decimal "69" ?
- Among the (unfortunately only few) internal functions , called by ? (f.e. ?add(var1, var2)) I could not find any type conversion. If I would write a short function, how could I integrate it to Jubula, in order to get it called by ?myFunction ?
- Is there any other possibility in Jubula to convert integer to char ?

Thank you in advance for your help and support.
Best regards
Susanne
Re: convert integer to corresponding ascii value [message #1070604 is a reply to message #1070209] Thu, 18 July 2013 05:59 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

I think your second suggestion would be the way to go here. To define a new function, you will need to create an extension for the extension point org.eclipse.jubula.client.core.functions,
which can be found in the bundle org.eclipse.jubula.client.core.

This bundle also contains reference implementations of the extension point.

If you write something and would like to contribute it back to the project - open an enhancement! If you'd like the team to write it for you, contact us via the testing portal.

Hope that helps!
Alex
Re: convert integer to corresponding ascii value [message #1086744 is a reply to message #1070604] Wed, 14 August 2013 13:01 Go to previous message
Eclipse UserFriend
Hallo Alex.

Thank you a lot for your answer.
In the meantime I got time to try the example out (JSLider).

I installed the toolkit plugin and the fragment.
And tried it with the JSLider AUT.

Unfortunately, after starting of the AUT agent and the AUT I could not start the observation mode /mapping mode. (Both buttons stay "gray").
Unfortunately , I could not find any error message.

Where may I search for the error ?

Thank you a lot in advance for your help.
Best regards
Susanne
Previous Topic:Is it possible to escape parameters/variables included in a regex?
Next Topic:Object mapping: names of SWT Components
Goto Forum:
  


Current Time: Tue Jul 08 18:56:16 EDT 2025

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

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

Back to the top