Automating Java apps in leanft in Java

Automating the Java applications is just like that of Standard windows applications. Only difference is that you need to import classes in below package. Here is the sample example that identifies the Java window with title – XYZ and then clicks on the check box with attached text as “Gender” inside a frame.

package leanft;

import com.hp.lft.sdk.CheckedState;
import com.hp.lft.sdk.Desktop;
import org.junit.Test;

public class JavaTest extends BaseTest  {

    public void test() throws Exception {

        Window javaWin = Desktop.describe(Window.class, new WindowDescription.Builder()

        CheckBox checkBox = javaWin.describe(InternalFrame.class, new InternalFrameDescription.Builder()
                .title("Frame1").build()).describe(CheckBox.class, new CheckBoxDescription.Builder()



Web development and Automation testing

solutions delivered!!