<?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>am i works?</title>
	<atom:link href="http://amiworks.co.in/talk/feed/" rel="self" type="application/rss+xml" />
	<link>http://amiworks.co.in/talk</link>
	<description>all about my work</description>
	<lastBuildDate>Sat, 10 Mar 2012 20:22:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>How I started With PHP</title>
		<link>http://amiworks.co.in/talk/how-i-started-with-php/</link>
		<comments>http://amiworks.co.in/talk/how-i-started-with-php/#comments</comments>
		<pubDate>Sat, 10 Mar 2012 20:22:07 +0000</pubDate>
		<dc:creator>Amit Kumar Singh</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://amiworks.co.in/talk/?p=391</guid>
		<description><![CDATA[Khayrattee( @7php) of 7php.com recently published an interview with me, do read and let know your feedback. How I started With PHP was first posted on March 11, 2012 at 1:52 am.©2008 "am i works?".]]></description>
			<content:encoded><![CDATA[<p>Khayrattee( <a href="http://twitter.com/7php" target="_blank">@7php</a>) of 7php.com recently <a href="http://7php.com/php-interview-amit-singh/" target="_blank">published an interview with me</a>, do read and let know your feedback.</p>
<!-- WP Boastful Plugin by WPoets Team --> <div id='boastful'><strong></strong></div><hr style="border-top:black solid 1px" /><a href="http://amiworks.co.in/talk/how-i-started-with-php/">How I started With PHP</a> was first posted on March 11, 2012 at 1:52 am.<br />©2008 "<a href="http://amiworks.co.in/talk">am i works?</a>". <br />]]></content:encoded>
			<wfw:commentRss>http://amiworks.co.in/talk/how-i-started-with-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Why PHP is So Popular on Web?</title>
		<link>http://amiworks.co.in/talk/why-php-is-so-popular-on-web/</link>
		<comments>http://amiworks.co.in/talk/why-php-is-so-popular-on-web/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 09:49:03 +0000</pubDate>
		<dc:creator>Amit Kumar Singh</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://amiworks.co.in/talk/why-php-is-so-popular-on-web/</guid>
		<description><![CDATA[If you ever wondered why the hell PHP is so popular on the web when there are better and powerful languages available? Well, the answer is very simple, It is only language that allows even musicians to build sites for themselves. By the way that is also the reason why WordPress has become the king [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever wondered why the hell PHP is so popular on the web when there are better and powerful languages available?</p>
<p>Well, the answer is very simple, It is only language that allows <a href="http://phpadvent.org/2011/because-its-fun-by-derek-sivers" target="_blank">even musicians to build sites for themselves</a>.</p>
<p>By the way that is also the reason <a href="http://www.wpoets.com/general/which-cms-powers-more-then-60-of-top-one-million-websites/" target="_blank">why WordPress has become the king of CMS</a> and my choice for starting a <a href="http://www.wpoets.com" target="_blank">WordPress development team</a> – WPoets.</p>
<!-- WP Boastful Plugin by WPoets Team --> <div id='boastful'><strong></strong></div><hr style="border-top:black solid 1px" /><a href="http://amiworks.co.in/talk/why-php-is-so-popular-on-web/">Why PHP is So Popular on Web?</a> was first posted on December 2, 2011 at 3:19 pm.<br />©2008 "<a href="http://amiworks.co.in/talk">am i works?</a>". <br />]]></content:encoded>
			<wfw:commentRss>http://amiworks.co.in/talk/why-php-is-so-popular-on-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Pune effect on Indian Tech Events</title>
		<link>http://amiworks.co.in/talk/the-pune-effect-on-indian-tech-events/</link>
		<comments>http://amiworks.co.in/talk/the-pune-effect-on-indian-tech-events/#comments</comments>
		<pubDate>Thu, 13 Oct 2011 15:59:02 +0000</pubDate>
		<dc:creator>Amit Kumar Singh</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[pune effect]]></category>

		<guid isPermaLink="false">http://amiworks.co.in/talk/the-pune-effect-on-indian-tech-events/</guid>
		<description><![CDATA[&#160; Do you know about ‘The Pune Effect’ which influences all the Tech events in India, if not go read. And if you are an event organiser then consider Pune as venue for your next event. The Pune effect on Indian Tech Events was first posted on October 13, 2011 at 9:29 pm.©2008 "am i [...]]]></description>
			<content:encoded><![CDATA[<p>&#160;</p>
<p>Do you know about ‘<a href="http://punetech.com/the-pune-effect-or-why-every-technology-conference-must-come-to-pune/">The Pune Effect</a>’ which influences all the Tech events in India, if not go read. </p>
<p>And if you are an event organiser then consider Pune as venue for your next event.</p>
<!-- WP Boastful Plugin by WPoets Team --> <div id='boastful'><strong></strong></div><hr style="border-top:black solid 1px" /><a href="http://amiworks.co.in/talk/the-pune-effect-on-indian-tech-events/">The Pune effect on Indian Tech Events</a> was first posted on October 13, 2011 at 9:29 pm.<br />©2008 "<a href="http://amiworks.co.in/talk">am i works?</a>". <br />]]></content:encoded>
			<wfw:commentRss>http://amiworks.co.in/talk/the-pune-effect-on-indian-tech-events/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aspiring WordPress Developers Read These Articles First</title>
		<link>http://amiworks.co.in/talk/aspiring-wordpress-developers-read-these-articles-first/</link>
		<comments>http://amiworks.co.in/talk/aspiring-wordpress-developers-read-these-articles-first/#comments</comments>
		<pubDate>Wed, 30 Mar 2011 11:50:32 +0000</pubDate>
		<dc:creator>Amit Kumar Singh</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[reading list]]></category>
		<category><![CDATA[themes and plugins development]]></category>

		<guid isPermaLink="false">http://amiworks.co.in/talk/?p=375</guid>
		<description><![CDATA[If you are starting with WordPress Plugin or theme development, or want to know where to start then here is a small list of articles that you should read, some of them should be always open in your browser, and some of them in your RSS reader. &#160; &#160; &#160; Documentation and Help 1) http://codex.wordpress.org/Function_Reference: [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-weight: normal;">If you are starting with WordPress Plugin or theme development, or want to know where to start then here is a small list of articles that you should read, some of them should be always open in your browser, and some of them in your RSS reader. </span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>Documentation and Help</strong></p>
<p><strong>1) </strong><a href="http://codex.wordpress.org/Function_Reference">http://codex.wordpress.org/Function_Reference</a>: This article list almost all the core functions that are available for a plugin developer.</p>
<p><strong>2)</strong> <a href="http://codex.wordpress.org/Plugin_API/Action_Reference">http://codex.wordpress.org/Plugin_API/Action_Reference</a>: This article is a complete list of the action hooks available for use in plugin development.</p>
<p><strong>3)</strong> <a rel="nofollow" href="http://codex.wordpress.org/Plugin_API/Filter_Reference">http://codex.wordpress.org/Plugin_API/Filter_Reference</a>: This article is a complete list of the filter hooks available for use in plugin development.</p>
<p><strong>4)</strong> <a rel="nofollow" href="http://codex.wordpress.org/Data_Validation">http://codex.wordpress.org/Data_Validation</a>: This article is list all the function are available in WordPress core to help us with data sanitization and validation</p>
<p><strong>5)</strong> <a href="http://codex.wordpress.org/Site_Architecture_1.5">http://codex.wordpress.org/Site_Architecture_1.5</a>: This article describes the general site architecture of a WordPress theme to help you understand it.</p>
<p><strong>6)</strong> <a href="http://wordpress.stackexchange.com">http://wordpress.stackexchange.com</a>: This is *the* place to ask questions related to WordPress development, and off course give answers as well.</p>
<p><strong>7)</strong> <a rel="nofollow" href="http://iwebask.com/blog/2011/03/16/75rss-feeds-for-web-developers-wordpress-bloggers/">http://iwebask.com/blog/2011/03/16/75rss-feeds-for-web-developers-wordpress-bloggers/</a>: Whole bunch of links that you should follow on your RSS reader, so that you can stay in sync with latest WordPress tips and tricks.</p>
<p><strong> <img src='http://amiworks.co.in/talk/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> </strong> <a href="http://www.w3avenue.com/2009/09/28/definitive-list-of-free-wordpress-theme-frameworks/">http://www.w3avenue.com/2009/09/28/definitive-list-of-free-wordpress-theme-frameworks/</a>:  This article list whole bunch of theme frameworks that you can use for your themes.</p>
<p><strong> </strong></p>
<p><strong>WordPress Core Community</strong></p>
<p><strong>1)</strong> <a rel="nofollow" href="http://wpdevel.wordpress.com/">http://wpdevel.wordpress.com/</a> : This is the place where people in the core hang out, read it so that you are upto date with latest happenings about WordPress</p>
<p><strong>2)</strong> <a rel="nofollow" href="http://make.wordpress.org/themes/">http://make.wordpress.org/themes/</a>: This is where people who review themes submitted in the wordpress.org theme repository hang out.</p>
<p>Well these are the links that i have found very useful, and I spend most of my time there. If you have any such useful link please share in the comments below.</p>
<p>P.S. <a href="http://amiworks.com">We</a> are hiring WordPress developers, email me your resumes if you are interested to become part of the team.</p>
<!-- WP Boastful Plugin by WPoets Team --> <div id='boastful'><strong></strong></div><hr style="border-top:black solid 1px" /><a href="http://amiworks.co.in/talk/aspiring-wordpress-developers-read-these-articles-first/">Aspiring WordPress Developers Read These Articles First</a> was first posted on March 30, 2011 at 5:20 pm.<br />©2008 "<a href="http://amiworks.co.in/talk">am i works?</a>". <br />]]></content:encoded>
			<wfw:commentRss>http://amiworks.co.in/talk/aspiring-wordpress-developers-read-these-articles-first/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To Catch PHP Fatal Error In CodeIgniter</title>
		<link>http://amiworks.co.in/talk/how-to-catch-php-fatal-error-in-codeigniter/</link>
		<comments>http://amiworks.co.in/talk/how-to-catch-php-fatal-error-in-codeigniter/#comments</comments>
		<pubDate>Sat, 01 Jan 2011 14:32:29 +0000</pubDate>
		<dc:creator>Amit Kumar Singh</dc:creator>
				<category><![CDATA[how too?]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php fatal errors]]></category>

		<guid isPermaLink="false">http://amiworks.co.in/talk/?p=372</guid>
		<description><![CDATA[My last few blog post’s are result of the project that I am currently working on, and this blog is also in that series. We needed to catch PHP Fatal Errors in the production environment and notify about it to developers, also at the same time, showing our beautiful fail whale page to user instead [...]]]></description>
			<content:encoded><![CDATA[<p>My <a href="http://amiworks.co.in/talk/simple-way-to-add-global-exception-handling-in-codeigniter/">last</a> <a href="http://amiworks.co.in/talk/installing-pear-and-phpunit-on-wamp-and-windows-7/">few</a> <a href="http://amiworks.co.in/talk/testing-extjs-application-with-selenium-few-pointers/">blog</a> post’s are result of the project that I am currently working on, and this blog is also in that series.</p>
<p>We needed to catch PHP Fatal Errors in the production environment and notify about it to developers, also at the same time, showing our beautiful fail whale page to user instead of ugly error or a white screen of death.</p>
<p>Here I will show you how to do this in CodeIgniter, though credit for this idea goes to <a href="http://stackoverflow.com/questions/277224/how-do-i-catch-a-php-fatal-error/3795403#3795403">hipertracker</a>.</p>
<p>First of all you will need to setup a hook, so update your <em>hooks.php</em> file with following code</p>
<pre>	$hook['pre_system'][] = array(
	    'class'    =&gt; 'PHPFatalError',
            'function' =&gt; 'setHandler',
            'filename' =&gt; 'PHPFatalError.php',
   	    'filepath' =&gt; 'hooks'
);</pre>
<p>Now put the code shown below in <em>PHPFatalError.php</em> file in your applications <em>hooks</em> folder.</p>
<p><script src="https://gist.github.com/761775.js?file=PHPFatalError.php"></script></p>
<p>This is the simplifed version of what I have done, so please update <em>handleShutdown </em>function<em> </em>as per your needs.</p>
<div style="margin: 10px; background: #ffffcc; font-size: 1.2em; font-weight: bold; border: #aaaaaa 1px solid; padding: 5px;">Check out PHPCamp a place to share news, views and articles that are useful to <a style="color: #008888; text-decoration: underline;" title="PHP community where you learn something new every day " href="http://phpcamp.net/?utm_medium=blog_post&amp;utm_source=amiworks_co_in&amp;utm_campaign=phpunit_win7">PHP community</a>.</div>
<!-- WP Boastful Plugin by WPoets Team --> <div id='boastful'><strong></strong></div><hr style="border-top:black solid 1px" /><a href="http://amiworks.co.in/talk/how-to-catch-php-fatal-error-in-codeigniter/">How To Catch PHP Fatal Error In CodeIgniter</a> was first posted on January 1, 2011 at 8:02 pm.<br />©2008 "<a href="http://amiworks.co.in/talk">am i works?</a>". <br />]]></content:encoded>
			<wfw:commentRss>http://amiworks.co.in/talk/how-to-catch-php-fatal-error-in-codeigniter/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Get An Introduction To Functional Programming At TechWeekend 5</title>
		<link>http://amiworks.co.in/talk/get-an-introduction-to-functional-programming-at-techweekend-5/</link>
		<comments>http://amiworks.co.in/talk/get-an-introduction-to-functional-programming-at-techweekend-5/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 09:23:06 +0000</pubDate>
		<dc:creator>Amit Kumar Singh</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[functional programming]]></category>
		<category><![CDATA[techweekend]]></category>

		<guid isPermaLink="false">http://amiworks.co.in/talk/?p=370</guid>
		<description><![CDATA[5th edition of the TechWeekend is going to be about Functional Programming and if are hearing this term for first time, or if you are like me who has heard about it, but never got time to look into the details then you should definitely attend it. Event is on 18th Dec 2010, ie this [...]]]></description>
			<content:encoded><![CDATA[<p>5th edition of the TechWeekend is going to be about Functional Programming and if are hearing this term for first time, or if you are like me who has heard about it, but never got time to look into the details then you should definitely attend it.<a href="http://amiworks.co.in/talk/wp-content/uploads/2010/12/techweekend.jpg"><img style="background-image: none; margin: 5px; padding-left: 0px; padding-right: 0px; display: inline; float: right; padding-top: 0px; border-width: 0px;" title="techweekend" src="http://amiworks.co.in/talk/wp-content/uploads/2010/12/techweekend_thumb.jpg" border="0" alt="techweekend" width="310" height="115" align="right" /></a></p>
<p>Event is on 18th Dec 2010, ie this Saturday from 10 AM – 1 PM, at  505, A-Wing, Ground Floor MCCIA Trade Tower( ICC ) on SB Road.</p>
<p>Here is the quick agenda,</p>
<ol>
<li><strong>Why you should care about functional programming</strong> – by Dhananjay Nene. His id on twitter is <a href="http://twitter.com/dnene">@dnene</a> and he currently writes code for and advises <a href="http://vayana.in/">Vayana Enterprises</a> in his role as its Chief Architect.</li>
<li><strong>An Introduction to Erlang</strong> – by Bhasker Kode. On twitter he is <a href="http://twitter.com/bosky101">@bosky101</a> and he is the CEO and Co-Founder of Pune-based <a href="http://hover.in/">Hover Technologies</a>.</li>
<li><strong>Clojure &amp; its solution to the Expression Problem</strong> – By Baishampayan Ghose. On Twitter he is <a href="http://twitter.com/ghoseb">@ghoseb</a>, and he is the co-founder &amp; CTO of <a href="http://Paisa.com">http://Paisa.com</a></li>
</ol>
<p>Ohh.. and before I forget you need to <a href="http://techweekend5.eventbrite.com/">register( don’t worry it is free) for the event</a>.</p>
<p>See you guys on Saturday.</p>
<!-- WP Boastful Plugin by WPoets Team --> <div id='boastful'><strong></strong></div><hr style="border-top:black solid 1px" /><a href="http://amiworks.co.in/talk/get-an-introduction-to-functional-programming-at-techweekend-5/">Get An Introduction To Functional Programming At TechWeekend 5</a> was first posted on December 16, 2010 at 2:53 pm.<br />©2008 "<a href="http://amiworks.co.in/talk">am i works?</a>". <br />]]></content:encoded>
			<wfw:commentRss>http://amiworks.co.in/talk/get-an-introduction-to-functional-programming-at-techweekend-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP5 patch for FunctionList plugin of Notepad + +</title>
		<link>http://amiworks.co.in/talk/php5-patch-for-functionlist-plugin-of-notepad/</link>
		<comments>http://amiworks.co.in/talk/php5-patch-for-functionlist-plugin-of-notepad/#comments</comments>
		<pubDate>Tue, 14 Dec 2010 16:43:32 +0000</pubDate>
		<dc:creator>Amit Kumar Singh</dc:creator>
				<category><![CDATA[how too?]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[functionlist]]></category>
		<category><![CDATA[notepad++]]></category>

		<guid isPermaLink="false">http://amiworks.co.in/talk/?p=365</guid>
		<description><![CDATA[As you may know Notepad++ is my preferred development tool for PHP, and two months back I found FunctionList plugin that shows list of function in a opened PHP file, and it increased my productivity almost immediately. Only drawback was that it showed just function list and not variables. And today I found this neat [...]]]></description>
			<content:encoded><![CDATA[<p>As you may know Notepad++ is my preferred development tool for PHP, and two months back I found <a href="http://sourceforge.net/projects/npp-plugins/files/Function%20List/">FunctionList</a> plugin that shows list of function in a opened PHP file, and it increased my productivity almost immediately.</p>
<p>Only drawback was that it showed just function list and not variables.</p>
<p>And today I found this <a href="http://www.geoffray.be/blog/php/patch-php5-pour-npp-function-list">neat patch of this plugin by Geoffray Warnants</a><em></em> which now makes it even better with icons and also showing variable.</p>
<div style="float: left;">
<p>This is how it looked before</p>
<p><a href="http://amiworks.co.in/talk/wp-content/uploads/2010/12/functionlist-default.png"><img style="background-image: none; margin: 5px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="functionlist-default" src="http://amiworks.co.in/talk/wp-content/uploads/2010/12/functionlist-default.png" border="0" alt="functionlist-default" width="262" height="772" /></a></p>
</div>
<div style="float: left;">
<p>This is how it looks after the patch</p>
<p><a href="http://amiworks.co.in/talk/wp-content/uploads/2010/12/functionlist-php-patched.png"><img style="background-image: none; margin: 5px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="functionlist-php-patched" src="http://amiworks.co.in/talk/wp-content/uploads/2010/12/functionlist-php-patched.png" border="0" alt="functionlist-php-patched" width="262" height="772" /></a></p>
</div>
<p><a href="http://www.geoffray.be/blog/php/patch-php5-pour-npp-function-list">Download the patch here</a> (post is in French, scroll down to download the patch)</p>
<!-- WP Boastful Plugin by WPoets Team --> <div id='boastful'><strong></strong></div><hr style="border-top:black solid 1px" /><a href="http://amiworks.co.in/talk/php5-patch-for-functionlist-plugin-of-notepad/">PHP5 patch for FunctionList plugin of Notepad + +</a> was first posted on December 14, 2010 at 10:13 pm.<br />©2008 "<a href="http://amiworks.co.in/talk">am i works?</a>". <br />]]></content:encoded>
			<wfw:commentRss>http://amiworks.co.in/talk/php5-patch-for-functionlist-plugin-of-notepad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing Extjs Application With Selenium : Few Pointers</title>
		<link>http://amiworks.co.in/talk/testing-extjs-application-with-selenium-few-pointers/</link>
		<comments>http://amiworks.co.in/talk/testing-extjs-application-with-selenium-few-pointers/#comments</comments>
		<pubDate>Sat, 11 Dec 2010 19:18:19 +0000</pubDate>
		<dc:creator>Amit Kumar Singh</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[automated tests]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[selenium]]></category>

		<guid isPermaLink="false">http://amiworks.co.in/talk/?p=352</guid>
		<description><![CDATA[On a project that I am working on we needed to create few automated tests using selenium. Our frontend is completely written in Extjs. Being new to testing using selenium, I searched the web and here are few useful advices that I found. The most comprehensive one was by Ates Goral on stackoverflow. The biggest [...]]]></description>
			<content:encoded><![CDATA[<p>On a project that I am working on we needed to create few automated tests using selenium. Our frontend is completely written in Extjs. </p>
<p>Being new to testing using selenium, I searched the web and here are few useful advices that I found.</p>
<p>The most comprehensive one was by <a href="http://magnetiq.com/">Ates Goral</a> on <a href="http://stackoverflow.com/questions/107314/any-suggestions-for-testing-extjs-code-in-a-browser-preferably-with-selenium">stackoverflow</a>.</p>
<blockquote><p>The biggest hurdle in testing ExtJS with Selenium is that ExtJS doesn&#8217;t render standard HTML elements and the Selenium IDE will naively (and rightfully) generate commands targeted at elements that just act as decor &#8212; superfluous elements that help ExtJS with the whole desktop-look-and-feel. Here are a few tips and tricks that I&#8217;ve gathered while writing automated Selenium test against an ExtJS app.</p>
<h2>General Tips</h2>
<h3>Locating Elements</h3>
<p>When generating Selenium test cases by recording user actions with Selenium IDE on Firefox, Selenium will base the recorded actions on the ids of the HTML elements. However, for most clickable elements, ExtJS uses generated ids like &#8220;ext-gen-345&#8243; which are likely to change on a subsequent visit to the same page, even if no code changes have been made. After recording user actions for a test, there needs to be a manual effort to go through all such actions that depend on generated ids and to replace them. There are two types of replacements that can be made:</p>
<h3>Replacing an Id Locator with a CSS or XPath Locator</h3>
<p>CSS locators begin with &#8220;css=&#8221; and XPath locators begin with &#8220;//&#8221; (the &#8220;xpath=&#8221; prefix is optional). CSS locators are less verbose and are easier to read and should be preferred over XPath locators. However, there can be cases where XPath locators need to be used because a CSS locator simply can&#8217;t cut it.</p>
<h3>Executing JavaScript</h3>
<p>Some elements require more than simple mouse/keyboard interactions due to the complex rendering carried out by ExtJS. For example, a Ext.form.CombBox is not really a <code>&lt;select&gt;</code> element but a text input with a detached drop-down list that&#8217;s somewhere at the bottom of the document tree. In order to properly simulate a ComboBox selection, it&#8217;s possible to first simulate a click on the drop-down arrow and then to click on the list that appears. However, locating these elements through CSS or XPath locators can be cumbersome. An alternative is to locate the ComoBox component itself and call methods on it to simulate the selection:</p>
<pre><code>var combo = Ext.getCmp('genderComboBox'); // returns the ComboBox components
combo.setValue('female'); // set the value
combo.fireEvent('select'); // because setValue() doesn't trigger the event
</code></pre>
<p>In Selenium the <code>runScript</code> command can be used to perform the above operation in a more concise form:</p>
<pre><code>with (Ext.getCmp('genderComboBox')) { setValue('female'); fireEvent('select'); }
</code></pre>
<h3>Coping with AJAX and Slow Rendering</h3>
<p>Selenium has &#8220;*AndWait&#8221; flavors for all commands for waiting for page loads when a user action results in page transitions or reloads. However, since AJAX fetches don&#8217;t involve actual page loads, these commands can&#8217;t be used for synchronization. The solution is to make use of visual clues like the presence/absence of an AJAX progress indicator or the appearance of rows in a grid, additional components, links etc. For example:</p>
<pre><code>Command: waitForElementNotPresent
Target: css=div:contains('Loading...')
</code></pre>
<p>Sometimes an element will appear only after a certain amount of time, depending on how fast ExtJS renders components after a user action results in a view change. Instead of using arbitary delays with the <code>pause</code> command, the ideal method is to wait until the element of interest comes within our grasp. For example, to click on an item after waiting for it to appear:</p>
<pre><code>Command: waitForElementPresent
Target: css=span:contains('Do the funky thing')
Command: click
Target: css=span:contains('Do the funky thing')
</code></pre>
<p>Relying on arbitrary pauses is not a good idea since timing differences that result from running the tests in different browsers or on different machines will make the test cases flaky.</p>
<h3>Non-clickable Items</h3>
<p>Some elements can&#8217;t be triggered by the <code>click</code> command. It&#8217;s because the event listener is actually on the container, watching for mouse events on its child elements, that eventually bubble up to the parent. The tab control is one example. To click on the a tab, you have to simulate a <code>mouseDown</code> event at the tab label:</p>
<pre><code>Command: mouseDownAt
Target: css=.x-tab-strip-text:contains('Options')
Value: 0,0
</code></pre>
<h3>Field Validation</h3>
<p>Form fields (Ext.form.* components) that have associated regular expressions or vtypes for validation will trigger validation with a certain delay (see the <code>validationDelay</code> property which is set to 250ms by default), after the user enters text or immediately when the field loses focus &#8212; or blurs (see the<code>validateOnDelay</code> property). In order to trigger field validation after issuing the type Selenium command to enter some text inside a field, you have to do either of the following:</p>
<ul>
<li><strong>Triggering Delayed Validation</strong> ExtJS fires off the validation delay timer when the field receives keyup events. To trigger this timer, simply issue a dummy keyup event (it doesn&#8217;t matter which key you use as ExtJS ignores it), followed by a short pause that is longer than the validationDelay:
<pre><code>Command: keyUp
Target: someTextArea
Value: x
Command: pause
Target: 500
</code></pre>
</li>
<li><strong>Triggering Immediate Validation</strong> You can inject a blur event into the field to trigger immediate validation:
<pre><code>Command: runScript
Target: someComponent.nameTextField.fireEvent("blur")
</code></pre>
</li>
</ul>
<h3>Checking for Validation Results</h3>
<p>Following validation, you can check for the presence or absence of an error field:</p>
<pre><code>Command: verifyElementNotPresent  
Target: //*[@id="nameTextField"]/../*[@class="x-form-invalid-msg" and not(contains(@style, "display: none"))]

Command: verifyElementPresent  
Target: //*[@id="nameTextField"]/../*[@class="x-form-invalid-msg" and not(contains(@style, "display: none"))]
</code></pre>
<p>Note that the &#8220;display: none&#8221; check is necessary because once an error field is shown and then it needs to be hidden, ExtJS will simply hide error field instead of entirely removing it from the DOM tree.
</p></blockquote>
<div style="margin: 10px; background: #ffffcc; font-size: 1.2em; font-weight: bold; border: #aaaaaa 1px solid; padding: 5px;">Check out PHPCamp a place to share news, views and articles that are useful to <a style="color: #008888; text-decoration: underline;" title="PHP community where you learn something new every day " href="http://phpcamp.net/?utm_medium=blog_post&amp;utm_source=amiworks_co_in&amp;utm_campaign=phpunit_win7">PHP community</a>.</div>
<blockquote>
<h2>Element-specific Tips</h2>
<h3>Clicking an Ext.form.Button</h3>
<ul>
<li><strong>Option 1</strong> </li>
<pre><code>Command: click Target: css=button:contains('Save')
Selects the button by its caption</code></pre>
<li><strong>Option 2</strong></li>
<pre><code>Command: click Target: css=#save-options button
 Selects the button by its id</code></pre>
</ul>
<h3>Selecting a Value from an Ext.form.ComboBox</h3>
<pre><code>Command: runScript
Target: with (Ext.getCmp('genderComboBox')) { setValue('female'); fireEvent('select'); }
</code></pre>
<p>First sets the value and then explicitly fires the select event in case there are observers.</p></blockquote>
<p>Second useful tip was about how to continue to run the test when some test fails, it was by <a href="http://blog.browsermob.com/2010/06/advanced-handling-of-page-timeouts-in-selenium/">Patrick Lightbody</a></p>
<blockquote>
<pre>try {
    selenium.waitForPageToLoad(timeout);
} catch (e) {
    // this will happen after 90 seconds
    // todo: recover and send the browser to the the next URL</pre>
</blockquote>
<p>Another useful tip that I found was by <a href="http://www.jslog.com/testing-extjs-with-selenium-automating-ui-tests">radu</a> that solved the issues caused by auto-generated id by ExtJS.</p>
<blockquote><p>Selenium tests for ExtJS should rely on CSS selectors.</p>
<pre>//table[contains(@class,'seleniumOkButton')]</pre>
</blockquote>
<p>Finally the most important and useful is the <a href="http://pear.php.net/package/Testing_Selenium/docs/0.4.4/Selenium/Testing_Selenium.html">documentation of Testing_Selenium</a> which lists all the supported functions of selenium RC.</p>
<p>One more thing version 0.4.4 of Testing_Selenium pear pacakge has a missing function <em>getNumber</em> <a href="http://pear.php.net/bugs/bug.php?id=12689">check this bug report</a> to get that function.</p>
<!-- WP Boastful Plugin by WPoets Team --> <div id='boastful'><strong></strong></div><hr style="border-top:black solid 1px" /><a href="http://amiworks.co.in/talk/testing-extjs-application-with-selenium-few-pointers/">Testing Extjs Application With Selenium : Few Pointers</a> was first posted on December 12, 2010 at 12:48 am.<br />©2008 "<a href="http://amiworks.co.in/talk">am i works?</a>". <br />]]></content:encoded>
			<wfw:commentRss>http://amiworks.co.in/talk/testing-extjs-application-with-selenium-few-pointers/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Installing PEAR and PHPUnit on WAMP and Windows 7</title>
		<link>http://amiworks.co.in/talk/installing-pear-and-phpunit-on-wamp-and-windows-7/</link>
		<comments>http://amiworks.co.in/talk/installing-pear-and-phpunit-on-wamp-and-windows-7/#comments</comments>
		<pubDate>Sat, 30 Oct 2010 02:51:00 +0000</pubDate>
		<dc:creator>Amit Kumar Singh</dc:creator>
				<category><![CDATA[how too?]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[pear]]></category>
		<category><![CDATA[phpunit]]></category>
		<category><![CDATA[wamp]]></category>

		<guid isPermaLink="false">http://amiworks.co.in/talk/installing-pear-and-phpunit-on-wamp-and-windows-7/</guid>
		<description><![CDATA[In the project that i am currently working on, we decided to use PHPUnit for doing our unit testing, and i found that it was not a straight forward thing to install that I had thought it would be. I had to start by installing Pear, and as soon as i type ‘go-pear’ in command [...]]]></description>
			<content:encoded><![CDATA[<p>    In the project that i am currently working on, we decided to use PHPUnit for doing our unit testing, and i found that it was not a straight forward thing to install that I had thought it would be. I had to start by installing Pear, and as soon as i type ‘go-pear’ in command prompt and pressed enter key I got my first error.</p>
<p>So here are the steps needed to install PEAR and PHPUnit error free on WAMP.</p>
<p>So let’s start with PEAR, please note my Wampserver is installed on drive ‘H’,&#160; substitute it with your own.</p>
<p>  <span id="more-345"></span><br />
<h2>Steps to Install PEAR</h2>
<p>1 ) Locate the &quot;php.ini&quot; file. In my case, I found it at this path:</p>
<pre>H:\wamp\bin\php\php5.3.0\php.ini</pre>
<p>Don&#8217;t use the WAMP system tray icon to edit this file.</p>
<p>2 ) Find the following line:</p>
<pre>;phar.require_hash = On</pre>
<p>3 ) Uncomment the &quot;;phar.require_hash = On&quot; line by removing the semi-colon.</p>
<p>4 ) Change &quot;On&quot; to &quot;Off&quot;.</p>
<pre>phar.require_hash = Off</pre>
<p>5 ) Save the file.</p>
<p>6 ) Now on command prompt type ‘<em>go-pear</em>’</p>
<p>7 ) Select ‘<em>local</em>’ to the question asked.. and follow the instructions.</p>
<p>8 ) Now we need to edit the ‘<em>php.ini</em>’ again to add pear include path. Open ‘<em>php.ini</em>’ that we found in php5.3.0 folder and search for ‘go-pear’, you will see </p>
<pre>;***** Added by go-pear
include_path=&quot;.;H:\wamp\bin\php\php5.3.0\pear&quot; 

;*****</pre>
<p>Copy these three lines and paste it to ‘<em>php.ini</em>’ file which is located at : </p>
<pre>H:\wamp\bin\apache\apache2.2.11\bin </pre>
<p>9 ) Restart the apache, and you have PEAR installed on you machine.</p>
<p>But we are not done yet, to use ‘pear’ command in your command prompt from anywhere you will need to modify the windows environment variables. </p>
<p>10 ) Go to <em>control panel –&gt; system</em>&#160; and click on the ‘<em>advanced system settings</em>’ (it is on the left sidebar)</p>
<p>11 ) Click on the environment variables button and <em>new/edit</em> ‘PATH’ variable and add&#160; </p>
<pre>‘H:\wamp\bin\php\php5.3.0’</pre>
<p>in your path. You also need to add a new variable ‘PHP_PEAR_PHP_BIN’ and set the value to </p>
<pre>‘H:\wamp\bin\php\php5.3.0\php.exe’</pre>
<p>close you command prompt and open it again for these changes to take effect.</p>
<p>12 ) now type ‘<em>pear’</em> on the command prompt and you should see pear command help printed for you.</p>
<p>Now that PEAR is installed, let’s install the PHPUnit.</p>
<div style="margin: 10px; background: #ffffcc; font-size: 1.2em; font-weight: bold; border: #aaaaaa 1px solid; padding: 5px;">Check out PHPCamp a place to share news, views and articles that are useful to <a style="color: #008888; text-decoration: underline;" title="PHP community where you learn something new every day " href="http://phpcamp.net/?utm_medium=blog_post&amp;utm_source=amiworks_co_in&amp;utm_campaign=pear_phpunit_win7">PHP community</a>.</div>
<h2>Steps to install PHPUnit</h2>
<p>1 ) On ‘C’ drive create a folder named ‘php5’</p>
<p>2 )Then on command prompt type:</p>
<pre> pear upgrade pear</pre>
<p>2 ) Once PEAR&#160; is updated, on command prompt type:</p>
<pre> pear channel-discover components.ez.no 

 pear channel-discover pear.phpunit.de

 pear channel-discover pear.symfony-project.com</pre>
<p>4 )Finally type: </p>
<pre> pear install --alldeps phpunit/PHPUnit</pre>
<p>And with this you should have PHPUnit installed on your system. </p>
<p>In my quest to install PHPUnit I found help from following articles</p>
<ol>
<li><a href="http://stackoverflow.com/questions/1652941/why-am-i-receiving-an-error-when-installing-pear">Stackoverflow</a></li>
<li><a href="http://www.wampserver.com/phorum/read.php?2,67257">Wampserver forum</a></li>
<li><a href="http://usingzendframework.blogspot.com/2007/12/setting-up-phpunit.html">Using Zend Framework blog</a></li>
</ol>
<!-- WP Boastful Plugin by WPoets Team --> <div id='boastful'><strong></strong></div><hr style="border-top:black solid 1px" /><a href="http://amiworks.co.in/talk/installing-pear-and-phpunit-on-wamp-and-windows-7/">Installing PEAR and PHPUnit on WAMP and Windows 7</a> was first posted on October 30, 2010 at 8:21 am.<br />©2008 "<a href="http://amiworks.co.in/talk">am i works?</a>". <br />]]></content:encoded>
			<wfw:commentRss>http://amiworks.co.in/talk/installing-pear-and-phpunit-on-wamp-and-windows-7/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Simple Way To Add Global Exception Handling In CodeIgniter</title>
		<link>http://amiworks.co.in/talk/simple-way-to-add-global-exception-handling-in-codeigniter/</link>
		<comments>http://amiworks.co.in/talk/simple-way-to-add-global-exception-handling-in-codeigniter/#comments</comments>
		<pubDate>Sat, 02 Oct 2010 13:28:40 +0000</pubDate>
		<dc:creator>Amit Kumar Singh</dc:creator>
				<category><![CDATA[how too?]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[exception handling]]></category>

		<guid isPermaLink="false">http://amiworks.co.in/talk/?p=338</guid>
		<description><![CDATA[I am working on a project where we needed to capture exceptions at a global level instead of doing it at every step as they were not critical, but important for us to know. The idea was that whenever such an exception occur on production we should send an email to developers mailing list so [...]]]></description>
			<content:encoded><![CDATA[<p>I am working on a project where we needed to capture exceptions at a global level instead of doing it at every step as they were not critical, but important for us to know.</p>
<p>The idea was that whenever such an exception occur on production we should send an email to developers mailing list so that someone can investigate it.</p>
<p>As usual I did a quick google search and i found <a href="http://codeigniter.com/forums/viewthread/141573/">two</a> <a href="http://codeigniter.com/forums/viewthread/126752/">forum</a> posts in CodeIgniter and <a href="http://stackoverflow.com/questions/260597/in-codeigniter-how-can-i-have-php-error-messages-emailed-to-me">one</a> on stackoverflow, but they all fall short as CodeIgniter does not set’s any default exception handlers they way it sets the native error handler.</p>
<p>So here is a quick tutorial on how you can do that.<br />
<span id="more-338"></span><br />
First of all you need to setup a hook, so put following code in <em>hook.php</em> file in config folder.</p>
<pre>$hook['pre_controller'][] = array(
                   'class'    =&gt; 'ExceptionHook',
                   'function' =&gt; 'SetExceptionHandler',
                   'filename' =&gt; 'ExceptionHook.php',
                   'filepath' =&gt; 'hooks'
                  );</pre>
<p>Now I am using <em>pre_controller</em> hook as I wanted to use $CI object which is available at this stage.</p>
<p>Now put the code shown below in the file named <em>ExceptionHook.php</em> in your application’s <em>hooks</em> folder.</p>
<p><script src="http://gist.github.com/607550.js?file=ExceptionHook.php"></script> </p>
<p>Also if you need to capture and email native PHP errors, you can do so by extending the Exceptions library as shown in the code below.</p>
<p><script src="http://gist.github.com/607550.js?file=MY_Exceptions.php"></script></p>
<p>While I have used the simple PHP mail function in the example above, you can use CI&#8217;s mail library as well. </p>
<p>If you have any doubts feel free to ask in comments below.</p>
<!-- WP Boastful Plugin by WPoets Team --> <div id='boastful'><strong></strong></div><hr style="border-top:black solid 1px" /><a href="http://amiworks.co.in/talk/simple-way-to-add-global-exception-handling-in-codeigniter/">Simple Way To Add Global Exception Handling In CodeIgniter</a> was first posted on October 2, 2010 at 6:58 pm.<br />©2008 "<a href="http://amiworks.co.in/talk">am i works?</a>". <br />]]></content:encoded>
			<wfw:commentRss>http://amiworks.co.in/talk/simple-way-to-add-global-exception-handling-in-codeigniter/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 1.191 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-05-17 19:15:34 -->

