Preview only show first 10 pages with watermark. For full document please download

Objectrepositoryutil

QuickTest Professional Object Repository Automation Reference Project Overview Description The Object Repository automation object model enables you to manipulate QuickTest shared object repositories and their contents from outside of QuickTest. The automation object model enables you to use a scripting tool to access QuickTest shared object repositories via automation. Just as you use the QuickTest Professional automation object model to automate your QuickTest operations, you can use the obje

   EMBED


Share

Transcript

  QuickTest Professional Object Repository Automation Reference Project Overview Description The Object Repository automation object model enables you to manipulate QuickTest shared object repositoriesand their contents from outside of QuickTest. The automation object model enables you to use a scripting tool toaccess QuickTest shared object repositories via automation.Just as you use the QuickTest Professional automation object model to automate your QuickTest operations,youcanuse the objects and methods of the Object Repository automation object model to write programs thatmanipulate sharedobject repositories, instead of performing these operations manually using theObjectRepository Manager. For example, you can add, remove, and rename test objects; import from and export toXML; retrieve and copy test objects; and so forth.After you have retrieved a test object, you can manipulate it using the methods and properties available for thattest object class. For example, you can use the GetTOProperty or SetTOProperty methods to retrieve andmodify its properties. For more information on available test object methods and properties, refer to the QuickTest Professional Object Model Reference .Automation programs are especially useful for performing the same tasks multiple times or on multiple sharedobject repositories. You can write your automation programs in any language and development environment thatsupports automation. For example, you can use VBScript, JavaScript, Visual Basic, Visual C++, or VisualStudio.NET. For general information about using automation with QuickTest, refer to the QuickTest ProfessionalUser's Guide . Note: You can use the Object Repository automationobject model to manipulate shared object repositoriessaved in the file system. If you want to manipulate a sharedobject repository stored in Quality Center, you mustdownload the shared object repository and save it to the file system, before using theObject Repositoryautomationobject model to manipulate it. About This Help File ThisHelp file provides detailed descriptions, syntax information, and examples for the objects and methods inthe QuickTest object repository automation object model.The Help topic for each automation object includes a list and description of the methods associated with thatobject. Method Help topics include detailed description, syntax, return value type, and argument valueinformation.The syntax and examples in this Help file are written in VBScript-style. If you are writing your automationprogram in another language, the syntax for some methods may differ slightly from what you find in thecorresponding help topic. For information on syntax for the language you are using, refer to the documentationincluded with your development environment or to general documentation for the programming language. Copyright1992-2006 Mercury Interactive Corporation  QuickTest Professional Object Repository Automation Reference ObjectRepositoryUtil Object Description Enables you to manipulate object repository files (shared and local) from outside of QuickTest Professional. Example Manipulate Object Repositories Using the Object Repository Automation Objects and Methods Methods AddObjectAdds the specified test object to the object repository under the specifiedparent object.ConvertConverts the specified object repository file (version 8.2.1 or earlier) tothe current format.CopyObjectCreates a copy of the specified test object in the object repository.ExportToXMLExports the specified object repository to the specified XML file.GetAllObjectsRetrieves all test objects under the specified parent test object.GetAllObjectsByClassRetrieves all test objects of the specified class under the specified parenttest object.GetChildrenRetrieves all direct children of the specified parent test object.GetChildrenByClassRetrieves all test objects of the specified class under the specified parenttest object.GetLogicalNameRetrieves the name of the specified test object. The name of the testobject as saved in the object repository.GetObjectRetrieves the test object according to the specified path.GetObjectByParentRetrieves the test object according to the specified parent object and testobject name.ImportFromXMLImports the specified XML file to the specified object repository.LoadLoads the specified object repository.RemoveObjectRemoves the specified test object from the object repository.RenameObjectRenames the specified test object in the object repository.SaveSaves any changes you have made.UpdateObjectUpdates the object repository with any changes made to the specifiedtest object. Copyright1992-2006 Mercury Interactive Corporation UNREGISTERED VERSION OF CHM TO PDF CONVERTER By THETA-SOFTWAREUNREGISTERED VERSION OF CHM TO PDF CONVERTER By THETA-SOFTWARE  QuickTest Professional Object Repository Automation Reference AddObject Method Description Adds the specified test object to the object repository under the specified parent object.Syntax (VB) < !-- old data end --> Parameter List < !-- old data end --> Syntax object .AddObject   ( TestObject , Parent , [ Name ] )Argument Description object An expression evaluating to an object of typeObjectRepositoryUtil. TestObject Required. An Object object.The test object to add to the object repository. Tip: You can use the GetObject , GetObjectByParent or Item methodsto retrieve the test object to use as this argument value. Parent Required. A Variant value.The parenttest object.You can specify the parent test object's IDispatch pointer or its full pathasit appears in the Expert View, for example, Browser( Welcome: MercuryTours ).Page( Welcome: Mercury Tours ).If you want to add the test object as a top-level object, specify NULL as the Parent argument value. Name Optional. A Variant value. The name you want to give the test object in theobject repository. If you do not specify a name, the name contained in thetest object is used. Return Value A Variant value.The name of the test object as saved in the object repository. Remarks You can either add a new test object that you have just created, or a copy of a test object that you retrievedfrom a different object repository. Note: If you created a new test object, you must initialize its properties before adding it to the object repository. Copyright1992-2006 Mercury Interactive Corporation  QuickTest Professional Object Repository Automation Reference Convert Method Description Converts the specified object repository file (version 8.2.1 or earlier) to the current format.Syntax (VB) < !-- old data end --> Parameter List < !-- old data end --> Syntax object .Convert   ( OldFile , NewFile )Argument Description object An expression evaluating to an object of typeObjectRepositoryUtil. OldFile Required. A String value. The full name and path of the object repositoryyou want toconvert to the current format. NewFile Required. A String value. The full name and pathunder whichyou want tosave the converted object repository. The file must be a new file (one thatdoes not already exist). The folder path must be an existing one. Return Value A Variant value.The full nameof the converted object repository. Remarks You must convert object repository files from QuickTest Professional 8.2.1 or earlier to the current format beforeyou can use them in QuickTest Professional 9.0 or later. Note: You do not need to use the Load method to load the object repository before converting it. Copyright1992-2006 Mercury Interactive Corporation UNREGISTERED VERSION OF CHM TO PDF CONVERTER By THETA-SOFTWAREUNREGISTERED VERSION OF CHM TO PDF CONVERTER By THETA-SOFTWARE