Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
ewagner Respected Contributor.
Respected Contributor.
715 views

Java and GetVisibleText, GetTextLocation and ClickOnText

Hi,
This is my first use of UFT on a Java application but I cannot find any controls that I can use GetTextLocation, GetVisibleText or ClickOnText on.  Are those methods not availabe for Java objects? 
Thanks

0 Likes
4 Replies
Micro Focus Expert
Micro Focus Expert

Re: Java and GetVisibleText, GetTextLocation and ClickOnText

You can find in help the list of methods to use with Java Objects :  https://admhelp.microfocus.com/uft/en/14.02/UFT_Help/Subsystems/FunctionReference/Subsystems/OMRHelp/OMRHelp.htm#Java/JAVAPACKAGELib~JavaButton.html 

What situation are you trying to solve with getvisibletext/gettextlocation?

0 Likes
ewagner Respected Contributor.
Respected Contributor.

Re: Java and GetVisibleText, GetTextLocation and ClickOnText

It is a custom control, UFT identifies it as a javatree but it looks/behaves more like a list.  I've not had any luck being able to identify a particular 'row'/node to click on based on a value in the tree/table.  The getvisibletext and clickontext was kind of a last ditch effort, I would certainly prefer something more elegant.

0 Likes
BogdanT Respected Contributor.
Respected Contributor.

Re: Java and GetVisibleText, GetTextLocation and ClickOnText

Hello,

If it is custom control, I would recommend using Java Extensibility.

Please see a guide here: https://admhelp.microfocus.com/uft/en/14.02/Extensibility/Java_Ext/Default.htm

Using the extensibility, you will be able to provide all the required functionality to custom controls.

Thanks.

Bogdan

ewagner Respected Contributor.
Respected Contributor.

Re: Java and GetVisibleText, GetTextLocation and ClickOnText

Thanks Bogdan, I'll take a look!

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.