{"id":287,"date":"2011-09-25T21:12:19","date_gmt":"2011-09-25T15:42:19","guid":{"rendered":"http:\/\/www.automationrepository.com\/?p=287"},"modified":"2011-10-09T00:16:51","modified_gmt":"2011-10-08T18:46:51","slug":"what-is-action-template-in-qtp","status":"publish","type":"post","link":"https:\/\/www.automationrepository.com\/wordpress\/2011\/09\/what-is-action-template-in-qtp\/","title":{"rendered":"What is Action Template in QTP?"},"content":{"rendered":"<p style=\"text-align: justify;\">Action Template is a mechanism in QTP that allows you to include some text in your new actions by default. The text will be included automatically every time you create a new action. <!--more-->Suppose that for every action you create for your automation suite, you want to include some comments at the beginning of the action. Instead of manually adding it for every action, you can create an Action Template that would automatically add the static text for you. Let us suppose that you want to add the following text in your action &#8211;<\/p>\n<p><code><br \/>\n<span style=\"color: #008000;\">'=========================================================================<\/span><br \/>\n<span style=\"color: #008000;\"> 'Action Name -<\/span><br \/>\n<span style=\"color: #008000;\"> 'Purpose -<\/span><br \/>\n<span style=\"color: #008000;\"> 'Created by -<\/span><br \/>\n<span style=\"color: #008000;\"> 'Date -<\/span><\/code><br \/>\n<span style=\"color: #008000;\"> <code><br \/>\n'Change History<br \/>\n'- - - - - - - - - - - - - -<br \/>\n'Date Changed by Comments<br \/>\n'<br \/>\n'=========================================================================<\/code><\/span><\/p>\n<p>Let&#8217;s see how this can be done &#8211;<\/p>\n<p>1. Open notepad and copy the above code to it.<\/p>\n<p>2. Save the notepad as <strong>ActionTemplate.mst<\/strong>.<strong> <\/strong><\/p>\n<p>3. Open QTP&#8217;s<strong> dat<\/strong> folder. For QTP 11, the path can be: C:\\Program Files\\HP\\QuickTest Professional\\dat. <em>[Note: The path can change<\/em> <em>depending upon the OS &amp; QTP version\/installation]<\/em><\/p>\n<p>4. Add the ActionTemplate.mst file in the dat folder. Thats All !!!<\/p>\n<p>&nbsp;<\/p>\n<p>Open QTP and insert a new action. The new action should display the statements that you had saved in the Action Template.<\/p>\n<div style=\"width: 672px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\" \" title=\"Action Template QTP\" src=\"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/action-template-qtp.png\" alt=\"Action Template in QTP\" width=\"662\" height=\"431\" \/><p class=\"wp-caption-text\">Action Template in QTP<\/p><\/div>\n<h3><\/h3>\n<h3 style=\"text-align: justify;\">Even after adding ActionTemplate.mst file in dat file, you new Action doesn&#8217;t display anything?<\/h3>\n<p style=\"text-align: justify;\">Now this is a very common problem faced by many people. And the primary reason for this is the extension of your Action Template file. Many a times when we create an ActionTemplate file using notepad, it gets saved as <strong>ActionTemplate.mst.txt<\/strong>. To make sure that this doesn&#8217;t happen &#8211; Open any folder, go to Tools -&gt; Folder Options -&gt; View (tab) &amp; and deselect<strong> Hide extensions for known file types<\/strong> option. Check the extension of your Action Template file once again. Verify that the file is saved as ActionTemplate.mst only and not ActionTemplate.mst.txt<\/p>\n<p>&nbsp;<\/p>\n<div style=\"font-family: Verdana,sans-serif; border: 1px solid #C8B560; padding: 3mm; background: #FFF8C6; text-align: center;\">\n<p>If you enjoyed this article, you can join our blog to get free email updates directly in your inbox.<\/p>\n<form style=\"text-align: center;\" action=\"http:\/\/feedburner.google.com\/fb\/a\/mailverify\" method=\"post\" onsubmit=\"window.open('http:\/\/feedburner.google.com\/fb\/a\/mailverify?uri=automationrepository\/feeds', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true\" target=\"popupwindow\"><input style=\"width: 160px; height: 24px;\" onfocus=\"if (this.value == 'Enter Your Email Address') {this.value = '';}\" onblur=\"if (this.value == '') {this.value = 'Enter Your Email Address';}\" type=\"text\" value=\"Enter Your Email Address\" \/> <input type=\"hidden\" name=\"uri\" value=\"automationrepository\/feeds\" \/> <input type=\"hidden\" name=\"loc\" value=\"en_US\" \/> <input type=\"submit\" value=\"Subscribe\" \/><\/p>\n<p style=\"text-align: justify;\">\n<\/form>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Action Template is a mechanism in QTP that allows you to include some text in your new actions by default. The text will be included automatically every time you create a new action.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,9],"tags":[34],"class_list":["post-287","post","type-post","status-publish","format-standard","hentry","category-not-so-common-stuff","category-qtp-concepts","tag-action-template"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What is Action Template in QTP? - Automation Repository<\/title>\n<meta name=\"description\" content=\"Create Action Template in QTP dat folder. The main reason action template doesn&#039;t work is due to .txt appended at its end when created in notepad.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.automationrepository.com\/wordpress\/2011\/09\/what-is-action-template-in-qtp\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Anish Pillai\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/2011\/09\/what-is-action-template-in-qtp\/\",\"url\":\"https:\/\/www.automationrepository.com\/wordpress\/2011\/09\/what-is-action-template-in-qtp\/\",\"name\":\"What is Action Template in QTP? - Automation Repository\",\"isPartOf\":{\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/2011\/09\/what-is-action-template-in-qtp\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/2011\/09\/what-is-action-template-in-qtp\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/action-template-qtp.png\",\"datePublished\":\"2011-09-25T15:42:19+00:00\",\"dateModified\":\"2011-10-08T18:46:51+00:00\",\"author\":{\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/#\/schema\/person\/7a35710e1ce89e5fb481be88fcd6cd20\"},\"description\":\"Create Action Template in QTP dat folder. The main reason action template doesn't work is due to .txt appended at its end when created in notepad.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/2011\/09\/what-is-action-template-in-qtp\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.automationrepository.com\/wordpress\/2011\/09\/what-is-action-template-in-qtp\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/2011\/09\/what-is-action-template-in-qtp\/#primaryimage\",\"url\":\"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/action-template-qtp.png\",\"contentUrl\":\"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/action-template-qtp.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/2011\/09\/what-is-action-template-in-qtp\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.automationrepository.com\/wordpress\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What is Action Template in QTP?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/#website\",\"url\":\"https:\/\/www.automationrepository.com\/wordpress\/\",\"name\":\"XX\",\"description\":\"\\r\\nasas\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.automationrepository.com\/wordpress\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/#\/schema\/person\/7a35710e1ce89e5fb481be88fcd6cd20\",\"name\":\"Anish Pillai\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.automationrepository.com\/wordpress\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8aa984de2295c3c4078fa48f6ba5d91e7c849b1a27a11dca24c6f11dd673ba14?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8aa984de2295c3c4078fa48f6ba5d91e7c849b1a27a11dca24c6f11dd673ba14?s=96&d=mm&r=g\",\"caption\":\"Anish Pillai\"},\"description\":\"Find more about Anish Pillai on Google+\",\"sameAs\":[\"http:\/\/www.automationrepository.com\"],\"url\":\"https:\/\/www.automationrepository.com\/wordpress\/author\/anish\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is Action Template in QTP? - Automation Repository","description":"Create Action Template in QTP dat folder. The main reason action template doesn't work is due to .txt appended at its end when created in notepad.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.automationrepository.com\/wordpress\/2011\/09\/what-is-action-template-in-qtp\/","twitter_misc":{"Written by":"Anish Pillai","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.automationrepository.com\/wordpress\/2011\/09\/what-is-action-template-in-qtp\/","url":"https:\/\/www.automationrepository.com\/wordpress\/2011\/09\/what-is-action-template-in-qtp\/","name":"What is Action Template in QTP? - Automation Repository","isPartOf":{"@id":"https:\/\/www.automationrepository.com\/wordpress\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.automationrepository.com\/wordpress\/2011\/09\/what-is-action-template-in-qtp\/#primaryimage"},"image":{"@id":"https:\/\/www.automationrepository.com\/wordpress\/2011\/09\/what-is-action-template-in-qtp\/#primaryimage"},"thumbnailUrl":"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/action-template-qtp.png","datePublished":"2011-09-25T15:42:19+00:00","dateModified":"2011-10-08T18:46:51+00:00","author":{"@id":"https:\/\/www.automationrepository.com\/wordpress\/#\/schema\/person\/7a35710e1ce89e5fb481be88fcd6cd20"},"description":"Create Action Template in QTP dat folder. The main reason action template doesn't work is due to .txt appended at its end when created in notepad.","breadcrumb":{"@id":"https:\/\/www.automationrepository.com\/wordpress\/2011\/09\/what-is-action-template-in-qtp\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.automationrepository.com\/wordpress\/2011\/09\/what-is-action-template-in-qtp\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.automationrepository.com\/wordpress\/2011\/09\/what-is-action-template-in-qtp\/#primaryimage","url":"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/action-template-qtp.png","contentUrl":"https:\/\/www.automationrepository.com\/wordpress\/wp-content\/uploads\/ar\/action-template-qtp.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.automationrepository.com\/wordpress\/2011\/09\/what-is-action-template-in-qtp\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.automationrepository.com\/wordpress\/"},{"@type":"ListItem","position":2,"name":"What is Action Template in QTP?"}]},{"@type":"WebSite","@id":"https:\/\/www.automationrepository.com\/wordpress\/#website","url":"https:\/\/www.automationrepository.com\/wordpress\/","name":"XX","description":"\r\nasas","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.automationrepository.com\/wordpress\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.automationrepository.com\/wordpress\/#\/schema\/person\/7a35710e1ce89e5fb481be88fcd6cd20","name":"Anish Pillai","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.automationrepository.com\/wordpress\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8aa984de2295c3c4078fa48f6ba5d91e7c849b1a27a11dca24c6f11dd673ba14?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8aa984de2295c3c4078fa48f6ba5d91e7c849b1a27a11dca24c6f11dd673ba14?s=96&d=mm&r=g","caption":"Anish Pillai"},"description":"Find more about Anish Pillai on Google+","sameAs":["http:\/\/www.automationrepository.com"],"url":"https:\/\/www.automationrepository.com\/wordpress\/author\/anish\/"}]}},"_links":{"self":[{"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/posts\/287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/comments?post=287"}],"version-history":[{"count":22,"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/posts\/287\/revisions"}],"predecessor-version":[{"id":514,"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/posts\/287\/revisions\/514"}],"wp:attachment":[{"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/media?parent=287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/categories?post=287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.automationrepository.com\/wordpress\/wp-json\/wp\/v2\/tags?post=287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}