<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: Drive jqGrid with Selenium or Celerity</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/drive-jqgrid-with-selenium-or-celerity</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/help/drive-jqgrid-with-selenium-or-celerity/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>alvin on Drive jqGrid with Selenium or Celerity</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/drive-jqgrid-with-selenium-or-celerity#p4163</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/drive-jqgrid-with-selenium-or-celerity#p4163</guid>
        	        	<description><![CDATA[<p>The &#39;onSelectRow&#39; callback is:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit6895' value='Select Code' data-codeid='sfcode6895' /></p>
<div class='sfcode' id='sfcode6895'>function(row_id) {<br />&#160; var row_data = $(&#39;#list&#39;).getRowData(row_id);</p>
<p>&#160; $(&#39;input#asset_id&#39;).val(row_id);<br />&#160; $(&#39;input#asset_title&#39;).val(row_data.title);<br />}</p>
</div>
<p>It populates the #asset_id and #asset_title inputs with data from the grid. This works well.</p>
<p>I want to create an automated test that simulates the user clicking on the row to fire the &#39;onSelectRow&#39; callback.&#160; The goal is to verify the page is updated as expected.</p>
<p>Normally when I want to simulate the user following a link I can do something like:<br /><span class="sfcode">find_link_with_name(&#39;Follow me&#39;).click</span><br />I do not understand the jqGrid mouse event processing well enough to identify which HTML tag to "click" that will trigger the &#39;onSelectRow&#39; callback.</p>
<p>One option is to run javascript that sets the selected row:<br /><span class="sfcode">@browser.execute_script("$(&#39;#list&#39;).setSelection(&#39;34&#39;)")</span><br />I am hoping to achieve the same result without using javascript.</p>
<p>I will post a better example in a week or so.</p>
<p>Alvin.</p>
]]></description>
        	        	<pubDate>Mon, 26 Jan 2009 18:00:53 +0200</pubDate>
        </item>
        <item>
        	<title>rsea on Drive jqGrid with Selenium or Celerity</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/drive-jqgrid-with-selenium-or-celerity#p4128</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/drive-jqgrid-with-selenium-or-celerity#p4128</guid>
        	        	<description><![CDATA[<p>Have you tried &#39;onSelectRow&#39; option?</p>
<p>To automate, I&#39;m not sure if I get what you want but I think it is populate html atfer loading the grid, the option &#39;loadComplete&#39; runs functions after the loading is complete, you could use it for what you want.</p>
<p>Best regards,</p>
<p>Rodolfo.</p>
]]></description>
        	        	<pubDate>Fri, 23 Jan 2009 20:07:51 +0200</pubDate>
        </item>
        <item>
        	<title>alvin on Drive jqGrid with Selenium or Celerity</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/drive-jqgrid-with-selenium-or-celerity#p4127</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/drive-jqgrid-with-selenium-or-celerity#p4127</guid>
        	        	<description><![CDATA[<p>I set up a grid to display data. When I click on a row the grid populates HTML elements on the page.&#160;&#160; This works when I test manually.</p>
<p>I want to automate these test steps by driving the grid using Selenium.</p>
<p>I tried doing $(&#39;tr#1602&#39;).click() to simulate the user clicking on a row.&#160; However, jqGrid does not respond to this.</p>
<p>Which element should I direct the click to?</p>
<p>Is there a better way to automate testing a jqGrid instance?</p>
<p>Thanks,</p>
<p>Alvin.</p>
]]></description>
        	        	<pubDate>Fri, 23 Jan 2009 18:46:29 +0200</pubDate>
        </item>
</channel>
</rss>