<?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: Descriptive Programming (DP) Concepts &#8211; 3 (Ordinal Identifiers)</title>
	<atom:link href="http://relevantcodes.com/descriptive-programming-dp-concepts-3-ordinal-identifiers-demo/feed/" rel="self" type="application/rss+xml" />
	<link>http://relevantcodes.com/descriptive-programming-dp-concepts-3-ordinal-identifiers-demo/</link>
	<description>A Resource for Test Automation Development</description>
	<lastBuildDate>Fri, 18 May 2012 07:21:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: rafiq</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-concepts-3-ordinal-identifiers-demo/#comment-56243</link>
		<dc:creator>rafiq</dc:creator>
		<pubDate>Wed, 22 Feb 2012 09:49:18 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=215#comment-56243</guid>
		<description>Hi,

I have a trouble. I want to know the index of an object during run time. Suppose there are 100 buttons on a webpage with same properties. How to get the index of 50th button during run time?

Please help
Rafiq</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I have a trouble. I want to know the index of an object during run time. Suppose there are 100 buttons on a webpage with same properties. How to get the index of 50th button during run time?</p>
<p>Please help<br />
Rafiq</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-concepts-3-ordinal-identifiers-demo/#comment-52990</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Tue, 27 Dec 2011 11:24:25 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=215#comment-52990</guid>
		<description>Murgendra: If the application has not been developed and if you do not have the HTML source (considering its Web), then there is no way you can tell what the index of a given object will be. Also, you must note that indexes depend on other properties. So, adding one property can change the index value and removing another property can again change it.

If the application is ready, you can find out the index using:

1. Loop with Index increments + Highlight
2. ChildObjects
3. HTML DOM length etc.

In some apps, the Index can be dynamic so the above techniques may be required to create robustness.</description>
		<content:encoded><![CDATA[<p>Murgendra: If the application has not been developed and if you do not have the HTML source (considering its Web), then there is no way you can tell what the index of a given object will be. Also, you must note that indexes depend on other properties. So, adding one property can change the index value and removing another property can again change it.</p>
<p>If the application is ready, you can find out the index using:</p>
<p>1. Loop with Index increments + Highlight<br />
2. ChildObjects<br />
3. HTML DOM length etc.</p>
<p>In some apps, the Index can be dynamic so the above techniques may be required to create robustness.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sailaja</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-concepts-3-ordinal-identifiers-demo/#comment-50080</link>
		<dc:creator>Sailaja</dc:creator>
		<pubDate>Thu, 01 Dec 2011 14:43:27 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=215#comment-50080</guid>
		<description>Hi ,

This site is very help for QTPers.can u plese explain the same code if the excel has ifooter installed i changed the code as 

Window(&quot;regexpwndtitle:=TCS iFooter&quot;).WinObject(&quot;regexpwndtitle:=&amp;Cancel&quot;).Click
but it showing the runtime error as not able to find the parent object

Thanks,
Sailaja</description>
		<content:encoded><![CDATA[<p>Hi ,</p>
<p>This site is very help for QTPers.can u plese explain the same code if the excel has ifooter installed i changed the code as </p>
<p>Window(&#8220;regexpwndtitle:=TCS iFooter&#8221;).WinObject(&#8220;regexpwndtitle:=&amp;Cancel&#8221;).Click<br />
but it showing the runtime error as not able to find the parent object</p>
<p>Thanks,<br />
Sailaja</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Murgendra</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-concepts-3-ordinal-identifiers-demo/#comment-43367</link>
		<dc:creator>Murgendra</dc:creator>
		<pubDate>Wed, 02 Nov 2011 16:44:19 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=215#comment-43367</guid>
		<description>Hi Anshoo,

How do we identify the index of an object if it the application is not yet developed. Also if the application is developed and there are many objects of the same type having same properties, then how do we know the index without having to go through the source code and doing trying to guess the index.</description>
		<content:encoded><![CDATA[<p>Hi Anshoo,</p>
<p>How do we identify the index of an object if it the application is not yet developed. Also if the application is developed and there are many objects of the same type having same properties, then how do we know the index without having to go through the source code and doing trying to guess the index.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: siva gaikoti</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-concepts-3-ordinal-identifiers-demo/#comment-37296</link>
		<dc:creator>siva gaikoti</dc:creator>
		<pubDate>Mon, 26 Sep 2011 15:30:15 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=215#comment-37296</guid>
		<description>to use the location property:
Dim a
Set myp=browser(&quot;name:=.*&quot;).page(&quot;title:=.*&quot;)
Set myedit=description.Create
myedit(&quot;micclass&quot;).value=&quot;link&quot;

Set noedit=myp.ChildObjects(myedit)
print noedit.count

If noedit.count=0 Then
	print &quot;no links&quot;
	else
	For i=0 to noedit.count-1
		print noedit(i).getroproperty(&quot;index&quot;)
		print noedit(i).getroproperty(&quot;name&quot;)

	Next


a=browser(&quot;name:=.*&quot;).page(&quot;title:=.*&quot;).link(&quot;location:=1&quot;).getroproperty(&quot;name&quot;)
print a


End If</description>
		<content:encoded><![CDATA[<p>to use the location property:<br />
Dim a<br />
Set myp=browser(&#8220;name:=.*&#8221;).page(&#8220;title:=.*&#8221;)<br />
Set myedit=description.Create<br />
myedit(&#8220;micclass&#8221;).value=&#8221;link&#8221;</p>
<p>Set noedit=myp.ChildObjects(myedit)<br />
print noedit.count</p>
<p>If noedit.count=0 Then<br />
	print &#8220;no links&#8221;<br />
	else<br />
	For i=0 to noedit.count-1<br />
		print noedit(i).getroproperty(&#8220;index&#8221;)<br />
		print noedit(i).getroproperty(&#8220;name&#8221;)</p>
<p>	Next</p>
<p>a=browser(&#8220;name:=.*&#8221;).page(&#8220;title:=.*&#8221;).link(&#8220;location:=1&#8243;).getroproperty(&#8220;name&#8221;)<br />
print a</p>
<p>End If</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: siva gaikoti</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-concepts-3-ordinal-identifiers-demo/#comment-37295</link>
		<dc:creator>siva gaikoti</dc:creator>
		<pubDate>Mon, 26 Sep 2011 15:27:15 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=215#comment-37295</guid>
		<description>hi ..
try this code ,ur doubts about index and location properties gets cleared(application used as aut: http://www.google.co.in/intl/en/options/)

Dim a
Set myp=browser(&quot;name:=.*&quot;).page(&quot;title:=.*&quot;)
Set myedit=description.Create
myedit(&quot;micclass&quot;).value=&quot;link&quot;

Set noedit=myp.ChildObjects(myedit)
print noedit.count

If noedit.count=0 Then
	print &quot;no links&quot;
	else
	For i=0 to noedit.count-1
		print noedit(i).getroproperty(&quot;index&quot;)
		print noedit(i).getroproperty(&quot;name&quot;)

	Next


a=browser(&quot;name:=.*&quot;).page(&quot;title:=.*&quot;).link(&quot;index:=1&quot;).getroproperty(&quot;name&quot;)
print a


End If</description>
		<content:encoded><![CDATA[<p>hi ..<br />
try this code ,ur doubts about index and location properties gets cleared(application used as aut: <a href="http://www.google.co.in/intl/en/options/" rel="nofollow">http://www.google.co.in/intl/en/options/</a>)</p>
<p>Dim a<br />
Set myp=browser(&#8220;name:=.*&#8221;).page(&#8220;title:=.*&#8221;)<br />
Set myedit=description.Create<br />
myedit(&#8220;micclass&#8221;).value=&#8221;link&#8221;</p>
<p>Set noedit=myp.ChildObjects(myedit)<br />
print noedit.count</p>
<p>If noedit.count=0 Then<br />
	print &#8220;no links&#8221;<br />
	else<br />
	For i=0 to noedit.count-1<br />
		print noedit(i).getroproperty(&#8220;index&#8221;)<br />
		print noedit(i).getroproperty(&#8220;name&#8221;)</p>
<p>	Next</p>
<p>a=browser(&#8220;name:=.*&#8221;).page(&#8220;title:=.*&#8221;).link(&#8220;index:=1&#8243;).getroproperty(&#8220;name&#8221;)<br />
print a</p>
<p>End If</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bharathi</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-concepts-3-ordinal-identifiers-demo/#comment-36715</link>
		<dc:creator>Bharathi</dc:creator>
		<pubDate>Wed, 21 Sep 2011 07:48:10 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=215#comment-36715</guid>
		<description>I need help on identifying the 2 webedit boxes which are adjacent to each other on a web page using descriptive programming</description>
		<content:encoded><![CDATA[<p>I need help on identifying the 2 webedit boxes which are adjacent to each other on a web page using descriptive programming</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-concepts-3-ordinal-identifiers-demo/#comment-30613</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Mon, 01 Aug 2011 21:01:05 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=215#comment-30613</guid>
		<description>Radhika,

In your For-Loop, all you need to do is to refer the item-index for the collection object (Noedit) to retrieve the &#039;name&#039; property for each Edit. Simply add this to your loop:

&lt;pre&gt;
Print Noedit(i).GetROProperty(&quot;name&quot;)
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Radhika,</p>
<p>In your For-Loop, all you need to do is to refer the item-index for the collection object (Noedit) to retrieve the &#8216;name&#8217; property for each Edit. Simply add this to your loop:</p>
<pre>
Print Noedit(i).GetROProperty("name")
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Radhika</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-concepts-3-ordinal-identifiers-demo/#comment-28013</link>
		<dc:creator>Radhika</dc:creator>
		<pubDate>Mon, 18 Jul 2011 20:08:05 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=215#comment-28013</guid>
		<description>Hey Anshoo,

How to get the &quot;Index&quot; value of any element using DP. 
I tried with google.com to get index values for WebEdit fields. There are total 5 WebEdits. But i am not able to print there index values i.e 0, 1, 2, 3, 4

Code is as below:
Set myp = browser(&quot;title:=.*&quot;).page(&quot;title:=.*&quot;)
Set myedit = description.Create()
myedit(&quot;micclass&quot;).value = &quot;WebEdit&quot;
myedit(&quot;html tag&quot;).value = &quot;TEXTAREA&quot;

&#039;Get all webedit fields
set Noedit = myp.ChildObjects(myedit)
print Noedit.count

If Noedit.count = 0 Then
	print &quot;No WebEdit fields were found&quot;
	else
	For i=0 to Noedit.count-1
		print &quot;Webedit # &quot; &amp; Noedit.count &amp; &quot; = &quot; &amp; myp.webedit(myedit).GetROProperty(&quot;name&quot;)
		print &quot;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&quot;
	Next
End If

Kindly guide,
Thanks
Radhika</description>
		<content:encoded><![CDATA[<p>Hey Anshoo,</p>
<p>How to get the &#8220;Index&#8221; value of any element using DP.<br />
I tried with google.com to get index values for WebEdit fields. There are total 5 WebEdits. But i am not able to print there index values i.e 0, 1, 2, 3, 4</p>
<p>Code is as below:<br />
Set myp = browser(&#8220;title:=.*&#8221;).page(&#8220;title:=.*&#8221;)<br />
Set myedit = description.Create()<br />
myedit(&#8220;micclass&#8221;).value = &#8220;WebEdit&#8221;<br />
myedit(&#8220;html tag&#8221;).value = &#8220;TEXTAREA&#8221;</p>
<p>&#8216;Get all webedit fields<br />
set Noedit = myp.ChildObjects(myedit)<br />
print Noedit.count</p>
<p>If Noedit.count = 0 Then<br />
	print &#8220;No WebEdit fields were found&#8221;<br />
	else<br />
	For i=0 to Noedit.count-1<br />
		print &#8220;Webedit # &#8221; &amp; Noedit.count &amp; &#8221; = &#8221; &amp; myp.webedit(myedit).GetROProperty(&#8220;name&#8221;)<br />
		print &#8220;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&#8221;<br />
	Next<br />
End If</p>
<p>Kindly guide,<br />
Thanks<br />
Radhika</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-concepts-3-ordinal-identifiers-demo/#comment-24825</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Fri, 24 Jun 2011 16:15:00 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=215#comment-24825</guid>
		<description>Shubhanshu:  &quot;#&quot; can be used before the index value to select it from the List.  Example:

&lt;pre&gt;
Browser(&quot;&quot;).WebList(&quot;&quot;).Select &quot;#1&quot;  &#039;selects the 2nd item in the list
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Shubhanshu:  &#8220;#&#8221; can be used before the index value to select it from the List.  Example:</p>
<pre>
Browser("").WebList("").Select "#1"  'selects the 2nd item in the list
</pre>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 10/14 queries in 0.003 seconds using disk: basic
Object Caching 379/379 objects using disk: basic
Content Delivery Network via N/A

Served from: relevantcodes.com @ 2012-05-19 11:02:32 -->
