Micro Focus Expert
Micro Focus Expert

Re: Screen Capture using LeanFT and stdWin app

If that is the full exception stack, it seems like the value of "window" variable is null.

Can you debug and check? where is the window variable gets assigned?

 

Regards,

Anton

0 Likes
Baurav Singh Regular Contributor.
Regular Contributor.

Re: Screen Capture using LeanFT and stdWin app

Hi,

 

@When("^User able to Enter \"(.*)\" for Oder Creation Page$")
public void user_able_to_Enter_into_Oder_Creation_Page(String sessionTcode) throws Throwable {
session.reset(sessionTcode);
Window window = session.describe(Window.class,
new WindowDescription.Builder().name("wnd[0]").program("SAPLMEGUI").screenNumber(14l)
.transaction("ME21N").type(com.hp.lft.sdk.sap.gui.ComponentType.MAIN_WINDOW).build());
// Boolean findwindow=window.exists();
System.out.println(window);

 

Optput getting as:::==com.hp.lft.sdk.internal.sap.gui.SapGuiWindow@29539e36

That mean window exists right?? and in same window i m performing action by declaring as global variable.

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Screen Capture using LeanFT and stdWin app

In the method you have provided the Window variable is defiend and therefore it is local to the method.

The Window vatiable you are accesing in the method in your previous post looks like like a class member.

So it seems like you are not setting the class member anywhere and therefore its value is null.

 

If that does not help you please provide the code of the entire class.

 

Regards,

Anton

Baurav Singh Regular Contributor.
Regular Contributor.

Re: Screen Capture using LeanFT and stdWin app

Hi Anton,

 Thanks A lot buddy, Now i am able to take ScreenShot For SAP window. Working Fine Issue Resolved. Silly mistake i was doing.

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.