<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: RegisterUserFuncX: Register Methods To All QTP Objects Automatically</title>
	<atom:link href="http://relevantcodes.com/registeruserfuncx-register-methods-to-all-qtp-objects-automatically/feed/" rel="self" type="application/rss+xml" />
	<link>http://relevantcodes.com/registeruserfuncx-register-methods-to-all-qtp-objects-automatically/</link>
	<description>A Test Development Resource for HP QuickTest Professional.</description>
	<lastBuildDate>Thu, 09 Feb 2012 12:13:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: sonal</title>
		<link>http://relevantcodes.com/registeruserfuncx-register-methods-to-all-qtp-objects-automatically/#comment-16033</link>
		<dc:creator>sonal</dc:creator>
		<pubDate>Sun, 06 Mar 2011 17:29:06 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=2246#comment-16033</guid>
		<description>Hi,

i have one basic question. Why do we register? What is the need for registerin? When should we register?

Thx,
sonal</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>i have one basic question. Why do we register? What is the need for registerin? When should we register?</p>
<p>Thx,<br />
sonal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/registeruserfuncx-register-methods-to-all-qtp-objects-automatically/#comment-12257</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Mon, 06 Dec 2010 02:43:08 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=2246#comment-12257</guid>
		<description>Anand, 

Your observation is correct.  But, it is to be noted that RegisterUserFunc only works for test object classes.  Once you add .Object to any test object class, the class is no longer recognized as a QTP test object class.  This can be tested by added &quot;.Object&quot; to any test object and trying to retrieve its original test class - won&#039;t work.</description>
		<content:encoded><![CDATA[<p>Anand, </p>
<p>Your observation is correct.  But, it is to be noted that RegisterUserFunc only works for test object classes.  Once you add .Object to any test object class, the class is no longer recognized as a QTP test object class.  This can be tested by added &#8220;.Object&#8221; to any test object and trying to retrieve its original test class &#8211; won&#8217;t work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anand Tambey</title>
		<link>http://relevantcodes.com/registeruserfuncx-register-methods-to-all-qtp-objects-automatically/#comment-11927</link>
		<dc:creator>Anand Tambey</dc:creator>
		<pubDate>Mon, 15 Nov 2010 07:34:16 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=2246#comment-11927</guid>
		<description>Hi Anshoo,

Yes Anshoo, DOM object/methods could be used inside overriden function body. However DOM object itself can not call overridden function defined for that test object. Have you came across such scenario and found it working. If not,is there any workaround for such limitation?

Here is the example code where DOM object can not call overridden function:- 
 
‘Needs OR for Google page
Function MySet (obj, sVal) 

                Dim sPrev
                
                sPrev  = obj.GetROProperty(&quot;value&quot;) 
                
                Reporter.ReportEvent micDone, &quot;Previous Value was &quot; &amp; sPrev, sPrev 
                
                MySet=obj.Set(sVal) 

                Reporter.ReportEvent micDone, &quot;Set Value is &quot; &amp; sVal, sVal 

End Function 

&#039;Without using overriden function - Calling default SET
Browser(&quot;Google&quot;).Page(&quot;Google&quot;).WebEdit(&quot;q&quot;).Set &quot;QTP&quot;

set pgObj = Browser(&quot;Google&quot;).Page(&quot;Google&quot;)
set txtObj = pgObj.Object.all.namedItem(&quot;q&quot;)

&#039;Defined overridden function
RegisterUserFunc &quot;WebEdit&quot;, &quot;Set&quot;, &quot;MySet&quot; 

&#039;With using overridden function - Calling MySet - This will not work with DOM object - Error 
txtObj.Set &quot;Inception - Dreaming now...&quot;

&#039;With using overridden function - Calling MySet - This will work with test object
Browser(&quot;Google&quot;).Page(&quot;Google&quot;).WebEdit(&quot;q&quot;).Set &quot;Inception - In Real World...&quot;

&#039;Undefined overridden function
UnRegisterUserFunc &quot;WebEdit&quot;, &quot;Set&quot; 

Browser(&quot;Google&quot;).CloseAllTabs</description>
		<content:encoded><![CDATA[<p>Hi Anshoo,</p>
<p>Yes Anshoo, DOM object/methods could be used inside overriden function body. However DOM object itself can not call overridden function defined for that test object. Have you came across such scenario and found it working. If not,is there any workaround for such limitation?</p>
<p>Here is the example code where DOM object can not call overridden function:- </p>
<p>‘Needs OR for Google page<br />
Function MySet (obj, sVal) </p>
<p>                Dim sPrev</p>
<p>                sPrev  = obj.GetROProperty(&#8220;value&#8221;) </p>
<p>                Reporter.ReportEvent micDone, &#8220;Previous Value was &#8221; &amp; sPrev, sPrev </p>
<p>                MySet=obj.Set(sVal) </p>
<p>                Reporter.ReportEvent micDone, &#8220;Set Value is &#8221; &amp; sVal, sVal </p>
<p>End Function </p>
<p>&#8216;Without using overriden function &#8211; Calling default SET<br />
Browser(&#8220;Google&#8221;).Page(&#8220;Google&#8221;).WebEdit(&#8220;q&#8221;).Set &#8220;QTP&#8221;</p>
<p>set pgObj = Browser(&#8220;Google&#8221;).Page(&#8220;Google&#8221;)<br />
set txtObj = pgObj.Object.all.namedItem(&#8220;q&#8221;)</p>
<p>&#8216;Defined overridden function<br />
RegisterUserFunc &#8220;WebEdit&#8221;, &#8220;Set&#8221;, &#8220;MySet&#8221; </p>
<p>&#8216;With using overridden function &#8211; Calling MySet &#8211; This will not work with DOM object &#8211; Error<br />
txtObj.Set &#8220;Inception &#8211; Dreaming now&#8230;&#8221;</p>
<p>&#8216;With using overridden function &#8211; Calling MySet &#8211; This will work with test object<br />
Browser(&#8220;Google&#8221;).Page(&#8220;Google&#8221;).WebEdit(&#8220;q&#8221;).Set &#8220;Inception &#8211; In Real World&#8230;&#8221;</p>
<p>&#8216;Undefined overridden function<br />
UnRegisterUserFunc &#8220;WebEdit&#8221;, &#8220;Set&#8221; </p>
<p>Browser(&#8220;Google&#8221;).CloseAllTabs</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/registeruserfuncx-register-methods-to-all-qtp-objects-automatically/#comment-11910</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Sun, 14 Nov 2010 22:22:10 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=2246#comment-11910</guid>
		<description>Hmm.. I have used DOM methods with RegisterUserFunc.  Also have a few methods written on this site that use DOM methods with RegisterUserFunc.  Would you like to share the method that you have written?</description>
		<content:encoded><![CDATA[<p>Hmm.. I have used DOM methods with RegisterUserFunc.  Also have a few methods written on this site that use DOM methods with RegisterUserFunc.  Would you like to share the method that you have written?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tarun Lalwani</title>
		<link>http://relevantcodes.com/registeruserfuncx-register-methods-to-all-qtp-objects-automatically/#comment-11511</link>
		<dc:creator>Tarun Lalwani</dc:creator>
		<pubDate>Thu, 28 Oct 2010 03:01:02 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=2246#comment-11511</guid>
		<description>@Anand, RegisterUserFunc is only for methjods available with QTP Test Object. When you use HTML DOM you have already left the QTP world and there are no overriden functions that exists</description>
		<content:encoded><![CDATA[<p>@Anand, RegisterUserFunc is only for methjods available with QTP Test Object. When you use HTML DOM you have already left the QTP world and there are no overriden functions that exists</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anand Tambey</title>
		<link>http://relevantcodes.com/registeruserfuncx-register-methods-to-all-qtp-objects-automatically/#comment-11496</link>
		<dc:creator>Anand Tambey</dc:creator>
		<pubDate>Wed, 27 Oct 2010 10:39:07 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=2246#comment-11496</guid>
		<description>One of my colleague tried to use HTML DOM with QTP and he found that overridden function (via registeruserfunc) is not working.

For example a link object is formed by DOM and click method executed. It would not call overriden function. The reason thought by him seems appropriate - As we use micclass in registeruserfunc and micclass is not used in DOM, it will not work.

Do you know such limitations of registeruserfunc and is there any workaround?</description>
		<content:encoded><![CDATA[<p>One of my colleague tried to use HTML DOM with QTP and he found that overridden function (via registeruserfunc) is not working.</p>
<p>For example a link object is formed by DOM and click method executed. It would not call overriden function. The reason thought by him seems appropriate &#8211; As we use micclass in registeruserfunc and micclass is not used in DOM, it will not work.</p>
<p>Do you know such limitations of registeruserfunc and is there any workaround?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis</title>
		<link>http://relevantcodes.com/registeruserfuncx-register-methods-to-all-qtp-objects-automatically/#comment-8626</link>
		<dc:creator>Dennis</dc:creator>
		<pubDate>Tue, 08 Jun 2010 05:47:27 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=2246#comment-8626</guid>
		<description>Anshoo,

Thank you very much for your kindness.</description>
		<content:encoded><![CDATA[<p>Anshoo,</p>
<p>Thank you very much for your kindness.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/registeruserfuncx-register-methods-to-all-qtp-objects-automatically/#comment-8575</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Mon, 07 Jun 2010 13:53:51 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=2246#comment-8575</guid>
		<description>Dennis,

This is a concept of &lt;code&gt;WMI&lt;/code&gt;.  You can find a lot of information about WMI from Google, but &lt;a href=&quot;http://technet.microsoft.com/en-us/library/ee692772.aspx&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; may be a pretty good starting point..</description>
		<content:encoded><![CDATA[<p>Dennis,</p>
<p>This is a concept of <code>WMI</code>.  You can find a lot of information about WMI from Google, but <a href="http://technet.microsoft.com/en-us/library/ee692772.aspx" rel="nofollow">this</a> may be a pretty good starting point..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis</title>
		<link>http://relevantcodes.com/registeruserfuncx-register-methods-to-all-qtp-objects-automatically/#comment-8158</link>
		<dc:creator>Dennis</dc:creator>
		<pubDate>Thu, 03 Jun 2010 12:15:16 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=2246#comment-8158</guid>
		<description>Hi, Anshoo,

I want to get some further introduction for &lt;code&gt;Set oRegistry = GetObject(&quot;winmgmts:{impersonationLevel=impersonate}!\\.&quot; &amp;_ &quot;\root\default:StdRegProv&quot;) &lt;/code&gt;. I know this is related to VBScript, even WScript.

Could you kindlly provide some?

Thank you in advance.

Regards,
Dennis</description>
		<content:encoded><![CDATA[<p>Hi, Anshoo,</p>
<p>I want to get some further introduction for <code>Set oRegistry = GetObject("winmgmts:{impersonationLevel=impersonate}!\\." &amp;_ "\root\default:StdRegProv") </code>. I know this is related to VBScript, even WScript.</p>
<p>Could you kindlly provide some?</p>
<p>Thank you in advance.</p>
<p>Regards,<br />
Dennis</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/registeruserfuncx-register-methods-to-all-qtp-objects-automatically/#comment-3319</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Wed, 28 Apr 2010 07:51:58 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=2246#comment-3319</guid>
		<description>Nice, Christian!</description>
		<content:encoded><![CDATA[<p>Nice, Christian!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

