Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to add an object to repository through script
#4
Solved: 10 Years, 9 Months, 4 Weeks ago
(A)
Descriptive programming allows you to work with objects that are not stored in object
repository. two types of programmatic descriptions.
1) listing the set of properties and values that describe the object directly in a test
statement.
2) Add collection of properties and values to a Description object, and then enter the
Description object name in the statement.
In your case my suggestion was to use the second option. Yes, this does not add objects to OR but you can use the objects.


(B)
You can use SetTOProperty method of test object.
Object(description).SetTOProperty Property, Value
The values of test object properties are used to identify the objects. Sometimes the properties of
the object in the application change dynamically. For example text of a link in a webpage is the
username used to login to that page.
Text property is used by test object to identify the link. So in order to identify the actual object we
can manipulate the value of “text” property of link using SetTOProperty.

This can be used for existing Dynamic Objects in OR.

( c)
By Using Object Repository Automation Model.
You can use ObjectRepositoryUtil Object and apply Add Object Method.
For more info, please check QTP Help.
By using this: you can add objects to OR from your script
Reply


Messages In This Thread
RE: How to add an object to repository through script - by niranjan - 06-11-2008, 10:01 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Do we need object repository?? subhashinid 0 1,870 07-06-2016, 10:07 AM
Last Post: subhashinid
  Object repository losing object properties ishan.mahajan@adp.com 2 3,470 08-20-2015, 11:33 PM
Last Post: ADITI1992
  login object not found in object repository Akram 2 3,000 06-01-2015, 07:47 PM
Last Post: babu123
  object was not found in the Object Repository reynard 0 6,684 03-17-2015, 10:54 PM
Last Post: reynard
  Change Object Repository File Path for ExternalActions MasterChief 1 4,444 11-13-2014, 06:05 PM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)