<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Cloud Testing Blog &#187; Selenium RC</title>
	<atom:link href="http://www.cloudtesting.com/blog/tag/selenium-rc/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cloudtesting.com/blog</link>
	<description>Automated Functional, Cross Browser and Load Testing for Websites</description>
	<lastBuildDate>Tue, 23 Aug 2011 18:41:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Processing Javascript with Selenium</title>
		<link>http://www.cloudtesting.com/blog/2009/12/03/processing-javascript-with-selenium/</link>
		<comments>http://www.cloudtesting.com/blog/2009/12/03/processing-javascript-with-selenium/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 10:34:49 +0000</pubDate>
		<dc:creator>Matt Rees - Cloud Testing</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[Selenium RC]]></category>

		<guid isPermaLink="false">http://www.cloudtesting.com/blog/?p=1042</guid>
		<description><![CDATA[To allow you to create dynamic testing scripts, i.e. ones where the information entered onto forms, such as dates change over time, Cloud Testing has implemented the processing of JavaScript. Stored Variables The commands store, storeValue and storeText can be used to store a variable value for later. Store javascript{var d=new Date(); d.toString()} dateToday Store [...]]]></description>
			<content:encoded><![CDATA[<p>To allow you to create dynamic testing scripts, i.e. ones where the information entered onto forms, such as dates change over time, Cloud Testing has implemented the processing of JavaScript.</p>
<h2>Stored Variables</h2>
<p>The commands <em>store</em>, <em>storeValue</em> and <em>storeText</em> can be used to store a variable value for later.</p>
<table style="height: 154px;" border="1" width="637">
<colgroup>
<col width="18%"></col>
<col width="36%"></col>
<col width="45%"></col>
</colgroup>
<tbody>
<tr>
<td>Store</td>
<td><span id="showArg1_2">javascript{var d=new Date(); d.toString()} </span></td>
<td><span id="showArg2_2">dateToday </span></td>
</tr>
<tr>
<td>Store</td>
<td><span id="showArg1_3">javascript{var d=new Date(); d.setDate(d.getDate() + 1); d.toDateString();}</span></td>
<td><span id="showArg2_3">dateTomorrow </span></td>
</tr>
<tr>
<td>Store</td>
<td><span id="showArg1_4">javascript{var d=new Date(); d.setDate(d.getDate() + 40); d.toDateString();} </span></td>
<td>date40days</td>
</tr>
<tr>
<td>Store</td>
<td>Plain text string</td>
<td>variableName</td>
</tr>
</tbody>
</table>
<p>These variables are stored internally in a map called &#8220;storedVars&#8221;, with values keyed by the variable name, which can be accessed as follows:</p>
<pre style="padding-left: 30px;">storedVars['date40days']</pre>
<h2>JavaScript</h2>
<p>All parameters or arguments for Selenium commands can be constructed using both simple 	variable substitution as well as full JavaScript. They both have access to the variables stored above, but in different ways:</p>
<h3>Full JavaScript &#8211; javascript{&#8230;}</h3>
<p>Javascript evaluation provides the full power of JavaScript when constructing a parameter or argument for a Selenium command. 	To use this mechanism, the <em>entire</em> parameter value must be prefixed by &#8216;javascript{&#8216; with a trailing &#8216;}&#8217;. The text inside the braces is evaluated as a JavaScript expression, and can access previously stored variables using the <em>storedVars</em> map detailed above.</p>
<p>Note that variable substitution cannot be combined with JavaScript evaluation.</p>
<table style="height: 154px;" border="1" width="638">
<colgroup>
<col width="18%"></col>
<col width="36%"></col>
<col width="45%"></col>
</colgroup>
<tbody>
<tr>
<td>Echo</td>
<td><span id="showArg1_16">javascript{storedVars['dateTomorrow']} </span></td>
<td></td>
</tr>
<tr>
<td>Type</td>
<td>textField</td>
<td><span id="showArg1_16">javascript{&#8216;Tomorrow=&#8217; + storedVars['dateTomorrow']} </span></td>
</tr>
<tr>
<td>Echo</td>
<td><span id="showArg1_16">javascript{&#8216;Tomorrow=&#8217; + storedVars['dateTomorrow']} </span></td>
<td></td>
</tr>
<tr>
<td>Type</td>
<td>fullName</td>
<td>javascript{storedVars['fullName'].toUpperCase()}</td>
</tr>
</tbody>
</table>
<h3>Simple variable substitution &#8211; ${&#8230;}</h3>
<p>Variable substitution provides a simple way to use a previously stored variable in a command parameter. The variable to substitute is indicated by ${variableName}. Multiple variables can be substituted, and intermixed with static text.</p>
<table style="height: 154px;" border="1" width="634">
<colgroup>
<col width="18%"></col>
<col width="36%"></col>
<col width="45%"></col>
</colgroup>
<tbody>
<tr>
<td>Echo</td>
<td>${dateTomorrow}</td>
<td></td>
</tr>
<tr>
<td>Type</td>
<td>textField</td>
<td><span id="showArg2_13">Today: ${dateToday} Tomorrow: ${dateTomorrow} </span></td>
</tr>
<tr>
<td>Echo</td>
<td>${variableName}</td>
<td></td>
</tr>
<tr>
<td>Type</td>
<td>fullName</td>
<td>$(title} ${firstName} ${lastName}</td>
</tr>
</tbody>
</table>
<h2>Example in Cloud Testing</h2>
<p>The following example from Cloud Testing shows what can be done.</p>
<p><img class="alignnone size-full wp-image-1082" style="border: 1px solid black;" title="JavaScript - settings" src="http://www.cloudtesting.com/blog/wp-content/uploads/2009/12/JavaScript-settings.png" alt="JavaScript - settings" width="693" height="518" /></p>
<p>The example script is available to view in the &#8216;Live Demo&#8217; account is available via the <a href="http://www.cloudtesting.com/live_demo.php">Online demo</a> page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cloudtesting.com/blog/2009/12/03/processing-javascript-with-selenium/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Selenium 1.0</title>
		<link>http://www.cloudtesting.com/blog/2009/05/28/selenium-1-0-released/</link>
		<comments>http://www.cloudtesting.com/blog/2009/05/28/selenium-1-0-released/#comments</comments>
		<pubDate>Thu, 28 May 2009 10:26:26 +0000</pubDate>
		<dc:creator>Matt Rees - Cloud Testing</dc:creator>
				<category><![CDATA[Cloud Testing]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[Selenium Core]]></category>
		<category><![CDATA[Selenium RC]]></category>

		<guid isPermaLink="false">http://blog.cloudtesting.com/?p=96</guid>
		<description><![CDATA[Selenium 1.0 has been released (Core, RC and IDE). It is available for download at http://seleniumhq.org/ Scripts captured using Selenium IDE can be uploaded and run within the Cloud Testing service.]]></description>
			<content:encoded><![CDATA[<p>Selenium 1.0 has been released (Core, RC and IDE). It is available for download at <a href="http://seleniumhq.org/">http://seleniumhq.org/</a></p>
<p>Scripts captured using Selenium IDE can be uploaded and run within the <a href="http://www.cloudtesting.com/">Cloud Testing service</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cloudtesting.com/blog/2009/05/28/selenium-1-0-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

