QTP Step Generator Functions

QTP Step Generator Functions:GetROProperty,GetTextLocation,GetTOProperties,GetTOProperty,SetTOProperty

These are most important and confusing to everyone.so here am sharing you in easy way with syntax and examples too.

GetTOProperties:Returns properties and values which QTP has recorded and will use to identify an object at run time

Syntax: set a=Window("Flight Reservation").WinRadioButton("Business").GetTOProperties

GetTOProperty:It will Return the value of a particular property for a test object which QTP recorded to identify an object during Run time. The value is taken from the Object Repository.

Syntax: set a=Window("Flight Reservation").WinRadioButton("Business").GetTOProperty

GetROProperty: It will Return the current value (run time value) of the test object property from the object in the application.GetROProperty retrieves the current property value of the object in the application during the test run.

Syntax: set a=Window("Flight Reservation").WinRadioButton("Business").GetROProperty

Detailed explanation with example is there here.

SetTOProperty: Sets the value of the specified property in its test object description.It helps to Modify Test Object Properties During a Run Session.

You can modify the properties of the temporary version of the object during the run session without affecting the permanent values in the object repository by adding a SetTOProperty statement in the Expert View.

Syntax:Object(description).SetTOProperty Property, Value

GetTextLocation: Checks whether the specified text string is contained in the specified window area.

Syntax:object.GetTextLocation (TextToFind, Left, Top, Right, Bottom, [MatchWholeWordOnly])

Hope you enjoyed knowing all these.Subscribe to my feeds to get daily updates on testing.

Advertisement:Zoom Into Tech & Blogging tips at TechZoomIn