Highlighted
Contributor.
Contributor.
894 views

can we launch multiple java window applications in leanft

I launched first java window application and was able to login in

then i tried to launch same java window application second time, so it is launching but not login in and its pointing to first java window

can someone help on this??

Thanks in advance 🙂

0 Likes
3 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: can we launch multiple java window applications in leanft

Hi,

Could you please share your code?

Is it possible that you are using the same description for the second Java window? once you have 2 Java Windows open with the same properties you probably need to use index to deferentiate them.

Regards,

Anton

0 Likes
Highlighted
Contributor.
Contributor.

Re: can we launch multiple java window applications in leanft

yes i think index is deferentiating them, but can we set this index property in LeanFT in code and then again get it to switch between clients?

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: can we launch multiple java window applications in leanft

I'm not sure what you mean by "switch between clients" it would be simpler to discuss a concrete code example.

I'm assuming you are using Java SDK.

lets say that you describe 2 Java window objects using the java WindowDescription with index value of 0 and 1.

All test object you describe from window 1 will belong to first window and all test objects you describe from window 2 will belong to the second window.

small code example:

//describing 2 top level Java window objects differentiated by index 
Window javaWin1 = Desktop.describe(Window.class, new WindowDescription.Builder().title("SwingSet").index(0).build());
Window javaWin2 = Desktop.describe(Window.class, new WindowDescription.Builder().title("SwingSet").index(1).build());

//creating test objects belonging to first window instance
InternalFrame frame1 = javaWin1.describe(InternalFrame.class, new InternalFrameDescription.Builder().title("Internal Frame Generator").build());
CheckBox javaCheck1 = frame1.describe(CheckBox.class, new CheckBoxDescription.Builder().attachedText("Resizable").build());

//creating test objects belonging to second window instance
InternalFrame frame2 = javaWin2.describe(InternalFrame.class, new InternalFrameDescription.Builder().title("Internal Frame Generator").build());
CheckBox javaCheck2 = frame2.describe(CheckBox.class, new CheckBoxDescription.Builder().attachedText("Resizable").build());

Let me know if that answers your question.

 

Regards,

Anton

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.