<?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) &#8211; 4 (Creating a Test Script)</title>
	<atom:link href="http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/feed/" rel="self" type="application/rss+xml" />
	<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/</link>
	<description>A Test Development Resource for HP QuickTest Professional.</description>
	<lastBuildDate>Thu, 09 Sep 2010 15:34:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-10477</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Thu, 02 Sep 2010 12:35:25 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-10477</guid>
		<description>Radhika,

Consider the below example:

&lt;pre&gt;
&#039;In [Action 1]
Dim sVariable
sVariable = &quot;Text&quot;

&#039;In [Action 2]
MsgBox sVariable
&lt;/pre&gt;

Above, you will notice that sVariable is blank. This is because, all local variables have limited scope when it comes to actions. This means, a local variable within Action 1 cannot be seen or used by Action 2. 

Now, consider the same scenario with Environment variables:

&lt;pre&gt;
&#039;In [Action 1]
Environment(&quot;sVariable&quot;) = &quot;Text&quot;

&#039;In [Action 2]
MsgBox Environment.Value(&quot;sVariable&quot;)
&lt;/pre&gt;

Were you able to access the Environment variable in Action 2?</description>
		<content:encoded><![CDATA[<p>Radhika,</p>
<p>Consider the below example:</p>
<pre>
'In [Action 1]
Dim sVariable
sVariable = "Text"

'In [Action 2]
MsgBox sVariable
</pre>
<p>Above, you will notice that sVariable is blank. This is because, all local variables have limited scope when it comes to actions. This means, a local variable within Action 1 cannot be seen or used by Action 2. </p>
<p>Now, consider the same scenario with Environment variables:</p>
<pre>
'In [Action 1]
Environment("sVariable") = "Text"

'In [Action 2]
MsgBox Environment.Value("sVariable")
</pre>
<p>Were you able to access the Environment variable in Action 2?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Radhika</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-10329</link>
		<dc:creator>Radhika</dc:creator>
		<pubDate>Thu, 26 Aug 2010 15:28:00 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-10329</guid>
		<description>Hi Anshoo,
Hope you are doing good.
Can you help me with environment variables in qtp? Actually i know what are those but can you give me one example using flight reservation like how it can be really used among different reusable actions.
I keep on reading on net that envt variables can be used among different reusable actions keeping its value same throughout.
Kindly help.
Thanks in advance
Radhika</description>
		<content:encoded><![CDATA[<p>Hi Anshoo,<br />
Hope you are doing good.<br />
Can you help me with environment variables in qtp? Actually i know what are those but can you give me one example using flight reservation like how it can be really used among different reusable actions.<br />
I keep on reading on net that envt variables can be used among different reusable actions keeping its value same throughout.<br />
Kindly help.<br />
Thanks in advance<br />
Radhika</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-9959</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Thu, 05 Aug 2010 19:18:05 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-9959</guid>
		<description>Monica,

Try this:

&lt;pre&gt;
Browser(&quot;title:=A B A C U S – Recruitment.*&quot;).WpfTreeView(&quot;html id:=TreeControl1_mtrvDsasList&quot;).Select &quot;SR&quot;
&lt;/pre&gt;

Also, is this object a W&lt;strong&gt;b&lt;/strong&gt;fTreeView instead of W&lt;strong&gt;p&lt;/strong&gt;fTreeView?</description>
		<content:encoded><![CDATA[<p>Monica,</p>
<p>Try this:</p>
<pre>
Browser("title:=A B A C U S – Recruitment.*").WpfTreeView("html id:=TreeControl1_mtrvDsasList").Select "SR"
</pre>
<p>Also, is this object a W<strong>b</strong>fTreeView instead of W<strong>p</strong>fTreeView?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Monica</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-9947</link>
		<dc:creator>Monica</dc:creator>
		<pubDate>Thu, 05 Aug 2010 11:14:01 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-9947</guid>
		<description>i have written a code to select an element in the tree.Below mentioned is the code 
Set MyBrowser= Description.Create()
MyBrowser(&quot;title&quot;).value= &quot;A B A C U S - Recruitment - Windows Internet Explorer&quot;

Set MyPage = Description.Create()
MyPage(&quot;title&quot;).value = &quot;A B A C U S - Recruitment &quot;

Set MyFrame = Description.Create()
MyFrame(&quot;title&quot;).value = &quot;Contents&quot;

Set MyTree = Description.Create()
MyTree(&quot;html id&quot;).value = &quot;TreeControl1_mtrvDsasList&quot;
MyTree(&quot;innertext&quot;).value = &quot;SR&quot;

Browser(MyBrowser).Page(MyPage).Frame(MyFrame).WbfTreeView(&quot;html id = TreeControl1_mtrvDsasList&quot; , &quot;innertext = SR&quot; ).Select &quot;SR&quot;
Browser(MyBrowser).Page(MyPage).Frame(MyFrame).WbfTreeView(MyTree ).Select &quot;SR&quot;
it does not identify tree in Frame
It gives error as &quot;Object doesn&#039;t support this property or method: &#039;Browser(...).Page(...).Frame(...).WbfTreeView&#039;&quot;
Can you pls tell me the possible reason for the same</description>
		<content:encoded><![CDATA[<p>i have written a code to select an element in the tree.Below mentioned is the code<br />
Set MyBrowser= Description.Create()<br />
MyBrowser(&#8220;title&#8221;).value= &#8220;A B A C U S &#8211; Recruitment &#8211; Windows Internet Explorer&#8221;</p>
<p>Set MyPage = Description.Create()<br />
MyPage(&#8220;title&#8221;).value = &#8220;A B A C U S &#8211; Recruitment &#8221;</p>
<p>Set MyFrame = Description.Create()<br />
MyFrame(&#8220;title&#8221;).value = &#8220;Contents&#8221;</p>
<p>Set MyTree = Description.Create()<br />
MyTree(&#8220;html id&#8221;).value = &#8220;TreeControl1_mtrvDsasList&#8221;<br />
MyTree(&#8220;innertext&#8221;).value = &#8220;SR&#8221;</p>
<p>Browser(MyBrowser).Page(MyPage).Frame(MyFrame).WbfTreeView(&#8220;html id = TreeControl1_mtrvDsasList&#8221; , &#8220;innertext = SR&#8221; ).Select &#8220;SR&#8221;<br />
Browser(MyBrowser).Page(MyPage).Frame(MyFrame).WbfTreeView(MyTree ).Select &#8220;SR&#8221;<br />
it does not identify tree in Frame<br />
It gives error as &#8220;Object doesn&#8217;t support this property or method: &#8216;Browser(&#8230;).Page(&#8230;).Frame(&#8230;).WbfTreeView&#8217;&#8221;<br />
Can you pls tell me the possible reason for the same</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-9724</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Wed, 14 Jul 2010 20:26:52 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-9724</guid>
		<description>This can be accomplished through the following VBScript functions/methods: &lt;code&gt;Left&lt;/code&gt;, &lt;code&gt;Right&lt;/code&gt;, &lt;code&gt;Mid&lt;/code&gt;, &lt;code&gt;DateDiff&lt;/code&gt;, &lt;code&gt;Date&lt;/code&gt;, &lt;code&gt;Day&lt;/code&gt;. You can choose a mix of them to get this task done.

If you need further assistance, I would strongly suggest you to download the first chapter (Basic VBScript) from Dani&#039;s Book. It can be found &lt;a href=&quot;http://www.advancedqtp.com/knowledge-base/scripting-qtp/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. Note: You must register with AdvancedQTP to view this material.</description>
		<content:encoded><![CDATA[<p>This can be accomplished through the following VBScript functions/methods: <code>Left</code>, <code>Right</code>, <code>Mid</code>, <code>DateDiff</code>, <code>Date</code>, <code>Day</code>. You can choose a mix of them to get this task done.</p>
<p>If you need further assistance, I would strongly suggest you to download the first chapter (Basic VBScript) from Dani&#8217;s Book. It can be found <a href="http://www.advancedqtp.com/knowledge-base/scripting-qtp/" rel="nofollow">here</a>. Note: You must register with AdvancedQTP to view this material.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: QTPLearner</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-9713</link>
		<dc:creator>QTPLearner</dc:creator>
		<pubDate>Wed, 14 Jul 2010 14:30:59 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-9713</guid>
		<description>Hi Anshoo,
How to validate date with the requirements like date should not be less than current date, should have day between 1 and 31, month between 1 and 12 and valid year starting with 20.
Kindly help.
Thanks</description>
		<content:encoded><![CDATA[<p>Hi Anshoo,<br />
How to validate date with the requirements like date should not be less than current date, should have day between 1 and 31, month between 1 and 12 and valid year starting with 20.<br />
Kindly help.<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-6387</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Wed, 26 May 2010 13:11:41 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-6387</guid>
		<description>That part of the loop can be controlled by the following:

&lt;pre&gt;
Do 
	var = InputBox(&quot;Enter Tickets&quot;)
	If var &lt; 10 And var &gt; 0 Then Exit Do
Loop
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>That part of the loop can be controlled by the following:</p>
<pre>
Do
	var = InputBox("Enter Tickets")
	If var < 10 And var > 0 Then Exit Do
Loop
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vrinda</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-4686</link>
		<dc:creator>Vrinda</dc:creator>
		<pubDate>Tue, 18 May 2010 14:39:51 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-4686</guid>
		<description>Hi Anshoo,
I need your help to solve one problem. I am beginner with QTP and trying to write a script for following scenario.
With default flight application, started recording and entered invalid number in Tickets field. There was a pop-up error message which i handled using if loop. Tickets am entering using inputbox. What i want is that i can enter invalid ticket number any number of times i want and should continue. 
When i enter ticket less then 10 it should continue further.

var1=inputbox(&quot;Enter Tickets&quot;)
Window(&quot;Flight Reservation&quot;).WinEdit(&quot;Tickets:&quot;).Set var1
&#039;When &quot;Insert order&quot; is clicked, error message is populated for Tickets.
Window(&quot;Flight Reservation&quot;).WinRadioButton(&quot;Business&quot;).Set
Window(&quot;Flight Reservation&quot;).WinButton(&quot;Insert Order&quot;).Click
If var1&gt;10 Then
If Window(&quot;Flight Reservation&quot;).Dialog(&quot;Flight Reservations&quot;).Exist Then
	Window(&quot;Flight Reservation&quot;).Dialog(&quot;Flight Reservations&quot;).WinButton(&quot;OK&quot;).Click
	Window(&quot;Flight Reservation&quot;).WinRadioButton(&quot;Business&quot;).Set
	Window(&quot;Flight Reservation&quot;).WinButton(&quot;Insert Order&quot;).Click
End if
End If
Window(&quot;Flight Reservation&quot;).WinMenu(&quot;Menu&quot;).Select &quot;File;New Order&quot;

Kindly help.
Vrinda</description>
		<content:encoded><![CDATA[<p>Hi Anshoo,<br />
I need your help to solve one problem. I am beginner with QTP and trying to write a script for following scenario.<br />
With default flight application, started recording and entered invalid number in Tickets field. There was a pop-up error message which i handled using if loop. Tickets am entering using inputbox. What i want is that i can enter invalid ticket number any number of times i want and should continue.<br />
When i enter ticket less then 10 it should continue further.</p>
<p>var1=inputbox(&#8220;Enter Tickets&#8221;)<br />
Window(&#8220;Flight Reservation&#8221;).WinEdit(&#8220;Tickets:&#8221;).Set var1<br />
&#8216;When &#8220;Insert order&#8221; is clicked, error message is populated for Tickets.<br />
Window(&#8220;Flight Reservation&#8221;).WinRadioButton(&#8220;Business&#8221;).Set<br />
Window(&#8220;Flight Reservation&#8221;).WinButton(&#8220;Insert Order&#8221;).Click<br />
If var1&gt;10 Then<br />
If Window(&#8220;Flight Reservation&#8221;).Dialog(&#8220;Flight Reservations&#8221;).Exist Then<br />
	Window(&#8220;Flight Reservation&#8221;).Dialog(&#8220;Flight Reservations&#8221;).WinButton(&#8220;OK&#8221;).Click<br />
	Window(&#8220;Flight Reservation&#8221;).WinRadioButton(&#8220;Business&#8221;).Set<br />
	Window(&#8220;Flight Reservation&#8221;).WinButton(&#8220;Insert Order&#8221;).Click<br />
End if<br />
End If<br />
Window(&#8220;Flight Reservation&#8221;).WinMenu(&#8220;Menu&#8221;).Select &#8220;File;New Order&#8221;</p>
<p>Kindly help.<br />
Vrinda</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Radha</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-3378</link>
		<dc:creator>Radha</dc:creator>
		<pubDate>Mon, 03 May 2010 02:36:01 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-3378</guid>
		<description>Hi Anshoo,

Typo mistake....for above elseif statement, 
elseif uname = &#039;invalid username&#039; or Password = &#039;invalid Password&#039; then 
     msgbox &quot;Username or Password are invalid&quot;

The method that you have explained in section above seems to be much easier to understand and also in systematic way. That is first checking whether webedit, buttons, etc exists and then checking for there validations. I think i&#039;ll go with above script of yours and execute. 
Doing a very good job for a beginner like me... Thanks a lot.

Radha</description>
		<content:encoded><![CDATA[<p>Hi Anshoo,</p>
<p>Typo mistake&#8230;.for above elseif statement,<br />
elseif uname = &#8216;invalid username&#8217; or Password = &#8216;invalid Password&#8217; then<br />
     msgbox &#8220;Username or Password are invalid&#8221;</p>
<p>The method that you have explained in section above seems to be much easier to understand and also in systematic way. That is first checking whether webedit, buttons, etc exists and then checking for there validations. I think i&#8217;ll go with above script of yours and execute.<br />
Doing a very good job for a beginner like me&#8230; Thanks a lot.</p>
<p>Radha</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-3374</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Sun, 02 May 2010 17:39:39 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-3374</guid>
		<description>After the following lines are executed:

&lt;pre&gt;
Browser(&quot;&quot;).Page(&quot;&quot;).WebEdit(&quot;Username&quot;).set &quot;Parameterized values as shown in table below&quot;
Browser(&quot;&quot;).Page(&quot;&quot;).WebEdit(&quot;Password&quot;).set &quot;Parameterized values as shown in table below&quot;
&lt;/pre&gt;

As long as the maxLength property of the WebEdits is not 0, something will definitely be set. Therefore, the following statement:

&lt;pre&gt;
if Uname =&quot;&quot; and Password = &quot;&quot; then
&lt;/pre&gt;

can only be true if nothing was set, or the properties supplied were incorrect. For the latter, its better to use &lt;code&gt;.Exist&lt;/code&gt; instead. Don&#039;t think I understand the following statement though:

&lt;pre&gt;
elseif Uname  &#039;valid username&#039; or Password &#039;valid Password&#039; then
  msgbox &quot;Username or Password are invalid&quot;
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>After the following lines are executed:</p>
<pre>
Browser("").Page("").WebEdit("Username").set "Parameterized values as shown in table below"
Browser("").Page("").WebEdit("Password").set "Parameterized values as shown in table below"
</pre>
<p>As long as the maxLength property of the WebEdits is not 0, something will definitely be set. Therefore, the following statement:</p>
<pre>
if Uname ="" and Password = "" then
</pre>
<p>can only be true if nothing was set, or the properties supplied were incorrect. For the latter, its better to use <code>.Exist</code> instead. Don&#8217;t think I understand the following statement though:</p>
<pre>
elseif Uname  'valid username' or Password 'valid Password' then
  msgbox "Username or Password are invalid"
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Radha</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-3353</link>
		<dc:creator>Radha</dc:creator>
		<pubDate>Fri, 30 Apr 2010 10:34:02 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-3353</guid>
		<description>Hi Anshoo,

Good post on DP. I have prepared one script which validates username and password field using mercury&#039;s default website. Can you please see and let me know if m going on correct path?

Script is as below:

&lt;pre&gt;
Systemutil.Run &quot;iexplore&quot;, &quot;http://newtours.demount.com/&quot;

Browser(&quot;&quot;).Page(&quot;&quot;).WebEdit(&quot;Username&quot;).set &quot;Parameterized values as shown in table below&quot;
Browser(&quot;&quot;).Page(&quot;&quot;).WebEdit(&quot;Password&quot;).set &quot;Parameterized values as shown in table below&quot;

&#039;Usign GetRoProperty to get value from table.
Uname = Browser(&quot;&quot;).Page(&quot;&quot;).WebEdit(&quot;Username&quot;).GetRoProperty(&quot;value&quot;)
Password = Browser(&quot;&quot;).Page(&quot;&quot;).WebEdit(&quot;Password&quot;).GetRoProperty(&quot;value&quot;)

Browser(&quot;&quot;).Page(&quot;&quot;).Image(&quot;Sing in&quot;).click 48,39

if Uname =&quot;&quot; and Password = &quot;&quot; then
  msgbox &quot;Please enter Username and Password&quot;)

elseif Uname  &#039;valid username&#039; or Password &#039;valid Password&#039; then
  msgbox &quot;Username or Password are invalid&quot;

elseif Uname = &#039;valid&#039; and Password = &#039;valid&#039; then
  msgbox &quot;Login successful&quot;

End if
&lt;/pre&gt;

Table:

&lt;pre&gt;
Username	Password
1. abc	abc(invalid)
2. Blank	Blank
3. Valid	valid
&lt;/pre&gt;

Thanks,
Radha</description>
		<content:encoded><![CDATA[<p>Hi Anshoo,</p>
<p>Good post on DP. I have prepared one script which validates username and password field using mercury&#8217;s default website. Can you please see and let me know if m going on correct path?</p>
<p>Script is as below:</p>
<pre>
Systemutil.Run "iexplore", "http://newtours.demount.com/"

Browser("").Page("").WebEdit("Username").set "Parameterized values as shown in table below"
Browser("").Page("").WebEdit("Password").set "Parameterized values as shown in table below"

'Usign GetRoProperty to get value from table.
Uname = Browser("").Page("").WebEdit("Username").GetRoProperty("value")
Password = Browser("").Page("").WebEdit("Password").GetRoProperty("value")

Browser("").Page("").Image("Sing in").click 48,39

if Uname ="" and Password = "" then
  msgbox "Please enter Username and Password")

elseif Uname  'valid username' or Password 'valid Password' then
  msgbox "Username or Password are invalid"

elseif Uname = 'valid' and Password = 'valid' then
  msgbox "Login successful"

End if
</pre>
<p>Table:</p>
<pre>
Username	Password
1. abc	abc(invalid)
2. Blank	Blank
3. Valid	valid
</pre>
<p>Thanks,<br />
Radha</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neelakantan G S</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-2987</link>
		<dc:creator>Neelakantan G S</dc:creator>
		<pubDate>Wed, 14 Apr 2010 06:30:55 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-2987</guid>
		<description>HI Anshoo,

 I like the way you explain the DP. You broke my bad assumptions on descriptive programming.

Cheers,
Neelakantan G S</description>
		<content:encoded><![CDATA[<p>HI Anshoo,</p>
<p> I like the way you explain the DP. You broke my bad assumptions on descriptive programming.</p>
<p>Cheers,<br />
Neelakantan G S</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-2975</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Tue, 13 Apr 2010 18:56:31 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-2975</guid>
		<description>Balaji, why don&#039;t you use the &lt;code&gt;GetCellData&lt;/code&gt; method of the WebTable instead? A WebElement is generally some text in a Web Application, and using &lt;code&gt;GetCellData&lt;/code&gt;, you will be able to retrieve that test regardless of how many times it appears in your application.</description>
		<content:encoded><![CDATA[<p>Balaji, why don&#8217;t you use the <code>GetCellData</code> method of the WebTable instead? A WebElement is generally some text in a Web Application, and using <code>GetCellData</code>, you will be able to retrieve that test regardless of how many times it appears in your application.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-2974</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Tue, 13 Apr 2010 18:55:21 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-2974</guid>
		<description>Its a Notepad window, correct? Shouldn&#039;t be a WinList object, then.</description>
		<content:encoded><![CDATA[<p>Its a Notepad window, correct? Shouldn&#8217;t be a WinList object, then.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Balaji</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-2960</link>
		<dc:creator>Balaji</dc:creator>
		<pubDate>Mon, 12 Apr 2010 12:06:23 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-2960</guid>
		<description>Hi,
I have webtable which size 7 column and 4 rows.
Each row i have set of webelements.
I am using checkpoints for checking whether the webelements are there ?
My problem is that , webelement property of one row is similar to other , so it says multiple objects found with the same property.
could you please tell me whether ordianl identifier can use in the checkpoint?
if so please let me konw?</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I have webtable which size 7 column and 4 rows.<br />
Each row i have set of webelements.<br />
I am using checkpoints for checking whether the webelements are there ?<br />
My problem is that , webelement property of one row is similar to other , so it says multiple objects found with the same property.<br />
could you please tell me whether ordianl identifier can use in the checkpoint?<br />
if so please let me konw?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Achu</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-2382</link>
		<dc:creator>Achu</dc:creator>
		<pubDate>Wed, 24 Feb 2010 04:47:22 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-2382</guid>
		<description>Hi Anshoo

The code doesn&#039;t work.I implement the code but it doesn&#039;t work.
 &quot;Enter&quot; through keyboard is not possible.
Only Mouse click is possible and it is only possible to the 3rd column in the row(0).
If we click any where else in the row,it will not work.
The new window will come only if we click the 3rd column.
If i can post any screenshot here,I will post my application&#039;s screenshot,so that u can understand better.

Thanks &amp;regards
achu</description>
		<content:encoded><![CDATA[<p>Hi Anshoo</p>
<p>The code doesn&#8217;t work.I implement the code but it doesn&#8217;t work.<br />
 &#8220;Enter&#8221; through keyboard is not possible.<br />
Only Mouse click is possible and it is only possible to the 3rd column in the row(0).<br />
If we click any where else in the row,it will not work.<br />
The new window will come only if we click the 3rd column.<br />
If i can post any screenshot here,I will post my application&#8217;s screenshot,so that u can understand better.</p>
<p>Thanks &amp;regards<br />
achu</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-2372</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Tue, 23 Feb 2010 03:51:07 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-2372</guid>
		<description>Anshoo,

Thank you very much for the reply.I am sorry for the late reply.
I will implement ur code,in my code and will tell the result.
Thans once again.

Thanks&amp;Regards
achu</description>
		<content:encoded><![CDATA[<p>Anshoo,</p>
<p>Thank you very much for the reply.I am sorry for the late reply.<br />
I will implement ur code,in my code and will tell the result.<br />
Thans once again.</p>
<p>Thanks&amp;Regards<br />
achu</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-2318</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Fri, 19 Feb 2010 15:31:39 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-2318</guid>
		<description>Achu, 

I found the code I had written for my application:

&lt;pre&gt;
sText = &quot;TestTOFind&quot;
	
&#039;Insert Dialog description below
With Dialog(&quot;&quot;)

	&#039;Get total number of items in the WinListView
	iItemsCnt = .WinListView(&quot;window id:=1&quot;).GetItemsCount
	
	&#039;Start searching from the most recent (bottom-most) item to the oldest item
	For ix = iItemsCnt - 1 to 1 Step - 1
		
		&#039;Activate the row
		.WinListView(&quot;window id:=1&quot;).Activate ix
		
		If Dialog(&quot;&quot;, &quot;regexpwndtitle:=&quot; &amp; sText).Exist(1) Then
			Set oWScript = CreateObject(&quot;WScript.Shell&quot;)
			oWScript.SendKeys &quot;{ENTER}&quot;
			Exit For
		End If
		
	Next

End With
&lt;/pre&gt;

Its very similar to what you have there..</description>
		<content:encoded><![CDATA[<p>Achu, </p>
<p>I found the code I had written for my application:</p>
<pre>
sText = "TestTOFind"

'Insert Dialog description below
With Dialog("")

	'Get total number of items in the WinListView
	iItemsCnt = .WinListView("window id:=1").GetItemsCount

	'Start searching from the most recent (bottom-most) item to the oldest item
	For ix = iItemsCnt - 1 to 1 Step - 1

		'Activate the row
		.WinListView("window id:=1").Activate ix

		If Dialog("", "regexpwndtitle:=" &amp; sText).Exist(1) Then
			Set oWScript = CreateObject("WScript.Shell")
			oWScript.SendKeys "{ENTER}"
			Exit For
		End If

	Next

End With
</pre>
<p>Its very similar to what you have there..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Achu</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-2306</link>
		<dc:creator>Achu</dc:creator>
		<pubDate>Fri, 19 Feb 2010 08:11:54 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-2306</guid>
		<description>Hi Anshoo,

I  don&#039;t know exactly but I think &#039;Flight Reservation Table&#039; is also a WinList View object.Is it?

Thanks&amp;Regards
achu</description>
		<content:encoded><![CDATA[<p>Hi Anshoo,</p>
<p>I  don&#8217;t know exactly but I think &#8216;Flight Reservation Table&#8217; is also a WinList View object.Is it?</p>
<p>Thanks&amp;Regards<br />
achu</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Achu</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-2305</link>
		<dc:creator>Achu</dc:creator>
		<pubDate>Fri, 19 Feb 2010 08:05:35 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-2305</guid>
		<description>Hi Anshoo,
Thank you very much for the reply.

Currently I had one application with me,That is &quot;Scan to Email Setup&quot;wizard.
I think in Medical field applications ,we can see such type of schenario.
I &#039;m not remembering any other application,
I try to post a screenshot of the application,but I can&#039;t.
I think if that is possible the scenario will be very easy to understand.
I will try once again and will get back to you soon.

Thanks&amp;Regards
dhanya</description>
		<content:encoded><![CDATA[<p>Hi Anshoo,<br />
Thank you very much for the reply.</p>
<p>Currently I had one application with me,That is &#8220;Scan to Email Setup&#8221;wizard.<br />
I think in Medical field applications ,we can see such type of schenario.<br />
I &#8216;m not remembering any other application,<br />
I try to post a screenshot of the application,but I can&#8217;t.<br />
I think if that is possible the scenario will be very easy to understand.<br />
I will try once again and will get back to you soon.</p>
<p>Thanks&amp;Regards<br />
dhanya</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-2304</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Fri, 19 Feb 2010 07:21:48 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-2304</guid>
		<description>Hi Achu,

It might be hard for me to reproduce this scenario, but from what I remember about WinListViews, there is a technique that can enable you to traverse through each row depending upon the column of focus. I don&#039;t quite remember how I did it before.. I will try to find an application with such an object and only then would I be able to provide with a solution. 

Achu, is there any application that you could suggest that would enable me to have access to a WinListView object?</description>
		<content:encoded><![CDATA[<p>Hi Achu,</p>
<p>It might be hard for me to reproduce this scenario, but from what I remember about WinListViews, there is a technique that can enable you to traverse through each row depending upon the column of focus. I don&#8217;t quite remember how I did it before.. I will try to find an application with such an object and only then would I be able to provide with a solution. </p>
<p>Achu, is there any application that you could suggest that would enable me to have access to a WinListView object?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-2294</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Fri, 19 Feb 2010 06:17:09 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-2294</guid>
		<description>Thank you, Achu :)</description>
		<content:encoded><![CDATA[<p>Thank you, Achu :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Achu</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-2281</link>
		<dc:creator>Achu</dc:creator>
		<pubDate>Thu, 18 Feb 2010 10:56:57 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-2281</guid>
		<description>Hi Anshoo,

How can we click an item in a listbox using Dp?

The dialog box contains a listbox.In that there are 4 columns and rows.
I had to click in the 3rd column&#039;s item.

I had searched for the script in many sites.I didn&#039;t get any answer.
Finally I had done low level recording.From that I get the item&#039;s positon&#039;s value,but it is not the exact &#039;x &amp; y&#039; value.
And  I had put that value in Script,it works.

My code is like this
&quot;Dialog(&quot;text:=HP Scan to E-mail Setup Wizard&quot;).WinListView(&quot;window id:=1093&quot;).Click 454,27
  Dialog(&quot;text:=HP Scan to E-mail Setup Wizard&quot;).Dialog(&quot;text:Dialog&quot;).WinButton(&quot;text:Show Send Log&quot;).Click&quot;

But I know,it is depend upon the machine.

So can you suggest any other alternative method for doing that...

thanks
achu</description>
		<content:encoded><![CDATA[<p>Hi Anshoo,</p>
<p>How can we click an item in a listbox using Dp?</p>
<p>The dialog box contains a listbox.In that there are 4 columns and rows.<br />
I had to click in the 3rd column&#8217;s item.</p>
<p>I had searched for the script in many sites.I didn&#8217;t get any answer.<br />
Finally I had done low level recording.From that I get the item&#8217;s positon&#8217;s value,but it is not the exact &#8216;x &amp; y&#8217; value.<br />
And  I had put that value in Script,it works.</p>
<p>My code is like this<br />
&#8220;Dialog(&#8220;text:=HP Scan to E-mail Setup Wizard&#8221;).WinListView(&#8220;window id:=1093&#8243;).Click 454,27<br />
  Dialog(&#8220;text:=HP Scan to E-mail Setup Wizard&#8221;).Dialog(&#8220;text:Dialog&#8221;).WinButton(&#8220;text:Show Send Log&#8221;).Click&#8221;</p>
<p>But I know,it is depend upon the machine.</p>
<p>So can you suggest any other alternative method for doing that&#8230;</p>
<p>thanks<br />
achu</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Achu</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-2280</link>
		<dc:creator>Achu</dc:creator>
		<pubDate>Thu, 18 Feb 2010 10:21:22 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-2280</guid>
		<description>Hi Anshoo,

Thanks a lot for such a wonderful discription on descriptive programming in a very easy manner.
Your explanation to questions asked was simply super.</description>
		<content:encoded><![CDATA[<p>Hi Anshoo,</p>
<p>Thanks a lot for such a wonderful discription on descriptive programming in a very easy manner.<br />
Your explanation to questions asked was simply super.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-2248</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Mon, 15 Feb 2010 17:39:43 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-2248</guid>
		<description>Okay, Renu. I will try to post an article soon on either the application you mentioned or ways of automating a Web Application, mainly GMail. There is, however, an article on automation &lt;a href=&quot;http://relevantcodes.com/automating-windows-calculator-part-1/&quot; rel=&quot;nofollow&quot;&gt;Windows Calculator&lt;/a&gt; on &lt;a href=&quot;http://relevantcodes.com//&quot; rel=&quot;nofollow&quot;&gt;Relevant Codes&lt;/a&gt; which you might find helpful.</description>
		<content:encoded><![CDATA[<p>Okay, Renu. I will try to post an article soon on either the application you mentioned or ways of automating a Web Application, mainly GMail. There is, however, an article on automation <a href="http://relevantcodes.com/automating-windows-calculator-part-1/" rel="nofollow">Windows Calculator</a> on <a href="http://relevantcodes.com//" rel="nofollow">Relevant Codes</a> which you might find helpful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Renu Bajaj</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-2241</link>
		<dc:creator>Renu Bajaj</dc:creator>
		<pubDate>Sun, 14 Feb 2010 12:20:21 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-2241</guid>
		<description>Hi  Anshoo,

You can send anwser in this site itself so other can also take advantage.

Bye
Renu</description>
		<content:encoded><![CDATA[<p>Hi  Anshoo,</p>
<p>You can send anwser in this site itself so other can also take advantage.</p>
<p>Bye<br />
Renu</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Renu Bajaj</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-2240</link>
		<dc:creator>Renu Bajaj</dc:creator>
		<pubDate>Sun, 14 Feb 2010 12:13:10 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-2240</guid>
		<description>Hi Anshoo, 
Thanks for your prompt reply. can you pls give me the same kind of example for the windows application(Flight) so i&#039;ll get idea how these windows objects works and what is the hierarchy of objects.

Thanks in advance
Renu :-)</description>
		<content:encoded><![CDATA[<p>Hi Anshoo,<br />
Thanks for your prompt reply. can you pls give me the same kind of example for the windows application(Flight) so i&#8217;ll get idea how these windows objects works and what is the hierarchy of objects.</p>
<p>Thanks in advance<br />
Renu :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-2213</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Thu, 11 Feb 2010 19:19:54 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-2213</guid>
		<description>Hi Renu,

What you see in these articles on RelevantCodes and on other websites detail pretty much everything that is relevant to know about Descriptive Programming. You have an excellent background for this field, and there are a handful of people with strong development background and I am sure you&#039;ll do fantastic work. 

Good luck! :)</description>
		<content:encoded><![CDATA[<p>Hi Renu,</p>
<p>What you see in these articles on RelevantCodes and on other websites detail pretty much everything that is relevant to know about Descriptive Programming. You have an excellent background for this field, and there are a handful of people with strong development background and I am sure you&#8217;ll do fantastic work. </p>
<p>Good luck! :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Renu Bajaj</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-2209</link>
		<dc:creator>Renu Bajaj</dc:creator>
		<pubDate>Thu, 11 Feb 2010 18:18:06 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-2209</guid>
		<description>Thanks a lot for such a wonderful discription on descriptive programming in a very easy manner. Anshoo, I ve 6 yrs for exp in programming in VB and  .Net  but i m new in testing especially in QTP programming. pls help me to learn it  in a fast mode with some great example of code of descriptive programming.

Thanks in Advance
Renu</description>
		<content:encoded><![CDATA[<p>Thanks a lot for such a wonderful discription on descriptive programming in a very easy manner. Anshoo, I ve 6 yrs for exp in programming in VB and  .Net  but i m new in testing especially in QTP programming. pls help me to learn it  in a fast mode with some great example of code of descriptive programming.</p>
<p>Thanks in Advance<br />
Renu</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-1997</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Tue, 26 Jan 2010 16:04:05 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-1997</guid>
		<description>Hi Puneet,

The below statement is invalid:

&lt;pre&gt;
username = NewUser = ‘provider’
&lt;/pre&gt;

What the above statement means is, &lt;code&gt;username&lt;/code&gt; is a boolean value that evaluates &lt;code&gt;NewUser = &#039;Provider&#039;&lt;/code&gt;. It should be this instead:

&lt;pre&gt;
userName = NewUser
&lt;/pre&gt;
&lt;pre&gt;
userName = &quot;provider&quot;
&lt;/pre&gt;

The rest of the code should be this:

&lt;pre&gt;
If SwfWindow(&quot;HA – You are currently&quot;).SwfWindow(&quot;Add User&quot;).Dialog(&quot;HA – [Acknowledgement]&quot;).Exist Then
	Reporter.ReportEvent micPass, &quot;Verify the user has been added&quot;, &quot;The &quot; &amp;username &quot;successfully has been added&quot;
	SwfWindow(&quot;HA – You are currently&quot;).SwfWindow(&quot;Add User&quot;).Dialog(&quot;HA – [Acknowledgement]&quot;).WinButton(&quot;OK&quot;).Click
End If
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Hi Puneet,</p>
<p>The below statement is invalid:</p>
<pre>
username = NewUser = ‘provider’
</pre>
<p>What the above statement means is, <code>username</code> is a boolean value that evaluates <code>NewUser = 'Provider'</code>. It should be this instead:</p>
<pre>
userName = NewUser
</pre>
<pre>
userName = "provider"
</pre>
<p>The rest of the code should be this:</p>
<pre>
If SwfWindow("HA – You are currently").SwfWindow("Add User").Dialog("HA – [Acknowledgement]").Exist Then
	Reporter.ReportEvent micPass, "Verify the user has been added", "The " &#038;username "successfully has been added"
	SwfWindow("HA – You are currently").SwfWindow("Add User").Dialog("HA – [Acknowledgement]").WinButton("OK").Click
End If
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Puneet Varma</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-1988</link>
		<dc:creator>Puneet Varma</dc:creator>
		<pubDate>Mon, 25 Jan 2010 18:59:24 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-1988</guid>
		<description>Hi,

When i input a new user then the reporter.event should display the new user.  I have indicated &amp;username which indicated in my script.  I know I am definitely doing something wrong. Any help will greatly appreciate it.

Dim username
username = NewUser = &#039;provider&#039;

SwfWindow(&quot;HA - You are currently&quot;).SwfWindow(&quot;Add User&quot;).Dialog(&quot;HA - [Acknowledgement]&quot;).Exist Then 
Reporter.ReportEvent micPass, &quot;Verify the user has been added&quot;, &quot;The &quot; &amp;username  &quot;successfully has been added&quot;
SwfWindow(&quot;HA - You are currently&quot;).SwfWindow(&quot;Add User&quot;).Dialog(&quot;HA - [Acknowledgement]&quot;).WinButton(&quot;OK&quot;).Click
								Exit For</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>When i input a new user then the reporter.event should display the new user.  I have indicated &amp;username which indicated in my script.  I know I am definitely doing something wrong. Any help will greatly appreciate it.</p>
<p>Dim username<br />
username = NewUser = &#8216;provider&#8217;</p>
<p>SwfWindow(&#8220;HA &#8211; You are currently&#8221;).SwfWindow(&#8220;Add User&#8221;).Dialog(&#8220;HA &#8211; [Acknowledgement]&#8220;).Exist Then<br />
Reporter.ReportEvent micPass, &#8220;Verify the user has been added&#8221;, &#8220;The &#8221; &amp;username  &#8220;successfully has been added&#8221;<br />
SwfWindow(&#8220;HA &#8211; You are currently&#8221;).SwfWindow(&#8220;Add User&#8221;).Dialog(&#8220;HA &#8211; [Acknowledgement]&#8220;).WinButton(&#8220;OK&#8221;).Click<br />
								Exit For</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-1285</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Fri, 27 Nov 2009 16:16:35 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-1285</guid>
		<description>At the flight confirmation page, you can use the following regex string for the WebElement to identify it:

&lt;pre&gt;
Browser(&quot;title:=Flight.*&quot;).WebElement(&quot;innertext:=\D+ to \D+&quot;, &quot;index:=0&quot;).Highlight
Browser(&quot;title:=Flight.*&quot;).WebElement(&quot;innertext:=\D+ to \D+&quot;, &quot;index:=1&quot;).Highlight
&lt;/pre&gt;

If you would like to retrieve the text:

&lt;pre&gt;
MsgBox Browser(&quot;title:=Flight.*&quot;).WebElement(&quot;innertext:=\D+ to \D+&quot;, &quot;index:=0&quot;)_
    .GetROProperty(&quot;innertext&quot;)
MsgBox Browser(&quot;title:=Flight.*&quot;).WebElement(&quot;innertext:=\D+ to \D+&quot;, &quot;index:=1&quot;)_
    .GetROProperty(&quot;innertext&quot;)
&lt;/pre&gt;

This would be custom checkpoint though. However, you can use the exact same regex to identify the text in the flight confirmation page through Object Repository also.</description>
		<content:encoded><![CDATA[<p>At the flight confirmation page, you can use the following regex string for the WebElement to identify it:</p>
<pre>
Browser("title:=Flight.*").WebElement("innertext:=\D+ to \D+", "index:=0").Highlight
Browser("title:=Flight.*").WebElement("innertext:=\D+ to \D+", "index:=1").Highlight
</pre>
<p>If you would like to retrieve the text:</p>
<pre>
MsgBox Browser("title:=Flight.*").WebElement("innertext:=\D+ to \D+", "index:=0")_
    .GetROProperty("innertext")
MsgBox Browser("title:=Flight.*").WebElement("innertext:=\D+ to \D+", "index:=1")_
    .GetROProperty("innertext")
</pre>
<p>This would be custom checkpoint though. However, you can use the exact same regex to identify the text in the flight confirmation page through Object Repository also.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Satishkumar Dega</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-1281</link>
		<dc:creator>Satishkumar Dega</dc:creator>
		<pubDate>Fri, 27 Nov 2009 05:07:21 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-1281</guid>
		<description>Hi Anshoo,
I tried that one but it failing I din&#039;t understand can you give me one example and explain that one plz</description>
		<content:encoded><![CDATA[<p>Hi Anshoo,<br />
I tried that one but it failing I din&#8217;t understand can you give me one example and explain that one plz</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raju N</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-1280</link>
		<dc:creator>Raju N</dc:creator>
		<pubDate>Fri, 27 Nov 2009 04:25:10 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-1280</guid>
		<description>Hi Anshoo,
Thank you so much for your kind help.Whenever i posted question,you replied very soon.really i am proud of you sir</description>
		<content:encoded><![CDATA[<p>Hi Anshoo,<br />
Thank you so much for your kind help.Whenever i posted question,you replied very soon.really i am proud of you sir</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-1272</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Thu, 26 Nov 2009 16:04:53 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-1272</guid>
		<description>Hi Raju,

Please read the &lt;a href=&quot;http://www.ibm.com/developerworks/rational/library/591.html&quot; rel=&quot;nofollow&quot;&gt;following document&lt;/a&gt; which describes different types of frameworks, with examples. My framework will be available in a few weeks, and I think that may serve as an example you are looking for. Its a conceptual framework, meaning, it contains concepts from several different frameworks and methodologies which may help people new to framework development understand the principles behind creating a good architecture.

Good luck :)</description>
		<content:encoded><![CDATA[<p>Hi Raju,</p>
<p>Please read the <a href="http://www.ibm.com/developerworks/rational/library/591.html" rel="nofollow">following document</a> which describes different types of frameworks, with examples. My framework will be available in a few weeks, and I think that may serve as an example you are looking for. Its a conceptual framework, meaning, it contains concepts from several different frameworks and methodologies which may help people new to framework development understand the principles behind creating a good architecture.</p>
<p>Good luck :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-1271</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Thu, 26 Nov 2009 16:02:07 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-1271</guid>
		<description>Hi Satishkumar,

As you said, if the date changes (which it will), your test will fail. Such situations are good candidates for regular expressions or parameterization. What you would need to do here is, instead of using a static date for your CheckPoint, you would have to use a dynamic date. Now, this date value can come from the DataTable, or it can be a Regular Expression. Can you try either of the 2 options and see which one works better? If you have any questions, please feel free to ask.</description>
		<content:encoded><![CDATA[<p>Hi Satishkumar,</p>
<p>As you said, if the date changes (which it will), your test will fail. Such situations are good candidates for regular expressions or parameterization. What you would need to do here is, instead of using a static date for your CheckPoint, you would have to use a dynamic date. Now, this date value can come from the DataTable, or it can be a Regular Expression. Can you try either of the 2 options and see which one works better? If you have any questions, please feel free to ask.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raju N</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-1268</link>
		<dc:creator>Raju N</dc:creator>
		<pubDate>Thu, 26 Nov 2009 10:45:02 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-1268</guid>
		<description>HI Anshoo,
I am working in MNC.i got chance to work on the QTP.COuld you plese tell me how to prepare framework for an any realtime appliations.is there any standard to prepare it.Please give me an idea reg this.this will be a great if you explain this with an example.

Thanks,
Raju N</description>
		<content:encoded><![CDATA[<p>HI Anshoo,<br />
I am working in MNC.i got chance to work on the QTP.COuld you plese tell me how to prepare framework for an any realtime appliations.is there any standard to prepare it.Please give me an idea reg this.this will be a great if you explain this with an example.</p>
<p>Thanks,<br />
Raju N</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Satishkumar Dega</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-1251</link>
		<dc:creator>Satishkumar Dega</dc:creator>
		<pubDate>Wed, 25 Nov 2009 05:07:49 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-1251</guid>
		<description>Hi Anshoo,
I have one doubt can u clarify that one
The problem is I recoreded one test using mecury site and prameterize that test .
In data table global sheet I mention two columns like Dept_City and Arrival_City
In that I prameterise that one with two different values like
1.London to Paris
2.Portland to New York
In that I put one text checkpoint in the Select a Flight: Mercury page in the above values
First Iselected the London right click select the insert text check point it will open text chepoint poperties in 
Check that  London to  is displayed between     DEPART  and Paris.
1.London I am selecting parameter option I map that one to Dept_City in the datatable it is displying in this way
Check that  is displayed between     DEPART  and Paris.
2. After that I selected text after I mapped the paris value to Arrival_City in the datatable it is displaying like this way
Check that  is displayed between     DEPART  and .
In this case it is working fine in both two ierations but I am puting one text checkpoint in the arrival checking at the time I am getting error
Same steps I followed
I selected Paris rigt click and puting insert text check point it is displying in this way
Check that Paris is displayed between New York to  and 12/15/2009 
after that I select parameter option I meped the paris to Arrival_City in the datatable it is displayong like this way
Check that  is displayed between New York to  and 12/15/2009.
After that I selected text before I maped the New york to in the Dept_city in the data table it is displaying like this way
Check that  is displayed between  and 12/15/2009.
Here the problem is in last postion it is displaying date like &quot;12/15/2009&quot; the date is same in two ietarations there is no problem if the date is changed at the time the second ietaration is failed i did not under stand the proble wt is the problem can u explain this
the blelow is failed in second ietaration for ur reference
Text Checkpoint: captured &quot;&quot; between Portland and 12/15/2009 , expected &quot;New york&quot;
Match case: OFF
Exact match: OFF
Ignore spaces: ON</description>
		<content:encoded><![CDATA[<p>Hi Anshoo,<br />
I have one doubt can u clarify that one<br />
The problem is I recoreded one test using mecury site and prameterize that test .<br />
In data table global sheet I mention two columns like Dept_City and Arrival_City<br />
In that I prameterise that one with two different values like<br />
1.London to Paris<br />
2.Portland to New York<br />
In that I put one text checkpoint in the Select a Flight: Mercury page in the above values<br />
First Iselected the London right click select the insert text check point it will open text chepoint poperties in<br />
Check that  London to  is displayed between     DEPART  and Paris.<br />
1.London I am selecting parameter option I map that one to Dept_City in the datatable it is displying in this way<br />
Check that  is displayed between     DEPART  and Paris.<br />
2. After that I selected text after I mapped the paris value to Arrival_City in the datatable it is displaying like this way<br />
Check that  is displayed between     DEPART  and .<br />
In this case it is working fine in both two ierations but I am puting one text checkpoint in the arrival checking at the time I am getting error<br />
Same steps I followed<br />
I selected Paris rigt click and puting insert text check point it is displying in this way<br />
Check that Paris is displayed between New York to  and 12/15/2009<br />
after that I select parameter option I meped the paris to Arrival_City in the datatable it is displayong like this way<br />
Check that  is displayed between New York to  and 12/15/2009.<br />
After that I selected text before I maped the New york to in the Dept_city in the data table it is displaying like this way<br />
Check that  is displayed between  and 12/15/2009.<br />
Here the problem is in last postion it is displaying date like &#8220;12/15/2009&#8243; the date is same in two ietarations there is no problem if the date is changed at the time the second ietaration is failed i did not under stand the proble wt is the problem can u explain this<br />
the blelow is failed in second ietaration for ur reference<br />
Text Checkpoint: captured &#8220;&#8221; between Portland and 12/15/2009 , expected &#8220;New york&#8221;<br />
Match case: OFF<br />
Exact match: OFF<br />
Ignore spaces: ON</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-1235</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Mon, 23 Nov 2009 15:21:10 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-1235</guid>
		<description>Importing sheets to QTP are quite simple and this is how it can be done:

&lt;pre&gt;
DataTable.ImportSheet(FileName, SheetSource, SheetDest) 
&lt;/pre&gt;

Example:

&lt;pre&gt;
DataTable.ImportSheet &quot;C:\MyFile.xls&quot;, &quot;Sheet1&quot;, &quot;Action1&quot; 
&lt;/pre&gt;

As for functions, they can be called in QTP the exact same way as they&#039;re called in VBScript.</description>
		<content:encoded><![CDATA[<p>Importing sheets to QTP are quite simple and this is how it can be done:</p>
<pre>
DataTable.ImportSheet(FileName, SheetSource, SheetDest)
</pre>
<p>Example:</p>
<pre>
DataTable.ImportSheet "C:\MyFile.xls", "Sheet1", "Action1"
</pre>
<p>As for functions, they can be called in QTP the exact same way as they&#8217;re called in VBScript.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-1234</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Mon, 23 Nov 2009 15:17:32 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-1234</guid>
		<description>Hi Raju,

I haven&#039;t work on OpenOffice with either VBScript or QTP, so I am not sure how it is going to work. &lt;a href=&quot;http://www.kalitech.fr/clients/doc/VB_APIOOo_en.html&quot; rel=&quot;nofollow&quot;&gt;This post&lt;/a&gt; outlines several ways OpenOffice can work with VB and you can modify the code for your use. 

I am not sure how you can use it to import data to QTP&#039;s DataTable though. I doubt this will be possible.</description>
		<content:encoded><![CDATA[<p>Hi Raju,</p>
<p>I haven&#8217;t work on OpenOffice with either VBScript or QTP, so I am not sure how it is going to work. <a href="http://www.kalitech.fr/clients/doc/VB_APIOOo_en.html" rel="nofollow">This post</a> outlines several ways OpenOffice can work with VB and you can modify the code for your use. </p>
<p>I am not sure how you can use it to import data to QTP&#8217;s DataTable though. I doubt this will be possible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Satishkumar Dega</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-1227</link>
		<dc:creator>Satishkumar Dega</dc:creator>
		<pubDate>Mon, 23 Nov 2009 10:18:03 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-1227</guid>
		<description>Hi Anshoo,
How to import files and how to call the functions in the QTP.
can u give me one sample example and explain the things plz</description>
		<content:encoded><![CDATA[<p>Hi Anshoo,<br />
How to import files and how to call the functions in the QTP.<br />
can u give me one sample example and explain the things plz</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raju</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-1224</link>
		<dc:creator>raju</dc:creator>
		<pubDate>Mon, 23 Nov 2009 07:57:17 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-1224</guid>
		<description>HI,
Could you pls tell me How to import data from the OpenOffice Spreadsheet in QTP</description>
		<content:encoded><![CDATA[<p>HI,<br />
Could you pls tell me How to import data from the OpenOffice Spreadsheet in QTP</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-1164</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Thu, 19 Nov 2009 17:12:44 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-1164</guid>
		<description>Most welcome :)</description>
		<content:encoded><![CDATA[<p>Most welcome :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Satishkumar Dega</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-1154</link>
		<dc:creator>Satishkumar Dega</dc:creator>
		<pubDate>Thu, 19 Nov 2009 07:01:52 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-1154</guid>
		<description>Hi Anshooo,
The above code is working fine in both Solution 1 and Solution 2.
Thanks for giving good Solution.</description>
		<content:encoded><![CDATA[<p>Hi Anshooo,<br />
The above code is working fine in both Solution 1 and Solution 2.<br />
Thanks for giving good Solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-890</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Wed, 04 Nov 2009 19:14:10 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-890</guid>
		<description>Hi Radhika,

I hope you are doing well.

What you see in this example, which checks the existence of the WebEdit before entering a value is nothing but a (custom) Checkpoint. You can do the same with a Standard Checkpoint as well, but I find custom checkpoints easily written and highly manageable.

&lt;blockquote&gt;For example, inserting 1) standard checkpoint for “Login” and “Cancel” button, 2) Image checkpoint for the flight image…etc (If applicable, can you please give me the exact location in script where i can insert checkpoints)&lt;/blockquote&gt;

Its hard to describe an exact location; numerous validations performed through each script. To give you an example though, when you launch an application, you can check whether all the mandatory objects exist, or not. If not, the test fails. If they do, you proceed to the next step. 

Let&#039;s take a Cart Checkpoint process for example too. When you click &quot;Checkout&quot; you may expect a customized message for you, the amount of purchase, your Card details, your address etc. You can verify all of this, to make sure the application&#039;s behavior is as expected. You can choose to create Standard Checkpoints, or custom, as long as they verify correct entities within the application.

&lt;blockquote&gt;since the buttons are always enabled there is no need to check and so no checkpoint and same for image.&lt;/blockquote&gt;

That&#039;s quite true. But, a good script doesn&#039;t trust the application completely and performs all necessary validations. You never know when one of your validation catches something that may be extremely valuable to your team. :)</description>
		<content:encoded><![CDATA[<p>Hi Radhika,</p>
<p>I hope you are doing well.</p>
<p>What you see in this example, which checks the existence of the WebEdit before entering a value is nothing but a (custom) Checkpoint. You can do the same with a Standard Checkpoint as well, but I find custom checkpoints easily written and highly manageable.</p>
<blockquote><p>For example, inserting 1) standard checkpoint for “Login” and “Cancel” button, 2) Image checkpoint for the flight image…etc (If applicable, can you please give me the exact location in script where i can insert checkpoints)</p></blockquote>
<p>Its hard to describe an exact location; numerous validations performed through each script. To give you an example though, when you launch an application, you can check whether all the mandatory objects exist, or not. If not, the test fails. If they do, you proceed to the next step. </p>
<p>Let&#8217;s take a Cart Checkpoint process for example too. When you click &#8220;Checkout&#8221; you may expect a customized message for you, the amount of purchase, your Card details, your address etc. You can verify all of this, to make sure the application&#8217;s behavior is as expected. You can choose to create Standard Checkpoints, or custom, as long as they verify correct entities within the application.</p>
<blockquote><p>since the buttons are always enabled there is no need to check and so no checkpoint and same for image.</p></blockquote>
<p>That&#8217;s quite true. But, a good script doesn&#8217;t trust the application completely and performs all necessary validations. You never know when one of your validation catches something that may be extremely valuable to your team. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Radhika</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-888</link>
		<dc:creator>Radhika</dc:creator>
		<pubDate>Wed, 04 Nov 2009 18:56:46 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-888</guid>
		<description>Hi Anshoo,

In the above example we have checked the availability of text boxes and buttons in login page and then entering values to login and move on to the next page.
Does inserting of &quot;Checkpoints&quot; is applicable here?
For example, inserting 1) standard checkpoint for &quot;Login&quot; and &quot;Cancel&quot; button,  2) Image checkpoint for the flight image...etc (If applicable, can you please give me the exact location in script where i can insert checkpoints)
OR 
since the buttons are always enabled there is no need to check and so no checkpoint and same for image.

Please guide...
Thanks,
Radhika</description>
		<content:encoded><![CDATA[<p>Hi Anshoo,</p>
<p>In the above example we have checked the availability of text boxes and buttons in login page and then entering values to login and move on to the next page.<br />
Does inserting of &#8220;Checkpoints&#8221; is applicable here?<br />
For example, inserting 1) standard checkpoint for &#8220;Login&#8221; and &#8220;Cancel&#8221; button,  2) Image checkpoint for the flight image&#8230;etc (If applicable, can you please give me the exact location in script where i can insert checkpoints)<br />
OR<br />
since the buttons are always enabled there is no need to check and so no checkpoint and same for image.</p>
<p>Please guide&#8230;<br />
Thanks,<br />
Radhika</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-874</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Tue, 03 Nov 2009 16:44:51 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-874</guid>
		<description>Hi Satish,

I think it will be easier to demonstrate it through Descriptive Programming:

&lt;pre&gt;
Browser(&quot;title:=Welcome.*&quot;).WebEdit(&quot;name:=userName&quot;).Set &quot;test&quot;
Browser(&quot;title:=Welcome.*&quot;).WebEdit(&quot;name:=password&quot;).Set &quot;test&quot;
Browser(&quot;title:=Welcome.*&quot;).Image(&quot;name:=login&quot;).Click
Browser(&quot;title:=Find a Flight.*&quot;).Image(&quot;name:=findFlights&quot;).Click
Browser(&quot;title:=Select a Flight.*&quot;).Image(&quot;name:=reserveFlights&quot;).Click
Browser(&quot;title:=Book a Flight.*&quot;).Image(&quot;name:=buyFlights&quot;).Click
&#039;Solution 1
MsgBox Browser(&quot;title:=.*Confirmation.*&quot;)_
    .WebElement(&quot;innertext:=.*(19&#124;20)\d\d-\d\d-\d+&quot;, &quot;index:=0&quot;)_
    .GetROProperty(&quot;innertext&quot;)
&#039;Solution 2
MsgBox Browser(&quot;title:=.*Confirmation.*&quot;)_
    .WebElement(&quot;innertext:=.*\d+-\d\d-\d+&quot;, &quot;index:=0&quot;).GetROProperty(&quot;innertext&quot;)
&lt;/pre&gt;

Please test the above code and let me know if you have any questions..

PS. You can use the same Regular Expression with Record/Playback as well.</description>
		<content:encoded><![CDATA[<p>Hi Satish,</p>
<p>I think it will be easier to demonstrate it through Descriptive Programming:</p>
<pre>
Browser("title:=Welcome.*").WebEdit("name:=userName").Set "test"
Browser("title:=Welcome.*").WebEdit("name:=password").Set "test"
Browser("title:=Welcome.*").Image("name:=login").Click
Browser("title:=Find a Flight.*").Image("name:=findFlights").Click
Browser("title:=Select a Flight.*").Image("name:=reserveFlights").Click
Browser("title:=Book a Flight.*").Image("name:=buyFlights").Click
'Solution 1
MsgBox Browser("title:=.*Confirmation.*")_
    .WebElement("innertext:=.*(19|20)\d\d-\d\d-\d+", "index:=0")_
    .GetROProperty("innertext")
'Solution 2
MsgBox Browser("title:=.*Confirmation.*")_
    .WebElement("innertext:=.*\d+-\d\d-\d+", "index:=0").GetROProperty("innertext")
</pre>
<p>Please test the above code and let me know if you have any questions..</p>
<p>PS. You can use the same Regular Expression with Record/Playback as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Satishkumar Dega</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-870</link>
		<dc:creator>Satishkumar Dega</dc:creator>
		<pubDate>Tue, 03 Nov 2009 06:02:29 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-870</guid>
		<description>Hi Anshoo,
I tryed what ever u mention the steps but it is failing the test.for ur reference I am sending my test 
why this is failing can u check it and let me know.

Browser(&quot;Welcome: Mercury Tours&quot;).Page(&quot;Welcome: Mercury Tours&quot;).WebEdit(&quot;userName&quot;).Set &quot;satishdega&quot;
Browser(&quot;Welcome: Mercury Tours&quot;).Page(&quot;Welcome: Mercury Tours&quot;).WebEdit(&quot;password&quot;).SetSecure &quot;4aefbf53f0eb009d5a950f455b4090533e17&quot;
Browser(&quot;Welcome: Mercury Tours&quot;).Page(&quot;Welcome: Mercury Tours&quot;).Image(&quot;Sign-In&quot;).Click 29,5
Browser(&quot;Welcome: Mercury Tours&quot;).Page(&quot;Find a Flight: Mercury&quot;).Image(&quot;findFlights&quot;).Click 38,10
Browser(&quot;Welcome: Mercury Tours&quot;).Page(&quot;Select a Flight: Mercury&quot;).Image(&quot;reserveFlights&quot;).Click 36,6
Browser(&quot;Welcome: Mercury Tours&quot;).Page(&quot;Book a Flight: Mercury&quot;).Image(&quot;buyFlights&quot;).Click 43,10
Browser(&quot;Welcome: Mercury Tours&quot;).Page(&quot;Flight Confirmation: Mercury&quot;).WebElement(&quot;Flight Confirmation #&quot;).Check CheckPoint(&quot;Flight Confirmation # 2009-11-03002139&quot;).</description>
		<content:encoded><![CDATA[<p>Hi Anshoo,<br />
I tryed what ever u mention the steps but it is failing the test.for ur reference I am sending my test<br />
why this is failing can u check it and let me know.</p>
<p>Browser(&#8220;Welcome: Mercury Tours&#8221;).Page(&#8220;Welcome: Mercury Tours&#8221;).WebEdit(&#8220;userName&#8221;).Set &#8220;satishdega&#8221;<br />
Browser(&#8220;Welcome: Mercury Tours&#8221;).Page(&#8220;Welcome: Mercury Tours&#8221;).WebEdit(&#8220;password&#8221;).SetSecure &#8220;4aefbf53f0eb009d5a950f455b4090533e17&#8243;<br />
Browser(&#8220;Welcome: Mercury Tours&#8221;).Page(&#8220;Welcome: Mercury Tours&#8221;).Image(&#8220;Sign-In&#8221;).Click 29,5<br />
Browser(&#8220;Welcome: Mercury Tours&#8221;).Page(&#8220;Find a Flight: Mercury&#8221;).Image(&#8220;findFlights&#8221;).Click 38,10<br />
Browser(&#8220;Welcome: Mercury Tours&#8221;).Page(&#8220;Select a Flight: Mercury&#8221;).Image(&#8220;reserveFlights&#8221;).Click 36,6<br />
Browser(&#8220;Welcome: Mercury Tours&#8221;).Page(&#8220;Book a Flight: Mercury&#8221;).Image(&#8220;buyFlights&#8221;).Click 43,10<br />
Browser(&#8220;Welcome: Mercury Tours&#8221;).Page(&#8220;Flight Confirmation: Mercury&#8221;).WebElement(&#8220;Flight Confirmation #&#8221;).Check CheckPoint(&#8220;Flight Confirmation # 2009-11-03002139&#8243;).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-833</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Fri, 30 Oct 2009 13:33:38 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-833</guid>
		<description>At the Flight Confirmation page:

1. Start Recording if QTP is not in Record mode
2. Insert -&gt; Checkpoint -&gt; Standard Checkpoint
3. Click the &quot;Flight Confirmation XXXX-XX-XXXXXXXX&quot; WebElement
3. Object Selection Window -&gt; Makes sure WebElement shows up as the bottom-most object
5. Click OK
6. Uncheck &quot;HTML TAG&quot; if its checked. Only &quot;InnerText&quot; should be selected.
7. Click on the &quot;InnerText&quot; Row
8. Besides the Constant Textbox, there is a button to the right. Click that.
9. A window titled &quot;Constant Value Options&quot; will show up. 
10. Replace &quot;Flight Confirmation XXXX-XX-XXXXXXXX&quot; with this &quot;(19&#124;20)\d\d-\d\d-\d+&quot; and check &quot;Regular Expression&quot;
11. Click OK
12. Click OK to close the Checkpoint Properties Window
13. Stop Recording
14. Once you&#039;re done, you will have the following statement in QTP:

&lt;pre&gt;
Browser(&quot;Flight Confirmation: Mercury&quot;).Page(&quot;Flight Confirmation: Mercury&quot;)_
    .WebElement(&quot;Flight Confirmation #&quot;)_
    .Check CheckPoint(&quot;Flight Confirmation # 2009-10-30092408&quot;)
&lt;/pre&gt;

15. Execute your code now and check the results.


Note: You will have to follow the same process for the WebElement object because when its recorded, its recorded to match with the static string. You will have to replace it with a Regular Expression shown above.</description>
		<content:encoded><![CDATA[<p>At the Flight Confirmation page:</p>
<p>1. Start Recording if QTP is not in Record mode<br />
2. Insert -> Checkpoint -> Standard Checkpoint<br />
3. Click the &#8220;Flight Confirmation XXXX-XX-XXXXXXXX&#8221; WebElement<br />
3. Object Selection Window -> Makes sure WebElement shows up as the bottom-most object<br />
5. Click OK<br />
6. Uncheck &#8220;HTML TAG&#8221; if its checked. Only &#8220;InnerText&#8221; should be selected.<br />
7. Click on the &#8220;InnerText&#8221; Row<br />
8. Besides the Constant Textbox, there is a button to the right. Click that.<br />
9. A window titled &#8220;Constant Value Options&#8221; will show up.<br />
10. Replace &#8220;Flight Confirmation XXXX-XX-XXXXXXXX&#8221; with this &#8220;(19|20)\d\d-\d\d-\d+&#8221; and check &#8220;Regular Expression&#8221;<br />
11. Click OK<br />
12. Click OK to close the Checkpoint Properties Window<br />
13. Stop Recording<br />
14. Once you&#8217;re done, you will have the following statement in QTP:</p>
<pre>
Browser("Flight Confirmation: Mercury").Page("Flight Confirmation: Mercury")_
    .WebElement("Flight Confirmation #")_
    .Check CheckPoint("Flight Confirmation # 2009-10-30092408")
</pre>
<p>15. Execute your code now and check the results.</p>
<p>Note: You will have to follow the same process for the WebElement object because when its recorded, its recorded to match with the static string. You will have to replace it with a Regular Expression shown above.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Satishkumar Dega</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-828</link>
		<dc:creator>Satishkumar Dega</dc:creator>
		<pubDate>Fri, 30 Oct 2009 07:20:50 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-828</guid>
		<description>Hi Anshoo,
I went through the regularexpression articles I got an idea.But still I have one doubt that is I try to record on test and play the script in the final page I have select a particular number and I put one Insert text check point I ran the script but it is failing.
Ex : Flight Confirmation # 2009-10-30025808  2009-10-30 02:58:08.0 U know the last page of flight confrimation page this text will come but I select (025808) this thing I have try to put one check point but QTp tool is identifying like this
Check that 0258 is displayed between  Flight Confirmation # 2009-10-30 and 53 2009-10-.last digts are dynamically changes but QTP identify the only select the only 4 dights at the time 2 numbers are not select at the time failing If I select all the data like (Flight Confirmation # 2009-10-30025808  2009-10-30 02:58:08.0) at the time I have put check point and I mention regular expression what ever u mention aboe article its working fine I need to check in a particular thing using regular expression is it possible can u explain the things plz.
I really thanx a lot for u giving good support for me.</description>
		<content:encoded><![CDATA[<p>Hi Anshoo,<br />
I went through the regularexpression articles I got an idea.But still I have one doubt that is I try to record on test and play the script in the final page I have select a particular number and I put one Insert text check point I ran the script but it is failing.<br />
Ex : Flight Confirmation # 2009-10-30025808  2009-10-30 02:58:08.0 U know the last page of flight confrimation page this text will come but I select (025808) this thing I have try to put one check point but QTp tool is identifying like this<br />
Check that 0258 is displayed between  Flight Confirmation # 2009-10-30 and 53 2009-10-.last digts are dynamically changes but QTP identify the only select the only 4 dights at the time 2 numbers are not select at the time failing If I select all the data like (Flight Confirmation # 2009-10-30025808  2009-10-30 02:58:08.0) at the time I have put check point and I mention regular expression what ever u mention aboe article its working fine I need to check in a particular thing using regular expression is it possible can u explain the things plz.<br />
I really thanx a lot for u giving good support for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-816</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Thu, 29 Oct 2009 15:23:04 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-816</guid>
		<description>Sounds great!! I wasn&#039;t sure if you would find that helpful. 

But, I&#039;m glad you did. :)</description>
		<content:encoded><![CDATA[<p>Sounds great!! I wasn&#8217;t sure if you would find that helpful. </p>
<p>But, I&#8217;m glad you did. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-814</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Thu, 29 Oct 2009 15:09:39 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-814</guid>
		<description>Hi Satish,

Please go through this article on &lt;a href=&quot;http://relevantcodes.com/descriptive-programming-dp-concepts-2-regular-expressions/&quot; rel=&quot;nofollow&quot;&gt;Regular Expressions&lt;/a&gt;. You should be able to find some information on the use of Regular Expressions when using QTP. If you have any questions after having read the article, please feel free to ask. However, there is ample detail on the use of both WildCards and Regex formats there you get you started.

You can also see &lt;a href=&quot;http://www.marksanborn.net/howto/learning-regular-expressions-for-beginners-the-basics/&quot; rel=&quot;nofollow&quot;&gt;this article&lt;/a&gt;, which also covers a few basics on this topic. 

I know I am always directing you to different sources, but there has been so much already said about these topics, which even if I try won&#039;t do as good of a job in explaining everything in this small space :)</description>
		<content:encoded><![CDATA[<p>Hi Satish,</p>
<p>Please go through this article on <a href="http://relevantcodes.com/descriptive-programming-dp-concepts-2-regular-expressions/" rel="nofollow">Regular Expressions</a>. You should be able to find some information on the use of Regular Expressions when using QTP. If you have any questions after having read the article, please feel free to ask. However, there is ample detail on the use of both WildCards and Regex formats there you get you started.</p>
<p>You can also see <a href="http://www.marksanborn.net/howto/learning-regular-expressions-for-beginners-the-basics/" rel="nofollow">this article</a>, which also covers a few basics on this topic. </p>
<p>I know I am always directing you to different sources, but there has been so much already said about these topics, which even if I try won&#8217;t do as good of a job in explaining everything in this small space :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Radhika</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-813</link>
		<dc:creator>Radhika</dc:creator>
		<pubDate>Thu, 29 Oct 2009 13:02:19 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-813</guid>
		<description>Hi Ansoo,

I will definitely go through the document you have mentioned....also you have given a good start with such a simple example....

Thanks,
Radhika</description>
		<content:encoded><![CDATA[<p>Hi Ansoo,</p>
<p>I will definitely go through the document you have mentioned&#8230;.also you have given a good start with such a simple example&#8230;.</p>
<p>Thanks,<br />
Radhika</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Satishkumar Dega</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-808</link>
		<dc:creator>Satishkumar Dega</dc:creator>
		<pubDate>Thu, 29 Oct 2009 05:13:27 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-808</guid>
		<description>Hi did not under stand the  regular expression concept canu you give me an over view on that.
When we will use the regular expression concept how to use that one.
Could you give one example and explain the example.</description>
		<content:encoded><![CDATA[<p>Hi did not under stand the  regular expression concept canu you give me an over view on that.<br />
When we will use the regular expression concept how to use that one.<br />
Could you give one example and explain the example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-797</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Wed, 28 Oct 2009 16:06:52 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-797</guid>
		<description>Hi Radhika,

&lt;blockquote&gt;As per my understanding, Data driven is nothing but parameterization…ie using different input values for same test case. Am i correct?&lt;/blockquote&gt;
Correct. It is parameterization off data-pools on potentially a large scale. However, apart from only retrieving the Input values, a data-driven framework also retrieves the Output values for verifications. Lots of variables here.

&lt;blockquote&gt;And for Keyword driven am not clear&lt;/blockquote&gt;
This type of framework runs on &quot;keywords&quot; that represent a logical entity on the code level. For example:

&lt;table border=&quot;1&quot;&gt;
	&lt;tr style=&quot;font-weight: bold;&quot;&gt;
		&lt;td&gt;Keyword&lt;/td&gt;
		&lt;td&gt;Argument&lt;/td&gt;
		&lt;td&gt;Output&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;LaunchApp&lt;/td&gt;
		&lt;td&gt;http://google.com&lt;/td&gt;
		&lt;td&gt;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;SearchText&lt;/td&gt;
		&lt;td&gt;QTP Automation&lt;/td&gt;
		&lt;td&gt;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;CloseApp&lt;/td&gt;
		&lt;td&gt;http://google.com&lt;/td&gt;
		&lt;td&gt;&lt;/td&gt;
	&lt;/tr&gt;	
&lt;/table&gt;


All the outputs will be available after the script has been run.

Of course, the above table is just an example. The framework itself will be quite large and it can have provision for more keywords, depending on the type of application.

I would also recommend you to refer to &lt;a href=&quot;http://safsdev.sourceforge.net/FRAMESDataDrivenTestAutomationFrameworks.htm&quot; rel=&quot;nofollow&quot;&gt;this document&lt;/a&gt; by Carl Nagle which provides a brief overview of different sorts of frameworks. Bullets 1.2.1 and 1.2.2 discuss Data-Driven and Keyword-Driven frameworks. &lt;a href=&quot;http://www.ibm.com/developerworks/rational/library/591.html#N100A7&quot; rel=&quot;nofollow&quot;&gt;This&lt;/a&gt; is also an excellent source.

I hope this helps..</description>
		<content:encoded><![CDATA[<p>Hi Radhika,</p>
<blockquote><p>As per my understanding, Data driven is nothing but parameterization…ie using different input values for same test case. Am i correct?</p></blockquote>
<p>Correct. It is parameterization off data-pools on potentially a large scale. However, apart from only retrieving the Input values, a data-driven framework also retrieves the Output values for verifications. Lots of variables here.</p>
<blockquote><p>And for Keyword driven am not clear</p></blockquote>
<p>This type of framework runs on &#8220;keywords&#8221; that represent a logical entity on the code level. For example:</p>
<table border="1">
<tr style="font-weight: bold;">
<td>Keyword</td>
<td>Argument</td>
<td>Output</td>
</tr>
<tr>
<td>LaunchApp</td>
<td><a href="http://google.com" rel="nofollow">http://google.com</a></td>
<td></td>
</tr>
<tr>
<td>SearchText</td>
<td>QTP Automation</td>
<td></td>
</tr>
<tr>
<td>CloseApp</td>
<td><a href="http://google.com" rel="nofollow">http://google.com</a></td>
<td></td>
</tr>
</table>
<p>All the outputs will be available after the script has been run.</p>
<p>Of course, the above table is just an example. The framework itself will be quite large and it can have provision for more keywords, depending on the type of application.</p>
<p>I would also recommend you to refer to <a href="http://safsdev.sourceforge.net/FRAMESDataDrivenTestAutomationFrameworks.htm" rel="nofollow">this document</a> by Carl Nagle which provides a brief overview of different sorts of frameworks. Bullets 1.2.1 and 1.2.2 discuss Data-Driven and Keyword-Driven frameworks. <a href="http://www.ibm.com/developerworks/rational/library/591.html#N100A7" rel="nofollow">This</a> is also an excellent source.</p>
<p>I hope this helps..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Radhika</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-796</link>
		<dc:creator>Radhika</dc:creator>
		<pubDate>Wed, 28 Oct 2009 15:18:10 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-796</guid>
		<description>Anshoo,

Can you please explain the difference between Data driven testing and keyword driven testing?
As per my understanding, Data driven is nothing but parameterization...ie using different input values for same test case. Am i correct?
And for Keyword driven am not clear....
Kindly help.
Radhika</description>
		<content:encoded><![CDATA[<p>Anshoo,</p>
<p>Can you please explain the difference between Data driven testing and keyword driven testing?<br />
As per my understanding, Data driven is nothing but parameterization&#8230;ie using different input values for same test case. Am i correct?<br />
And for Keyword driven am not clear&#8230;.<br />
Kindly help.<br />
Radhika</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-795</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Wed, 28 Oct 2009 15:06:19 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-795</guid>
		<description>That sounds good!! :)</description>
		<content:encoded><![CDATA[<p>That sounds good!! :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-793</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Wed, 28 Oct 2009 15:05:21 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-793</guid>
		<description>I think a good Regular Expression considering the year will change every year, and the last part seems dynamic, you can use this:

&lt;pre&gt;
20\d\d-10-\d+
&lt;/pre&gt;

Or, if you would like to test only 2009 dates, you can use this:

&lt;pre&gt;
2009-10-\d+
&lt;/pre&gt;

Or, if you would like to match any such number with the same pattern, you can simply use this:

&lt;pre&gt;
\d+-\d+-\d+
&lt;/pre&gt;

There are several ways you can use the approaches above. But, I would recommend a good walkthrough on Regular Expressions first - the knowledge you gain will be very useful to you.</description>
		<content:encoded><![CDATA[<p>I think a good Regular Expression considering the year will change every year, and the last part seems dynamic, you can use this:</p>
<pre>
20\d\d-10-\d+
</pre>
<p>Or, if you would like to test only 2009 dates, you can use this:</p>
<pre>
2009-10-\d+
</pre>
<p>Or, if you would like to match any such number with the same pattern, you can simply use this:</p>
<pre>
\d+-\d+-\d+
</pre>
<p>There are several ways you can use the approaches above. But, I would recommend a good walkthrough on Regular Expressions first &#8211; the knowledge you gain will be very useful to you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-792</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Wed, 28 Oct 2009 15:01:36 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-792</guid>
		<description>For 2009:

This will match any year that begins with 20. Example: 2000, 2010, 2099 etc:
&lt;pre&gt;
20\d\d 
&lt;/pre&gt;

This will match any year that begins with 200. Example: 2000, 2001, 2009 etc:
&lt;pre&gt;
200\d
&lt;/pre&gt;

You can also refer to &lt;a href=&quot;http://www.regular-expressions.info/dates.html&quot; rel=&quot;nofollow&quot;&gt;this great website&lt;/a&gt; for more information on Regular Expressions.</description>
		<content:encoded><![CDATA[<p>For 2009:</p>
<p>This will match any year that begins with 20. Example: 2000, 2010, 2099 etc:</p>
<pre>
20\d\d
</pre>
<p>This will match any year that begins with 200. Example: 2000, 2001, 2009 etc:</p>
<pre>
200\d
</pre>
<p>You can also refer to <a href="http://www.regular-expressions.info/dates.html" rel="nofollow">this great website</a> for more information on Regular Expressions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Satishkumar Dega</title>
		<link>http://relevantcodes.com/descriptive-programming-dp-4-creating-a-test-script/#comment-788</link>
		<dc:creator>Satishkumar Dega</dc:creator>
		<pubDate>Wed, 28 Oct 2009 11:41:05 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=222#comment-788</guid>
		<description>Hi Anshoo,
Today I have complete one test using sample mecury site(recording/playback).In that test I have put one check point like (Insert Text check point)
Flight Confirmation # 2009-10-28052358  this page will come at last fight confrimation page I have put one check point in the (2009) .In that I have mention the using regular expression like this [0-2][0-9][0-9][0-9].After the save the test and run the script it is failing the test where ever I put checkpoint  it is failing.
I saw the results is displaing like this
Text Checkpoint: captured &quot;&quot; between Flight Confirmation # and -10-28072003 , expected &quot;[0-2]&#124;[0-9]&#124;[0-9]&#124;[0-9]&quot;
Regular Expression : ON
Match case: OFF could u please help me this one</description>
		<content:encoded><![CDATA[<p>Hi Anshoo,<br />
Today I have complete one test using sample mecury site(recording/playback).In that test I have put one check point like (Insert Text check point)<br />
Flight Confirmation # 2009-10-28052358  this page will come at last fight confrimation page I have put one check point in the (2009) .In that I have mention the using regular expression like this [0-2][0-9][0-9][0-9].After the save the test and run the script it is failing the test where ever I put checkpoint  it is failing.<br />
I saw the results is displaing like this<br />
Text Checkpoint: captured &#8220;&#8221; between Flight Confirmation # and -10-28072003 , expected &#8220;[0-2]|[0-9]|[0-9]|[0-9]&#8221;<br />
Regular Expression : ON<br />
Match case: OFF could u please help me this one</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 8/14 queries in 0.022 seconds using disk
Object Caching 1089/1094 objects using disk

Served from: relevantcodes.com @ 2010-09-09 15:57:40 -->