<?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: WatiN and INamingContainer adventures</title>
	<atom:link href="http://lostechies.com/jimmybogard/2008/01/23/watin-and-inamingcontainer-adventures/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/jimmybogard/2008/01/23/watin-and-inamingcontainer-adventures/</link>
	<description>Strong opinions, weakly held</description>
	<lastBuildDate>Wed, 19 Jun 2013 05:19:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: ftorres</title>
		<link>http://lostechies.com/jimmybogard/2008/01/23/watin-and-inamingcontainer-adventures/#comment-144</link>
		<dc:creator>ftorres</dc:creator>
		<pubDate>Fri, 25 Jan 2008 02:50:07 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2008/01/23/watin-and-inamingcontainer-adventures.aspx#comment-144</guid>
		<description>Interresting problem to solve, The next version of InCisif.net (2.1) will support this problem during recording and run time and produce clear code like this one:

Page.Control(AspNetId(&quot;butCreateAccount&quot;)).Click(); //  ASP.NET ID:ctl00$ContentPlaceHolder1$butCreateAccount
Page.WaitForPage(@&quot;/frmCreateAccount.aspx&quot;);


Page.Control(AspNetId(&quot;FirstName&quot;)).Text =	&quot;Joe&quot;; //  ASP.NET ID:ctl00$ContentPlaceHolder1$FirstName
Page.Control(AspNetId(&quot;LastName&quot;)).Text =	&quot;Doe&quot;; //  ASP.NET ID:ctl00$ContentPlaceHolder1$LastName

Page.Control(AspNetId(&quot;butOK&quot;)).Click(); //  ASP.NET ID:ctl00$ContentPlaceHolder1$butOK
Page.WaitForPage(@&quot;/MainMenu.aspx&quot;);


The function AspNetId can be override and the default implementation look like this:

     public virtual string AspNetId(string id){
            
            string t = string.Format(@&quot;re:(.*\${0}$)&#124;(.*_{0}$)&quot;, id);
            if(Page.Control(t)!=null)return t;

            return id;
        }


Frederic Torres
&lt;a href=&quot;http://www.InCisif.net&quot;&gt;www.InCisif.net&lt;/a&gt;
Web Testing with C# or VB.NET

</description>
		<content:encoded><![CDATA[<p>Interresting problem to solve, The next version of InCisif.net (2.1) will support this problem during recording and run time and produce clear code like this one:</p>
<p>Page.Control(AspNetId(&#8220;butCreateAccount&#8221;)).Click(); //  ASP.NET ID:ctl00$ContentPlaceHolder1$butCreateAccount<br />
Page.WaitForPage(@&#8221;/frmCreateAccount.aspx&#8221;);</p>
<p>Page.Control(AspNetId(&#8220;FirstName&#8221;)).Text =	&#8220;Joe&#8221;; //  ASP.NET ID:ctl00$ContentPlaceHolder1$FirstName<br />
Page.Control(AspNetId(&#8220;LastName&#8221;)).Text =	&#8220;Doe&#8221;; //  ASP.NET ID:ctl00$ContentPlaceHolder1$LastName</p>
<p>Page.Control(AspNetId(&#8220;butOK&#8221;)).Click(); //  ASP.NET ID:ctl00$ContentPlaceHolder1$butOK<br />
Page.WaitForPage(@&#8221;/MainMenu.aspx&#8221;);</p>
<p>The function AspNetId can be override and the default implementation look like this:</p>
<p>     public virtual string AspNetId(string id){</p>
<p>            string t = string.Format(@&#8221;re:(.*\${0}$)|(.*_{0}$)&#8221;, id);<br />
            if(Page.Control(t)!=null)return t;</p>
<p>            return id;<br />
        }</p>
<p>Frederic Torres<br />
<a href="http://www.InCisif.net">http://www.InCisif.net</a><br />
Web Testing with C# or VB.NET</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Darrell Mozingo</title>
		<link>http://lostechies.com/jimmybogard/2008/01/23/watin-and-inamingcontainer-adventures/#comment-143</link>
		<dc:creator>Darrell Mozingo</dc:creator>
		<pubDate>Thu, 24 Jan 2008 12:51:04 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2008/01/23/watin-and-inamingcontainer-adventures.aspx#comment-143</guid>
		<description>You can use the LayoutTemplate section of the Login control to specify your own HTML, and therefore control IDs. See:

http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.login.layouttemplate(VS.80).aspx

http://msdn2.microsoft.com/en-us/library/ms178339(VS.80).aspx</description>
		<content:encoded><![CDATA[<p>You can use the LayoutTemplate section of the Login control to specify your own HTML, and therefore control IDs. See:</p>
<p><a href="http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.login.layouttemplate(VS.80)" rel="nofollow">http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.login.layouttemplate(VS.80)</a>.aspx</p>
<p><a href="http://msdn2.microsoft.com/en-us/library/ms178339(VS.80)" rel="nofollow">http://msdn2.microsoft.com/en-us/library/ms178339(VS.80)</a>.aspx</p>
]]></content:encoded>
	</item>
</channel>
</rss>
