Skip to main content



      Home
Home » Archived » Jubula » Formatting values read into a variable
Formatting values read into a variable [message #1809200] Thu, 11 July 2019 06:49 Go to next message
Eclipse UserFriend
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 17:21 Go to previous messageGo to next message
Eclipse UserFriend
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 04:45 Go to previous messageGo to next message
Eclipse UserFriend
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 01:11 Go to previous message
Eclipse UserFriend
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: Sat Jul 19 18:24:26 EDT 2025

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

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

Back to the top