|convert integer to corresponding ascii value [message #1070209]
||Wed, 17 July 2013 12:59
| Susanne Krause
Registered: July 2013
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.
- 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.
Powered by FUDForum
. Page generated in 0.05166 seconds