Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » How to get a particular text from a Swing application using Jubula's Java API(Java Getter to get a text value from a Swing Application using Jubula)
How to get a particular text from a Swing application using Jubula's Java API [message #1809252] Fri, 12 July 2019 12:00 Go to next message
rupayan nath is currently offline rupayan nathFriend
Messages: 8
Registered: July 2019
Junior Member
I am using Jubula 8.7.1 and Java 8. I have used the Java API to automate a few actions in a Swing application.

I have some text that I want to catch in a may be a String object from the app. Is there any way I can do that. I have used 'TextComponent' to identify the region in the app. But 'TextComponent' does not have any getter method that return a String.

  • Attachment: Capture.PNG
    (Size: 3.39KB, Downloaded 88 times)
Re: How to get a particular text from a Swing application using Jubula's Java API [message #1809433 is a reply to message #1809252] Tue, 16 July 2019 07:12 Go to previous messageGo to next message
Marvin Mueller is currently offline Marvin MuellerFriend
Messages: 192
Registered: March 2012
Senior Member
There are two possibilities:
The first one is to use readValue:
Result readValue = text.readValue();
String text = readValue.getReturnValue();

The second one is to find the correct property name an us getPropertyValue:
Result propertyValue = text.getPropertyValue("text");
String text = propertyValue.getReturnValue();

best regards
Marvin Mueller
Re: How to get a particular text from a Swing application using Jubula's Java API [message #1810282 is a reply to message #1809433] Tue, 06 August 2019 13:19 Go to previous message
rupayan nath is currently offline rupayan nathFriend
Messages: 8
Registered: July 2019
Junior Member
Thank you Marvin! This helps
Previous Topic:OpenJDK 11 support
Next Topic:Migrate Jubula from 8.4.0 to 8.7.1
Goto Forum:
  


Current Time: Fri Nov 22 03:26:26 GMT 2019

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

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

Back to the top