Showing posts with label micclass. Show all posts
Showing posts with label micclass. Show all posts

Tuesday

QTP - Class Name , micclass , and class

Difference between Class Name, micClass, micclass, className
Difference between Class Name, micClass, micclass, className


Class Name: When looking through the object spy on any object, we'll see the test-object property "Class Name", which always equals to the QTP-Type of that object. So for example, the Class Name of a browser is "Browser", the Class Name of a WinButton is "WinButton".

However, if you wish to use the "Class Name" property to identify objects with Descriptive Programming syntax, you'd have to use the property micclass. So for example, this won't work:Browser("Class Name:=Browser")
But this will:Browser("micclass:=Browser")

So, this takes case of Class Name and micclass, what about the plain old Class and className properties? These properties are usually unique to Web objects.

className is a Run-Time object property of Web objects. You can test it yourself: build a symple HTML file, and add class="Something" to one of the HTML nodes. When you'll load that HTML file in a browser, and use the object spy on the relevant web-object, you'll see className="Something" in the Run-Time tab of the object spy.

class is simply the Test-Object property which equals the Run-Time property of className. Meaning that oWebObject.GetROProperty("class") will be the same as oWebObject.Object.className. They represent the same inner data, once through the Run-Time world, and once through the Test-Object world.