<?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>gyrmination &#187; Selenium</title>
	<atom:link href="http://ttwhy.org/home/blog/category/selenium/feed/" rel="self" type="application/rss+xml" />
	<link>http://ttwhy.org/home/blog</link>
	<description>from the seeds of gyrm</description>
	<lastBuildDate>Sun, 04 Jul 2010 15:19:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Selenium is Groovy</title>
		<link>http://ttwhy.org/home/blog/2008/09/26/selenium-is-groovy/</link>
		<comments>http://ttwhy.org/home/blog/2008/09/26/selenium-is-groovy/#comments</comments>
		<pubDate>Sat, 27 Sep 2008 03:28:10 +0000</pubDate>
		<dc:creator>gyrm</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Selenium]]></category>

		<guid isPermaLink="false">http://ttwhy.org/home/blog/2008/09/26/selenium-is-groovy/</guid>
		<description><![CDATA[UI-Element has been integrated into Selenium Core in the project&#8217;s subversion repository for some time now. This means no special tricks are necessary to use it &#8211; just specify your map file as a user extension! I&#8217;m posting this announcement mainly because it seems my original UI-Element post is at the top of Google&#8217;s search [...]]]></description>
			<content:encoded><![CDATA[<p>UI-Element has been integrated into Selenium Core in the project&#8217;s subversion repository for some time now. This means no special tricks are necessary to use it &#8211; just specify your map file as a user extension! I&#8217;m posting this announcement mainly because it seems my original UI-Element post is at the top of Google&#8217;s search results, and I wanted to make clear that some things have changed significantly since it was published (but don&#8217;t want to rewrite the thing &#8230; you know, for posterity!).</p>
<p>Here&#8217;s the <a href="http://svn.openqa.org/fisheye/browse/~raw,r=trunk/selenium/trunk/src/main/resources/core/scripts/ui-doc.html">updated documentation link</a> (if it doesn&#8217;t move again).</p>
<p>In other news, there is now a Groovy formatter for Selenium IDE, and support for a special <code>GroovySeleneseTestCase</code> which makes it possible to merge <em>*AndWait</em> commands into single commands. For example:</p>
<pre class="code">
clickAndWait | foo
</pre>
<p>with the Java formatter translates into:</p>
<pre class="code">
selenium.click("foo");
selenium.waitForPageToLoad("30000");
</pre>
<p>while the Groovy formatter simply says:</p>
<pre class="code">
selenium.clickAndWait("foo")
</pre>
<p>Cleaner, and more expressive.</p>
]]></content:encoded>
			<wfw:commentRss>http://ttwhy.org/home/blog/2008/09/26/selenium-is-groovy/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Selenium RC Per-Session Extension Javascript</title>
		<link>http://ttwhy.org/home/blog/2008/05/14/selenium-rc-per-session-extension-javascript/</link>
		<comments>http://ttwhy.org/home/blog/2008/05/14/selenium-rc-per-session-extension-javascript/#comments</comments>
		<pubDate>Thu, 15 May 2008 00:46:24 +0000</pubDate>
		<dc:creator>gyrm</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Selenium]]></category>

		<guid isPermaLink="false">http://ttwhy.org/home/blog/2008/05/14/selenium-rc-per-session-extension-javascript/</guid>
		<description><![CDATA[Several people have asked if it is possible to specify user extension Javascript dynamically with the RC, as opposed to on the command line with the -userExtensions flag when starting up the server. It wasn&#8217;t possible before. It should be now. If you build from r2291 or greater from the RC trunk, you can play [...]]]></description>
			<content:encoded><![CDATA[<p>Several people have asked if it is possible to specify user extension Javascript dynamically with the RC, as opposed to on the command line with the <code>-userExtensions</code> flag when starting up the server. It wasn&#8217;t possible before.</p>
<p>It should be now.</p>
<p>If you build from r2291 or greater from the RC trunk, you can play with it. Basically, the extension Javascript must be specified before the browser is launched, and stays in-play until the session is closed. A sample test has been checked in here:</p>
<p><a href="http://svn.openqa.org/fisheye/browse/selenium-rc/trunk/tests/generated/src/test/java/com/thoughtworks/selenium/thirdparty/SessionExtensionJsTest.java?r=2365">SessionExtensionJsTest.java</a></p>
<p>This probably doesn&#8217;t work for proxy injection mode yet.</p>
<p>Happy extending!  <img src='http://ttwhy.org/home/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Update</strong></p>
<p>It appears too easy to encounter the &#8220;414 Request URI Too Large&#8221; issue. I&#8217;m looking into this.</p>
<p><strong>Update</strong></p>
<p>Looks like the 414 issue is related specifically to the Perl driver (see <a href="http://clearspace.openqa.org/message/43875">this Clearspace post</a>); I noticed it when using Perl, but did not see the issue when running an equivalent test in Groovy:</p>
<pre class="code">
import com.thoughtworks.selenium.*

class URILengthTest extends GroovyTestCase {
    def selenium

    @Override
    void setUp() {
        selenium = new DefaultSelenium('localhost',
            4444, '*firefox',
            'http://alistapart.com')
    }

    @Override
    void tearDown() {
        selenium.stop()
    }

    void testURILength() {
        def extensionJs = new File(
            'selenium-core/src/main/resources/core/scripts/ui-map-sample.js').text

        selenium.setExtensionJs(extensionJs)
        selenium.start()
        selenium.open('http://alistapart.com')
        selenium.click(
            'ui=allPages::section(section=topics)')
        selenium.waitForPageToLoad('5000')
    }
}
</pre>
<p><strong>Update</strong></p>
<p>Unfortunately, the 414 issue also affects the Python and Ruby client drivers (I just tested and verified this). I&#8217;m not about to fix them right this moment, so it appears the you can only truly take advantage of the per-session extension feature (i.e. include extensions of arbitrary size) in Java and Groovy for now.  <img src='http://ttwhy.org/home/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />   The good news is that this issue has already been reported, and JIRA tickets created (<a href="http://jira.openqa.org/browse/SRC-319">SRC-319</a> for Perl, <a href="http://jira.openqa.org/browse/SRC-321">SRC-321</a> for Python, <a href="http://jira.openqa.org/browse/SRC-322">SRC-322</a> for Ruby, and others for C# and PHP).</p>
]]></content:encoded>
			<wfw:commentRss>http://ttwhy.org/home/blog/2008/05/14/selenium-rc-per-session-extension-javascript/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Selenium IE XPath Enhancements</title>
		<link>http://ttwhy.org/home/blog/2008/04/24/selenium-ie-xpath-enhancements/</link>
		<comments>http://ttwhy.org/home/blog/2008/04/24/selenium-ie-xpath-enhancements/#comments</comments>
		<pubDate>Fri, 25 Apr 2008 01:56:23 +0000</pubDate>
		<dc:creator>gyrm</dc:creator>
				<category><![CDATA[Selenium]]></category>

		<guid isPermaLink="false">http://ttwhy.org/home/blog/2008/04/24/selenium-ie-xpath-enhancements/</guid>
		<description><![CDATA[I recently made some performance improvements to the ajaxslt XPath library Selenium uses to drive XPaths in IE. One user asked me whether those could be made available. The answer is, they&#8217;re already in the Core subversion trunk! So you can pull down a copy and see if it helps with your IE woes. Thought [...]]]></description>
			<content:encoded><![CDATA[<p>I recently made some performance improvements to the ajaxslt XPath library Selenium uses to drive XPaths in IE. One user asked me whether those could be made available. The answer is, they&#8217;re already in the Core subversion trunk! So you can pull down a copy and see if it helps with your IE woes.</p>
<p>Thought I&#8217;d also expose the tool I <a href="/home/blog/2007/12/11/javascript-profiler/">mentioned earlier</a> that I&#8217;ve been using to find the places to optimize. You can play with the <a href="/code/jsprofile">jsprofile sample tests</a> now without checking out any code. Cool!</p>
<p>Keep in mind that the sample Google News page contains very old news.  <img src='http://ttwhy.org/home/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://ttwhy.org/home/blog/2008/04/24/selenium-ie-xpath-enhancements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript Profiler</title>
		<link>http://ttwhy.org/home/blog/2007/12/11/javascript-profiler/</link>
		<comments>http://ttwhy.org/home/blog/2007/12/11/javascript-profiler/#comments</comments>
		<pubDate>Wed, 12 Dec 2007 02:59:56 +0000</pubDate>
		<dc:creator>gyrm</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Selenium]]></category>

		<guid isPermaLink="false">http://ttwhy.org/home/blog/2007/12/11/javascript-profiler/</guid>
		<description><![CDATA[I&#8217;ve recently been working on a cross-browser javascript profiler I call jsprofile. It&#8217;s finally beginning to take shape. The main idea was to be able to profile javascript in IE in addition to Firefox, as Firefox already has the excellent Firebug extension going for it. The main driver for wanting to profile in IE was [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently been working on a <a href="http://code.google.com/p/jsprofile/">cross-browser javascript profiler I call jsprofile</a>. It&#8217;s finally beginning to take shape. The main idea was to be able to profile javascript in IE in addition to Firefox, as Firefox already has the excellent Firebug extension going for it. The main driver for wanting to profile in IE was the desire to analyze performance of the ajaxslt library&#8217;s XPath evaluation.</p>
<p>I ran a brief test using the same XPath I&#8217;ve been using for a while, on a snapshot of the Google News page, comparing IE7 against Firefox2. I used ajaxslt 0.8 . The results are quite interesting, download here in OpenOffice format: <a href='http://ttwhy.org/home/blog/wp-content/ajaxslt_profile.ods' title='Ajaxslt Profiling Results'>Ajaxslt Profiling Results</a></p>
<p>If my profiling results are correct (I acknowledge more rigor is possible (the &#8220;a script is running for a long time&#8221; dialog popped up several times when I was profiling IE7, taking some time to dismiss), but I just wanted to perform a quick test), several important trends are evident.</p>
<p>First, IE7 is way way slower than Firefox. But we knew that.  <img src='http://ttwhy.org/home/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Second, the results don&#8217;t equivocate about which method calls are taking the longest. The top four worthy of consideration for optimization are (in order of total time consumed): <code>xPathStep</code>, <code>ExprContext</code>, <code>BooleanValue</code>, and <code>copyArray</code>.</p>
<p>Third, the average own time for <code>xPathStep</code> is grossly larger in IE than in Firefox; 5.18ms, versus only 0.22ms.</p>
<p>Finally, perhaps the most surprising result is that the number of method calls differed on the browsers, even though the XPath used was exactly the same. Shockingly, both <code>ExprContext</code> and <code>BooleanValue</code> had 20x more invocations in IE! Are these extra calls really necessary? Are they an artifact of my still-maturing profiler code? I hope we can determine the potential for optimization here is real.  <img src='http://ttwhy.org/home/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Update</strong></p>
<p>It appears that the profiler (not surprisingly) misses a few key methods: <code>compare</code>, <code>clone</code>, and <code>evaluate</code>. I&#8217;ll have to look into it more, but my hunch is that these are either added dynamically or are added to object prototypes, which the profiler currently may not be able to detect. Out of curiousity, I profiled the profiler itself running the ajaxslt test, using Firebug. This is what revealed the missing methods, whose timings are likely the main contributors to <code>xPathStep</code>.</p>
<p>It was interesting to observe the average time for the profile entry and exit functions. Obviously, these can impact the accuracy of the results. The average time for both added together was about 0.02ms . In comparison, the average times for <code>compare</code>, <code>clone</code>, the longest running <code>evaluate</code> (there are several), and <code>copyArray</code> were 0.463ms, 0.048ms, 0.573ms, and 0.03ms, respectively.</p>
<p>I&#8217;ll see if I can get the profiler to automatically capture those missing methods. I&#8217;ve added the Google News test to the repository, so you can try it and see for yourself.</p>
]]></content:encoded>
			<wfw:commentRss>http://ttwhy.org/home/blog/2007/12/11/javascript-profiler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UI-Element Merged into Selenium IDE</title>
		<link>http://ttwhy.org/home/blog/2007/11/18/ui-element-merged-into-selenium-ide/</link>
		<comments>http://ttwhy.org/home/blog/2007/11/18/ui-element-merged-into-selenium-ide/#comments</comments>
		<pubDate>Mon, 19 Nov 2007 03:19:11 +0000</pubDate>
		<dc:creator>gyrm</dc:creator>
				<category><![CDATA[Selenium]]></category>

		<guid isPermaLink="false">http://ttwhy.org/home/blog/2007/11/18/ui-element-merged-into-selenium-ide/</guid>
		<description><![CDATA[Not too long ago, I was invited by Dan Fabulich onto the Selenium Dev team! Recently, I&#8217;ve merged UI-Element into Selenium IDE trunk. So there won&#8217;t be a standalone 0.8 release &#8211; the next &#8220;stable&#8221; release will be alongside SIDE. Of course, now you can always grab a snapshot out of the SIDE subversion repository. [...]]]></description>
			<content:encoded><![CDATA[<p>Not too long ago, I was invited by Dan Fabulich onto the Selenium Dev team! Recently, I&#8217;ve merged UI-Element into Selenium IDE trunk. So there won&#8217;t be a standalone 0.8 release &#8211; the next &#8220;stable&#8221; release will be alongside SIDE. Of course, now you can always grab a snapshot out of the <a href="http://svn.openqa.org/svn/selenium-ide/trunk/src">SIDE subversion repository</a>. There have been a few fixes to UI-Element since 0.7 , so go ahead and grab them!</p>
<p>The IDE seems destined to grow a map editor too. I think this would work splendidly well with UI-Element.</p>
]]></content:encoded>
			<wfw:commentRss>http://ttwhy.org/home/blog/2007/11/18/ui-element-merged-into-selenium-ide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
