LeanFT C# 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 Visual Studio 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 C# equivalent of the code to our clipboard and we can readily use this in the test.

The code will look  something like:-


browser.Describe<IButton>(new ButtonDescription
{
ButtonType = "submit",
TagName = "INPUT",
Name = As.RegExp(".*Search.*")
});

LeanFT C# Tutorial Part 4 – Application Models

 

Happy Automating !

Harshit Kohli

Advertisements

Eat, Sleep, Automate. REPEAT !

Tagged with: , , , , , , , , , , ,
Posted in LeanFT
5 comments on “LeanFT C# Tutorial Part 3 – Object Identification Center
  1. […] After that, we create the edit box object where we will set the search term that we are looking for. In case you want to learn how we can create this statement. You should check out my post on using LFT’s Object Spy. […]

  2. Great Article Harshit sir !!

  3. […] After that, we create the edit box object where we will set the search term that we are looking for. In case you want to learn how we can create this statement. You should check out my post on using LFT’s Object Spy. […]

  4. […] LeanFT Tutorial Part 3 – Object Identification Center […]

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

Blog Stats
  • 168,130 hits
Categories

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 796 other followers

%d bloggers like this: