Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Jubula » Formatting values read into a variable
Formatting values read into a variable [message #1809200] Thu, 11 July 2019 10:49 Go to next message
Milos Matovic is currently offline Milos MatovicFriend
Messages: 4
Registered: July 2019
Junior Member
Hi Jubula team,

First of all, great work on Jubula, I'm loving it and it is the only tool that I have found that can work with Swing applications with ease!

I have a problem where I need to check if the values read from a table are within correct range, but the table I'm reading them from also contains letters, i.e. "24.3 V".

Is there a way to strip the Non-numbers from the value read before comparing it? Something like: ${VAL_READ}.replaceAll("[^0-9.-]", "")

For the comparison I tried using ub_app_checkNumericValues but this obviously wont work because of the letters in the string.

Best regards, Milos
Re: Formatting values read into a variable [message #1809363 is a reply to message #1809200] Sun, 14 July 2019 21:21 Go to previous messageGo to next message
Milos Hroudny is currently offline Milos HroudnyFriend
Messages: 24
Registered: June 2017
Junior Member
Hi Milos,
I am not Jubula team member but anyway, hopefully I can help you.
If I understand correctly, you test Swing application.
You can simply write external function - look at my
how to from August 2nd 2018.
Best Regards
Milos H.
Re: Formatting values read into a variable [message #1809378 is a reply to message #1809363] Mon, 15 July 2019 08:45 Go to previous messageGo to next message
Milos Matovic is currently offline Milos MatovicFriend
Messages: 4
Registered: July 2019
Junior Member
Hi Milos, I have found your How-to's shortly after posting this and have managed to get it working.
Thank you very much for that!

Would be a good idea to add those to the documentation as well.
Re: Formatting values read into a variable [message #1809423 is a reply to message #1809200] Tue, 16 July 2019 05:11 Go to previous message
Marvin Mueller is currently offline Marvin MuellerFriend
Messages: 255
Registered: March 2012
Senior Member
Hello, we have also a set of predefined functions which also might help in these situations. See our Documentation[1]


[1] https://help.eclipse.org/2019-06/topic/org.eclipse.jubula.client.ua.help/content/html/userManual/tasks/ch03s14s06.html#pre-defined-functions
Previous Topic:Setting heuristic match value
Next Topic:Cannot start AutAgent on MAC
Goto Forum:
  


Current Time: Tue Oct 15 06:35:14 GMT 2024

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

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

Back to the top