<?xml version="1.0" ?> 
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/">
<channel>
  <title>WEB PERFORMANCE COMMUNITY - Scripting Showcase - KITE Flying Tricks</title> 
  <description></description> 
  <link>http://forums.keynote.com/forum/index.cfm?forumid=13</link> 
  <generator>FuseTalk Hosting Executive Plan</generator> 

	<item>
		<title>How to use Script completion event?</title>
		<link>http://forums.keynote.com/forum/messageview.cfm?catid=103&amp;threadid=407</link> 
		<pubDate>2009-04-03T05:36:02 -08.00</pubDate> 
		<dc:creator>simon pulter</dc:creator>
   	    <slash:comments>9</slash:comments> 
		<description><![CDATA[ <p>I want to use the Script completion event but can not see how to do it, and I can not see anything about it in the "help" file.</p>
<p>As an example, I want a script for google.co.uk to end when document.getElementById("shf0").childNodes.item(0).childNodes.item(0).innerText="Make Google my homepage".</p>
<p>That is just an example, what I am trying to do is use javascript to wait for a particular peice of text to update, and then the page completes. DOM completion doesnt seem very intuitive and script will be a lot easier.</p>
<p>thank you</p>
<p>Si</p>]]></description>
	</item>

	<item>
		<title>Accessing Virtual Profile through Advanced Scripting</title>
		<link>http://forums.keynote.com/forum/messageview.cfm?catid=103&amp;threadid=358</link> 
		<pubDate>2008-10-16T04:56:34 -08.00</pubDate> 
		<dc:creator>Karthikeyan Chandramohan</dc:creator>
   	    <slash:comments>1</slash:comments> 
		<description><![CDATA[ <p>Another example to use Multiple Variables.&nbsp; Please read <strong><a class="ftalternatingbarlinklarge" href="messageview.cfm?catid=103&threadid=344&enterthread=y" target="_blank">Using Multiple Variables</a></strong> prior to this to get an idea of variable types and adding multiple variables.</p>
<p>To make it simple, the scenario is going to be:</p>
<p>1.&nbsp; Navigate to <a href="http://www.google.com">http://www.google.com</a><br />2.&nbsp; Search for a string using JavaScript rather than a conventional record.</p>
<p>The JavaScript that we are going to use is:</p>
<p>{<br />&nbsp;document.f.q.value = "Search 1";<br />&nbsp;document.f.submit();<br />}</p>
<p>In this case, how to make the Search String to use the data given in Virtual Profile?</p>
<p>Let's split the javascript into three different variables:</p>
<p>-----------------------------------------------<br />Variable 1 -&gt; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; document.f.q.value = "<br />-----------------------------------------------<br />Variable 2 -&gt; Virtual Profile Data Value<br />-----------------------------------------------<br />Variable 3 -&gt; &nbsp;&nbsp;&nbsp; ";<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; document.f.submit();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />-----------------------------------------------<br />The second page in the script looks like:</p>
<p><img src="http://kwpc.davekarow.com/KC-AdvScript_VU.png" alt="" /></p>
<p>&nbsp;Attached is the sample script.</p>]]></description>
	</item>

	<item>
		<title>KITE Talk - Being Creative with KITE Advanced Scripting</title>
		<link>http://forums.keynote.com/forum/messageview.cfm?catid=103&amp;threadid=348</link> 
		<pubDate>2008-09-25T14:52:48 -08.00</pubDate> 
		<dc:creator>Per-Anders Rangsjo</dc:creator>
   	    <slash:comments>4</slash:comments> 
		<description><![CDATA[ <p>Hi all,</p>
<p>Please find attached a zip package containing the presentation, script files and server side files/applications referred to during my KITE Talk. If you have any questions, please feel free to contact me. Thanks.</p>
<p>Best Regards,<br />PA.</p>
<p><em>Moderator's note:<strong> </strong></em><strong>if using IE7, please <a href="http://kwpc.davekarow.com/zip/ 	KITE_Talk_-_PA_Rangsjo_2008.09.25.zip" target="_self">use this download link</a></strong> rather than the attachment link below.</p>]]></description>
	</item>

	<item>
		<title>Using Multiple Variables</title>
		<link>http://forums.keynote.com/forum/messageview.cfm?catid=103&amp;threadid=344</link> 
		<pubDate>2008-09-23T11:35:25 -08.00</pubDate> 
		<dc:creator>Karthikeyan Chandramohan</dc:creator>
   	    <slash:comments>1</slash:comments> 
		<description><![CDATA[ <p>This is an extension to the topic <b><a target=_blank class=ftalternatingbarlinklarge href="http://forums.keynote.com/forum/messageview.cfm?catid=103&threadid=588">Date and Time Variables</a></b></p>
<p>It is possible to add multiple variable types in the same field.&nbsp; Consider an example where we need to check for today's date and some text (Keynote 09/23/2009).&nbsp; This can be done by clicking on the "Edit" button in the script properties editor and adding more variables.</p>
<p><img src="http://kwpc.davekarow.com/KC-Scriptproperties.png" alt="" /></p>
<p><img src="http://kwpc.davekarow.com/KC-EditParameter.png" alt="" /></p>
<p>Attached are a couple of Sample scripts.</p>
<p>Script 1:&nbsp; Goes to google and searches for Keynote + Today's date<br />Script 2:&nbsp; An illustration saying that it can be used for Advanced scripting too.&nbsp; For detailed data on Script 2, please refer to the topic <a class="ftalternatingbarlinklarge" href="messageview.cfm?catid=92&threadid=342&enterthread=y" target="_blank"><strong>Tips/Tricks for monitoring Siebel</strong></a></p>]]></description>
	</item>

	<item>
		<title>Custom Scripting - Travelling only on a weekday (not on a weekend)</title>
		<link>http://forums.keynote.com/forum/messageview.cfm?catid=103&amp;threadid=290</link> 
		<pubDate>2008-08-19T05:50:44 -08.00</pubDate> 
		<dc:creator>Karthikeyan Chandramohan</dc:creator>
   	    <slash:comments>1</slash:comments> 
		<description><![CDATA[ <p>The attached script is similar to the script posted under topic "<strong>Date and Time Variables</strong>".&nbsp; Except that there is a custom JavaScript that checks whether the "<strong>Future Departure date</strong>" and the "<strong>Future Arrival Date</strong>" falls only on weekdays.&nbsp; If it falls on a <strong>Saturday or a Sunday, it should select the next available Monday</strong>.</p>
<p>It basically revolves around the <strong>Date()</strong> method of Javascript.&nbsp; Just to give a summary of what the script does:</p>
<p>1.&nbsp; Get today's date.<br />2.&nbsp; For departure date , Add 15 days to the date that is created in the previous step and store it in a variable (<strong>ddate</strong>).<br />3.&nbsp; For Arrival date, Add 18 days to the date that is created in the first step and store it as a separate variable (<strong>adate</strong>).<br />4.&nbsp; Check the following<br />&nbsp;if (<strong>ddate = 6</strong>) //this means if the departure date is a Saturday<br />&nbsp;{<br />&nbsp;&nbsp;Add two more days to the departure date offset; // selects the next available Monday.<br />&nbsp;&nbsp;Add two more days to the arrival date offset and update the variable accordingly <strong>adate + 2 days</strong><br />&nbsp;}<br />&nbsp;else if (<strong>ddate = 0</strong>) //means if the departure date is Sunday<br />&nbsp;{<br />&nbsp;&nbsp;Add one more day to the departure date offset; // selects the next available Monday.<br />&nbsp;&nbsp;Add one more day to the arrival date offset and update the variable accordingly <strong>adate + 2 days</strong><br />&nbsp;}<br />&nbsp;else<br />&nbsp;{<br />&nbsp;&nbsp;Dont do anthing as we are on a proper weekday;<br />&nbsp;}<br />&nbsp;<br />Store the variables using <strong>System.SaveValue()</strong> method which is in the Keynote's set of defined API's for Transaction Perspective.&nbsp; For example, store ddate as "<strong>cindate</strong>", so that "<strong>cindate</strong>" can be used as a <strong>Global variable</strong> through out the script using the "<strong>Previously Saved Value</strong>" variable type.</p>
<p><img src="http://kwpc.davekarow.com/KC-AdvScript_Weekend Travel.png" alt="" /></p>
<p>5.&nbsp; Check the weekend logic for Arrival date (<strong>adate</strong>) too.</p>]]></description>
	</item>

	<item>
		<title>TxP Completion Events - DOM Pattern MISMATCH</title>
		<link>http://forums.keynote.com/forum/messageview.cfm?catid=103&amp;threadid=276</link> 
		<pubDate>2008-08-06T05:05:26 -08.00</pubDate> 
		<dc:creator>Karthikeyan Chandramohan</dc:creator>
   	    <slash:comments>7</slash:comments> 
		<description><![CDATA[ <p><strong>Please read the topic <b><a target=_blank class=ftalternatingbarlinklarge href="http://forums.keynote.com/forum/messageview.cfm?catid=103&threadid=596">"TxP Completion Events - DOM Pattern Match"</a></b>before proceeding.</strong><br /><br />A different approach to the Topic "TxP Completion Events - DOM Pattern Match".&nbsp; In the previous example, it was illustrated that when we match a particular pattern (Timed out. I guess we'll never know) in a DOM element, we mark a page's completion.&nbsp; This example demonstrates that when a pattern <strong>Mismatch</strong> happens in a DOM element, we mark a page's completion.&nbsp; It also uses Regex.&nbsp; <br /><br /><strong>Mismatch Condition:</strong><br /><br />If the</p>
<div>element that we are focussing on, has got any other characters other than the numbers 0 to 9, then the page is set to be complete.<br /><br /><img src="http://kwpc.davekarow.com/KC-PatternMismatch.png" alt="" /><br /><br /><strong>Event:</strong><br />The configuration basically says that, in addition to the ReadyState, we are waiting for a "PatternMismatch".<br />This patternmismatch condition needs to be checked once in every second.&nbsp; This condition depends on the site design and on the requirement.<br />Frame indicates in which frame we are looking for this DOM element.<br /><br /><strong>Pattern:</strong><br />"Property" is going to be "innerText" as we are looking at the innerText of the DIV element.<br />Under "Text", we have to give what pattern we are looking for.&nbsp; Please note that the "Text" is [0-9]+ which is a <strong>Regex condition</strong> that denotes any number from 0 to 9.<br /><br /><strong>HTML Element:</strong><br />This is where we have to mention whatever attribute is possible to identify our HTML element on which we are looking the pattern for.&nbsp; Please give as much information as possible to uniquely identify the element.&nbsp; If there are many HTML elements, include the Index of the element too.<br /><br />If the element type isnt available for selection under "Tag Type", please try typing in the appropriate HTML Tag.&nbsp; In the given example, DIV is not available in the drop down so it was manually typed.<br /><br />There is only one attribute available for the HTML element that we are concentrating on, and the attribute is "id".</div>
<p>&nbsp;</p>]]></description>
	</item>

</channel>
</rss>
