Skip to main content



      Home
Home » Archived » Jubula » Replace text in a numberfield
Replace text in a numberfield [message #1771449] Fri, 25 August 2017 03:19 Go to next message
Eclipse UserFriend
Dear jubula fellows,

by creating a testcase for a swing application, i need to replace the text of a numbertextfield. i tired using 'replacetext' which only uses text[String] as parameter and put an integer as value.
During the testexecution i get following error in this teststep:

Action Error
Execution Error: "Please use getValue() instead of getText()!"


How can i handle with numberfieldtext components?


thanks in advance for your efforts
Alex

Re: Replace text in a numberfield [message #1771650 is a reply to message #1771449] Tue, 29 August 2017 03:15 Go to previous message
Eclipse UserFriend
Hello Alexander,

It seems the problem behind is that the developer of the number textfield is throwing an exception if the getText method is called. But we are relying on this e.g. for selecting the whole content and checking the text. It seems that your options are that either the developers are not that strict for the "getText" method and allow it to be used, or you must write your own adapter(in complete you need an own plugin for this) which is overwriting the methods "selectAll" and "getText" from the "JTextComponentAdapter".[1][2]

best regards
Marvin


[1] https://help.eclipse.org/oxygen/topic/org.eclipse.jubula.client.ua.help/content/html/developerManual/toolkitExtension/ch03.html
[2] https://help.eclipse.org/oxygen/topic/org.eclipse.jubula.client.ua.help/content/html/developerManual/toolkitExtension/ch03s03.html
Previous Topic:Fails to recognise AUT is running. (win)
Next Topic:login splashScreen isn't detected when launching E4 application AUT
Goto Forum:
  


Current Time: Sun Jun 15 21:06:29 EDT 2025

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

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

Back to the top