LeanFT Java Tutorial Part 3 – Object Identification Center

LeanFT’s object identification center offers features that can give UFT’s object spy a run for its money !

You can invoke it by clicking the “HAT” icon on the Eclipse toolbar. After the Spy has opened, you can click on the Start Spying button to spy on a particular object.

In the below example, I spied on the Google search button on the google homepage and it shows all the properties of the button:-

Object Identification Center

After I click on the Sort by Recommended button as well as Edit Mode button, I will get check boxes in front of each property so that I can select which ones I will be using:-

Using Regular Expressions

As you can see above, clicking on the “STAR” icon on the right of a property will make it as a regular expression and we can use the standard ones like .* and others.

After we are done with the property selection, we can click on the highlight button to check whether the properties are fine or not. A New feature here is that if there are multiple objects matching the description, LeanFT will highlight all the objects rather than giving an error.

So now we have decided the properties and confirmed by highlighting, its time to click the Generate code button which will copy the Java equivalent of the code to our clipboard and we can readily use this in the test.

The code will look  something like:-

browser.describe(Button.class, new ButtonDescription.Builder()
 .buttonType("submit").tagName("INPUT").name(new RegExpProperty(".*Search.* ")).build());

LeanFT Java Tutorial Part 4 – Application Models

Happy Automating !

Harshit Kohli


11 thoughts on “LeanFT Java Tutorial Part 3 – Object Identification Center

  1. hello i am facing one error with application model it throws an error testapp :packaged property is not valid for this test type, and the design is not visible..can you please hellp!!!!

  2. Hi Harshit I have a question. I have a leanft script (Java) which automates my test data creation. I also have created a Java swing desktop app. Can i integrate both. I need to call the leanft script in the swing app. How can I do it?

  3. Hi Harshit,

    I am unable to invoke the OIC, be it from the LeanFT option in eclipse or the Installation path exe or from the selenium option in LeanFT. Any idea how to resolve this?

  4. Hi Priti,

    If you see the OIC and clicking on it is not opening it, then you should consider re-installing/repairing LeanFT.

    If you don’t see the OIC at all, then the Eclipse path that you gave during installation might not be correct(if you don’t see the dropins folder in your eclipse directory, then I’m sure about this), you should re-install with the correct path.

    Hope this helps.

  5. I am trying to reach an object through OIC and to do that I need it’s properties to be unique.
    How can I add properties to the object that I am spying on and reach that object through those properties?

  6. Hi Harshit,

    I am trying to click a button in a webapp with the following code

    browser.describe(Button.class, new ButtonDescription.Builder().buttonType(“submit”).tagName(“INPUT”).name(” Sign In “).build()).click();

    but from a couple of days, I am finding this error

    “The method buttonType(String) is undefined for the type ButtonDescription.Builder”

    We were using this method for all buttons so far without problems, so i was wondering if something has changed in LeanFt.

    Any inputs from your end would be appreciated.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s