Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Jubula » Replace text in a numberfield
Replace text in a numberfield [message #1771449] Fri, 25 August 2017 07:19 Go to next message
Alexander Vogt is currently offline Alexander VogtFriend
Messages: 1
Registered: August 2017
Junior Member
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 07:15 Go to previous message
Marvin Mueller is currently offline Marvin MuellerFriend
Messages: 255
Registered: March 2012
Senior Member
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: Thu Apr 25 09:24:33 GMT 2024

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

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

Back to the top