{"id":875,"date":"2023-09-09T06:43:04","date_gmt":"2023-09-09T06:43:04","guid":{"rendered":"https:\/\/www.softwaretestingstuff.com\/?p=875"},"modified":"2023-09-10T10:37:41","modified_gmt":"2023-09-10T10:37:41","slug":"objects-and-actions-in-qtp","status":"publish","type":"post","link":"https:\/\/www.softwaretestingstuff.com\/2008\/11\/objects-and-actions-in-qtp.html","title":{"rendered":"Objects and Actions in QTP"},"content":{"rendered":"\n
Objects:<\/strong> Objects are the things which contains different properties and methods. For Example: Window is said to be an object which consists of properties such as Exist, GetROProperty and methods such as ChildObjects, Activate, maximize, minimize etc.<\/p>\n\n\n\n Property:<\/strong> Property describes about the object defined, each object has different properties, which is necessary to describe the object, which differentiates the given object with other objects.<\/p>\n\n\n\n For example: If we take a window object, we first have to define to which class it belongs to which is one of the property, it belongs to a window class. Exist is a property which is common to many objects which returns true if that object exists.<\/p>\n\n\n\n Methods:<\/strong> Methods are functions, which are used for changing the properties of the object that is in order to manipulate with the object properties we use.<\/p>\n\n\n\n For example:<\/strong> If we take a window object, Activate is a method used to activate the window object, thus by using Activate method Activate property of the present window object is set to true, thus the window object will be activated if not in activated mode.<\/p>\n\n\n\n Actions Settings:<\/strong> You can use the Run tab of the Action Call Properties dialog box to instruct QuickTest to run only one iteration on the called action, to run iterations on all rows in the Data Table, or to run iterations only for certain rows in the Data Table.<\/p>\n\n\n\n Iterations using rows:<\/strong> The Run tab includes the following options:<\/p>\n\n\n\n <\/p>\n\n\n\n If you want to include one or more statements in every new action in your test, you can create an action template. For example, if you always enter your name as the author of an action, you can add this comment line to your action template. An action template applies only to actions created on your computer.<\/p>\n\n\n\n To create an action template:<\/p>\n\n\n\n 1. Create a text file containing the comments, function calls, and other statements that you want to include in your action template. The text file must be in the structure and format used in the Expert View<\/p>\n\n\n\n 2. Save the text file as ActionTemplate.mst in your \\dat folder. All new actions you create contain the script lines from the action template.<\/p>\n\n\n\n Only the file name ActionTemplate.mst is recognized as an action template.<\/p>\n\n\n\n Check for the required add-ins for an application.<\/p>\n\n\n\n Include action template for every test containing script id, Action name, Action Description, Recovery scenario used etc.<\/p>\n\n\n\n Every action, scenario must be specified with an appropriate name.<\/p>\n\n\n\n Check for mandatory input fields for all iterations in the datasheets that are being imported.<\/p>\n\n\n\n Example:<\/strong> The Resources tab of the Test Settings dialog box can be used to associate specific files with the test, such as Data Table files<\/p>\n\n\n\n The option area Other location instructs Quick Test to use data stored in the specified Data Table location. The Data Table can be any Microsoft Excel (.xls) file.<\/p>\n\n\n\n Check for the \u201cData table iterations\u201d under the test settings for which the test has to be run. A test is made up of calls to actions. When you create a new test, it contains a call to a single action or create tests that call multiple actions by inserting calls to them, to make the design more modular and efficient tests.<\/p>\n\n\n\n reusable action\u2014<\/strong>an action that can be called multiple times by the test with which is stored in the local test as well as by other tests.<\/p>\n\n\n\n external action\u2014<\/strong>a reusable action stored with another test. External actions are read-only in the calling test. They can be modified only in the test with which they are stored.<\/p>\n\n\n\n Non-resuable-actions \u2014<\/strong>an action that can be called only in the test with which it is stored, and can be called only once.<\/p>\n\n\n\n Also See:<\/strong><\/p>\n\n\n\n Objects Objects: Objects are the things which contains different properties and methods. For Example: Window is said to be an object which consists of properties such as Exist, GetROProperty and methods such as ChildObjects, Activate, maximize, minimize etc. Property: Property describes about the object defined, each object has different properties, which is necessary to describe the object, […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[14],"tags":[],"table_tags":[],"class_list":["post-875","post","type-post","status-publish","format-standard","hentry","category-software-testing-certification"],"yoast_head":"\nActions<\/strong><\/h2>\n\n\n\n
\n
Action Template<\/strong><\/h2>\n\n\n\n
Creating an Action Template<\/strong><\/a><\/h3>\n\n\n\n
Script Startup<\/strong><\/h3>\n\n\n\n
Splitting Actions, Re-usable Actions, Internal\/External Actions: Actions help divide your test into logical units, specific activities that you perform in your application.<\/p>\n\n\n\nThere are three kinds of actions<\/strong><\/h3>\n\n\n\n
\n