Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Highlighted
Artsiom Dabrynin Frequent Contributor.
Frequent Contributor.
365 views

LeanFT does not see the changes made in my application classes.

All my application UI is based on Swing i.e the Desktop application so I use the Java SDK. I have a custom table on what UI components such as a dropdown, a text edit, and a date selector are programmatically rendered in its cells. To simplify the test scenarios I am adding methods, only for testing, to my custom component classes. 

My problem is that LeanFT Runtime Engine does not see recently added class methods though NativeObject. The most ridiculous is I have already dealt with this problem. Fortunately, by an unknown magic way, It resolved itself after a couple of days. But now, I have faced it again!

To check if my member exists, I get a list of all the members with the following code:

com.hp.lft.sdk.java.Table table = _provided_from_model_; 

table.getNativeObject().getMembers().forEach(System.out::println);

I suppose that LeadFT runtime engine is using some kind of caching, therefore, I am not able to see actual members of classes.

Do anyone have ideas to solve that magic?

 

Labels (2)
0 Likes
2 Replies
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Re: Issue with nativeObject.getMembers()

Hi Artsiom,

I have found the following example that you can try:

Link servicesLink = browser.describe(Link.class, new LinkDescription.Builder()
.tagName("A").innerText("Services ").build());
		
NativeObject nativeLink = servicesLink.getNativeObject();
		
List<String> LinkMembers = nativeLink.getMembers();

As we see, instead of trying to get all the members in one line, here basically we get the Native object first, and then we create a list with the members of it.

This information is more detailed in the article: https://admhelp.microfocus.com/leanft/en/14.03/HelpCenter/Content/HowTo/NativeObject.htm  

Let me know if this information is useful for you and if you think that solves your problem feel free to mark it as a solution.

Best Regards,

 

Michael Reyes.

0 Likes
Artsiom Dabrynin Frequent Contributor.
Frequent Contributor.

Re: Issue with nativeObject.getMembers()

It syntactically is as well as my code above so It did not help me. The solution might be simply to clear the cached classes. and the question is only where to find them.

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.