
<?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>Reinier Balt&#039;s Weblog</title>
	<atom:link href="http://www.balt.nu/lrbalt/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.balt.nu/lrbalt</link>
	<description>Life, hobbies and profession</description>
	<lastBuildDate>Tue, 02 Mar 2010 12:49:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>nl</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Getting value from xpath query with and without selenium</title>
		<link>http://www.balt.nu/lrbalt/archives/2010/03/02/getting-value-from-xpath-query-with-and-without-selenium/</link>
		<comments>http://www.balt.nu/lrbalt/archives/2010/03/02/getting-value-from-xpath-query-with-and-without-selenium/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 12:39:59 +0000</pubDate>
		<dc:creator>lrbalt</dc:creator>
				<category><![CDATA[Tracks]]></category>
		<category><![CDATA[cucumber]]></category>
		<category><![CDATA[selenium]]></category>

		<guid isPermaLink="false">http://www.balt.nu/lrbalt/?p=259</guid>
		<description><![CDATA[Using cucumber with webrat is not the same as using them with selenium. I found this out the hard way. In tracks, you have the &#8216;badge&#8217; in the top-left corner which shows the number of items on the page. To check the number increases or decreases you want to retrieve the value of the badge.
I [...]]]></description>
			<content:encoded><![CDATA[<p>Using cucumber with webrat is not the same as using them with selenium. I found this out the hard way. In tracks, you have the &#8216;badge&#8217; in the top-left corner which shows the number of items on the page. To check the number increases or decreases you want to retrieve the value of the badge.</p>
<p>I had:</p>
<blockquote>
<pre>xpath= "//span[@id='badge_count']"
response.should have_xpath(xpath) do |node|
  badge = node.first.content.to_i
end
</pre>
</blockquote>
<p>Which did work without selenium, but selenium does not return a node to query. Instead AFAICS selenium wants:</p>
<blockquote>
<pre>xpath= "//span[@id='badge_count']"
response.should have_xpath(xpath)
badge = response.selenium.get_text("xpath=#{xpath}").to_i
</pre>
</blockquote>
<p>Problem is that this cucumber step is used for features that require selenium and features that do not, so I ended up with</p>
<blockquote>
<pre>
Then /the badge should show (.*)/ do |number|
  badge = -1
  xpath= "//span[@id='badge_count']"
  if Rails.env == 'selenium'
    response.should have_xpath(xpath)
    badge = response.selenium.get_text("xpath=#{xpath}").to_i
  else
    response.should have_xpath(xpath) do |node|
      badge = node.first.content.to_i
    end
  end
  badge.should == number.to_i
end
</pre>
</blockquote>
<p>Not very nice, but functional.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.balt.nu/lrbalt/archives/2010/03/02/getting-value-from-xpath-query-with-and-without-selenium/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drag and drop in cucumber with selenium</title>
		<link>http://www.balt.nu/lrbalt/archives/2010/03/02/drag-and-drop-in-cucumber-with-selenium/</link>
		<comments>http://www.balt.nu/lrbalt/archives/2010/03/02/drag-and-drop-in-cucumber-with-selenium/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 12:00:35 +0000</pubDate>
		<dc:creator>lrbalt</dc:creator>
				<category><![CDATA[Tracks]]></category>
		<category><![CDATA[cucumber]]></category>
		<category><![CDATA[selenium]]></category>

		<guid isPermaLink="false">http://www.balt.nu/lrbalt/?p=248</guid>
		<description><![CDATA[I needed to show a bug using a cucumber script which includes drag and drop. Turned out to be difficult for several reasons

drag and drop is not supported by webrat for selenium
&#8216;within&#8217; for scoping is not supported by webrat for selenium

this made the feature difficult to quickly specifiy. The feature contains:

[...]
And I drag "Todo 3" to "Todo 2"
[...]
When I expand the dependencies [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to show a <a title="bug on assembla" href="http://www.assembla.com/spaces/tracks-tickets/tickets/972">bug </a>using a cucumber script which includes drag and drop. Turned out to be difficult for several reasons</p>
<ul>
<li>drag and drop is not supported by<a title="doc for selenium driver in webrat" href="http://gitrdoc.com/rdoc/brynary/webrat/273e8c541a82ddacf91f4f68ab6166c16ffdc9c5/classes/Webrat/SeleniumSession.html"> webrat for selenium</a></li>
<li>&#8216;within&#8217; for scoping is not supported by webrat for selenium</li>
</ul>
<p>this made the <a title="current feature" href="http://github.com/bsag/tracks/blob/master/features/dependencies.feature">feature </a>difficult to quickly specifiy. The feature contains:</p>
<blockquote>
<pre>[...]
And I drag "Todo 3" to "Todo 2"
[...]
When I expand the dependencies of "Todo 1"
Then I should see "Todo 2" within the dependencies of "Todo 1"
[...]</pre>
</blockquote>
<div>For the drag you can do</div>
<blockquote>
<pre>drag_id = Todo.find_by_description(dragged).id
drop_id = Todo.find_by_description(target).id
drag_name = "xpath=//div[@id='line_todo_#{drag_id}']//img[@class='grip']"
drop_name = "xpath=//div[@id='line_todo_#{drop_id}']//div[@class='description']"
selenium.drag_and_drop_to_object(drag_name, drop_name)
</pre>
</blockquote>
<div>This will work, but drag_and_drop does not wait for the ajax that is attached to the drop to finish. There is a wait_for_ajax, but this only works with Prototype, not with jQuery. If found a solution which is a bit of a hack, so I reverted to waiting_for the dependency arrow to appear:</div>
<blockquote>
<pre>arrow = "xpath=//div[@id='line_todo_#{drop_id}']/div/a[@class='show_successors']/img"
selenium.wait_for_element(arrow)
</pre>
</blockquote>
<div>The next hurdle was to check if &#8220;Todo 1&#8243; as a dependency is shown in the dependency tree of &#8220;Todo 2&#8243;. There is a standard &#8220;I should see &#8230; within &#8230;&#8221; which comes with Cucumber, but unfortunately the webrat &#8216;within&#8217; does not work for selenium <img src='http://www.balt.nu/lrbalt/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> . Thus, this does not work:</div>
<blockquote>
<pre>xpath = "//div[@id='line_todo_#{todo.id}'"
Then "I should see \"#{successor_description}\" within \"xpath=#{xpath}\""
</pre>
</blockquote>
<div>So I reverted to a xpath query on "Todo 1" within "Todo 2" like this:</div>
<blockquote>
<pre>xpath = "xpath=//div[@id='line_todo_#{todo.id}']//div[@id='successor_line_todo_#{successor.id}']//span"
selenium.wait_for_element(xpath)
</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.balt.nu/lrbalt/archives/2010/03/02/drag-and-drop-in-cucumber-with-selenium/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Geweldige Blue Screen of Death (BSOD)</title>
		<link>http://www.balt.nu/lrbalt/archives/2009/09/19/geweldige-blue-screen-of-death-bsod/</link>
		<comments>http://www.balt.nu/lrbalt/archives/2009/09/19/geweldige-blue-screen-of-death-bsod/#comments</comments>
		<pubDate>Sat, 19 Sep 2009 08:42:59 +0000</pubDate>
		<dc:creator>lrbalt</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.balt.nu/lrbalt/?p=246</guid>
		<description><![CDATA[Tja, sommige BSOD&#8217;s zijn minder erg  
]]></description>
			<content:encoded><![CDATA[<p>Tja, <a title="BSOD" href="http://thenextweb.com/2008/11/27/a-blue-screen-of-death-that-made-me-smile/">sommige BSOD&#8217;s</a> zijn minder erg <img src='http://www.balt.nu/lrbalt/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.balt.nu/lrbalt/archives/2009/09/19/geweldige-blue-screen-of-death-bsod/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Excel trucjes</title>
		<link>http://www.balt.nu/lrbalt/archives/2009/03/13/excel-trucjes/</link>
		<comments>http://www.balt.nu/lrbalt/archives/2009/03/13/excel-trucjes/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 17:02:34 +0000</pubDate>
		<dc:creator>lrbalt</dc:creator>
				<category><![CDATA[Profession]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.balt.nu/lrbalt/?p=242</guid>
		<description><![CDATA[Ik heb me nooit echt verdiept in de mogelijkheden van Excel, maar nu ik een vervelend herhalend klusje in een excel moet uitvoeren ben ik me gaan verdiepen in een aantal handige mogelijkheden.
Voor mijn eigen referentie de volgende functies. De eerste functie is address waarmee je een referentie tekstueel kan samenstellen, bijvoorbeeld

ADDRESS(14;30;1;TRUE;CONCATENATE("Wk "; TEXT($A11;$A11)))

maakt een [...]]]></description>
			<content:encoded><![CDATA[<p>Ik heb me nooit echt verdiept in de mogelijkheden van Excel, maar nu ik een vervelend herhalend klusje in een excel moet uitvoeren ben ik me gaan verdiepen in een aantal handige mogelijkheden.</p>
<p>Voor mijn eigen referentie de volgende functies. De eerste functie is address waarmee je een referentie tekstueel kan samenstellen, bijvoorbeeld</p>
<p><code><br />
ADDRESS(14;30;1;TRUE;CONCATENATE("Wk "; TEXT($A11;$A11)))<br />
</code></p>
<p>maakt een verwijzing naar AD14 (of eigenlijk $AD$14 vanwege de opvolgende parameter 1). Dit had overigens ook via ROW($AD$14) en COLUMN($AD$14) gedaan kunnen worden. De laatste parameter is een verwijzing naar het blad, in dit geval &#8216;Wk 10&#8242; waarbij in $A11 het getal 10 staat. Ofwel de formule hierboven maakt een tekst aan &#8216;Wk 10&#8242;!$AD$14.</p>
<p>Met de tekst kan je niet veel, maar via de functie indirect kan je de waarde van die verwijzing ophalen:</p>
<p><code><br />
=INDIRECT(ADDRESS(14;30;1;TRUE;CONCATENATE("Wk "; TEXT($A11;$A11)));TRUE)<br />
</code></p>
<p>Dit is dus hetzelfde als =&#8217;Wk 10&#8242;$AD$14</p>
<p>Maar je kan nu via copy-and-paste de formule eenvoudig laten varieren over de weeknummers. Immers zal via copy-and-past naar de volgende regel $A11 veranderen in $A12 waarin in dit geval het volgende weeknummer staat en dat levert &#8216;Wk 11&#8242;$AD$14 op.</p>
<p>Een ander trucje is het opzoeken van de laatst ingevulde waarde in een kolom. Heel handig voor kolommen die je regelmatig aanvult.<br />
<code><br />
MAX(IF(LEN(B3:B39)>0;ROW(B3:B39);0))<br />
</code><br />
Dit levert in deze vorm een foutmelding op. Maar als je de formule invoert en met Ctrl-Shift-Enter opslaat, zal Excel de formule per element van B3:B39 uitvoeren, waardoor het MAX van een array van rijnummers wordt bepaald. In het array zitten alleen rijnummers van cellen die gevuld zijn (LEN > 0).</p>
<p>Vervolgens kan je dit rijnummer in een formule gebruiken, bijvoorbeeld om het verschil van de laatst ingevulde waarde in B3:B39 met een startwaarde in A3 te berekenen:<br />
<code><br />
=INDIRECT(ADDRESS(MAX(IF(LEN(B3:B39)>0;ROW(B3:B39);0));COLUMN(B3)))-A3<br />
</code></p>
<p>Deze trucjes zoek je eenmalig uit en vergeet je daarna weer, vandaar deze post <img src='http://www.balt.nu/lrbalt/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.balt.nu/lrbalt/archives/2009/03/13/excel-trucjes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lost theorie</title>
		<link>http://www.balt.nu/lrbalt/archives/2008/10/02/lost-theorie/</link>
		<comments>http://www.balt.nu/lrbalt/archives/2008/10/02/lost-theorie/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 13:26:30 +0000</pubDate>
		<dc:creator>lrbalt</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://www.balt.nu/lrbalt/?p=233</guid>
		<description><![CDATA[Zoals velen zijn Fleur en ik trouwe volgers van de Lost serie. Daarbij overigens vaak gefrustreerd omdat NET5 altijd besluit om midden in een seizoen te stoppen   
Op internet zijn er verschillende theorieen over Lost. Leuk om zo nu en dan te lezen. Deze post is wel heel mooi met prachtige uitgewerkte tijdlijnen. [...]]]></description>
			<content:encoded><![CDATA[<p>Zoals velen zijn Fleur en ik trouwe volgers van de Lost serie. Daarbij overigens vaak gefrustreerd omdat NET5 altijd besluit om midden in een seizoen te stoppen <img src='http://www.balt.nu/lrbalt/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  </p>
<p>Op internet zijn er verschillende theorieen over Lost. Leuk om zo nu en dan te lezen. Deze <a href="http://www.lostblog.net/lost/tv/show/lost-hiatus-update-numero-uno">post</a> is wel heel mooi met prachtige uitgewerkte tijdlijnen. Mooie visualisaties overigens. Of het waar is&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.balt.nu/lrbalt/archives/2008/10/02/lost-theorie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>efficienter werken</title>
		<link>http://www.balt.nu/lrbalt/archives/2008/09/05/efficienter-werken/</link>
		<comments>http://www.balt.nu/lrbalt/archives/2008/09/05/efficienter-werken/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 07:50:48 +0000</pubDate>
		<dc:creator>lrbalt</dc:creator>
				<category><![CDATA[GTD]]></category>
		<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://www.balt.nu/lrbalt/?p=230</guid>
		<description><![CDATA[ 

Leuke post over een whiteboard met slimme productiviteitstips. Wordt ook gerefereerd aan &#8216;filing success&#8217;. Ik ben daar net een boek over aan het lezen. Beetje zweverig geschreven, maar de kerntips zijn wel handig.
]]></description>
			<content:encoded><![CDATA[<p> </p>
<p style="text-align: center;"><img class="aligncenter" title="productivity tips" src="http://farm3.static.flickr.com/2218/2482124458_247a17caea.jpg?v=0" alt="Productivity Tips" width="300" height="400" /></p>
<p>Leuke <a title="Improving your productivity" href="http://www.genuinecuriosity.com/genuinecuriosity/2008/06/improve-your-pr.html">post </a>over een whiteboard met slimme productiviteitstips. Wordt ook gerefereerd aan &#8216;filing success&#8217;. Ik ben daar net een <a title="The Joy of Success" href="http://www.nl.bol.com/is-bin/INTERSHOP.enfinity/eCS/Store/nl/-/EUR/BOL_DisplayProductInformation-Start?BOL_OWNER_ID=1001004002040978&amp;Section=BOOK_EN">boek </a>over aan het lezen. Beetje zweverig geschreven, maar de kerntips zijn wel handig.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.balt.nu/lrbalt/archives/2008/09/05/efficienter-werken/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mozilla&#8217;s Ubiquity</title>
		<link>http://www.balt.nu/lrbalt/archives/2008/09/05/mozillas-ubiquity/</link>
		<comments>http://www.balt.nu/lrbalt/archives/2008/09/05/mozillas-ubiquity/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 07:09:57 +0000</pubDate>
		<dc:creator>lrbalt</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Profession]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.balt.nu/lrbalt/?p=229</guid>
		<description><![CDATA[Interessante ontwikkeling is dit. Mozilla is bezig met een plugin om snel acties te kunnen doen op het web. Heb je een adres, selecteer het, kies &#8216;map&#8217; en het wordt via Google Maps op een kaart gezet. Of wil je een deel van een pagina emailen? Selecteer het deel en tik &#8216;email iemands@dres.nl&#8217;. Ziet er [...]]]></description>
			<content:encoded><![CDATA[<p>Interessante ontwikkeling is <a title="Mozilla Ubiquity" href="http://www.ghacks.net/2008/08/26/mozilla-labs-ubiquity-is-a-firefox-killer-application/">dit</a>. Mozilla is bezig met een plugin om snel acties te kunnen doen op het web. Heb je een adres, selecteer het, kies &#8216;map&#8217; en het wordt via Google Maps op een kaart gezet. Of wil je een deel van een pagina emailen? Selecteer het deel en tik &#8216;email iemands@dres.nl&#8217;. Ziet er handig uit. Op de <a title="Mozilla Ubiquity" href="http://labs.mozilla.com/2008/08/introducing-ubiquity/">Ubiquity website</a> staan meer voorbeelden.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.balt.nu/lrbalt/archives/2008/09/05/mozillas-ubiquity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrade naar Wordpress 2.5</title>
		<link>http://www.balt.nu/lrbalt/archives/2008/04/02/upgrade-naar-wordpress-25/</link>
		<comments>http://www.balt.nu/lrbalt/archives/2008/04/02/upgrade-naar-wordpress-25/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 20:44:15 +0000</pubDate>
		<dc:creator>lrbalt</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.balt.nu/lrbalt/?p=228</guid>
		<description><![CDATA[Dit is wel heel makkelijk. Unzip de bestanden over de bestaande installatie, naar een upgrade pagina en klaar! En we draaien onder Wordpress 2.5
]]></description>
			<content:encoded><![CDATA[<p>Dit is wel heel makkelijk. Unzip de bestanden over de bestaande installatie, naar een upgrade pagina en klaar! En we draaien onder <a title="wordpress homepage" href="http://www.wordpress.org">Wordpress</a> 2.5</p>
]]></content:encoded>
			<wfw:commentRss>http://www.balt.nu/lrbalt/archives/2008/04/02/upgrade-naar-wordpress-25/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tracks 1.5 is uit</title>
		<link>http://www.balt.nu/lrbalt/archives/2008/03/27/tracks-15-is-uit/</link>
		<comments>http://www.balt.nu/lrbalt/archives/2008/03/27/tracks-15-is-uit/#comments</comments>
		<pubDate>Thu, 27 Mar 2008 20:29:44 +0000</pubDate>
		<dc:creator>lrbalt</dc:creator>
				<category><![CDATA[GTD]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.balt.nu/lrbalt/archives/2008/03/27/tracks-15-is-uit/</guid>
		<description><![CDATA[het is zover! Hier
]]></description>
			<content:encoded><![CDATA[<p>het is zover! <a href="http://www.rousette.org.uk/projects/downloads/comments/tracks-15/" title="tracks 1.5">Hier</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.balt.nu/lrbalt/archives/2008/03/27/tracks-15-is-uit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Raytracing in games</title>
		<link>http://www.balt.nu/lrbalt/archives/2008/02/22/raytracing-in-games/</link>
		<comments>http://www.balt.nu/lrbalt/archives/2008/02/22/raytracing-in-games/#comments</comments>
		<pubDate>Fri, 22 Feb 2008 12:18:48 +0000</pubDate>
		<dc:creator>lrbalt</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://www.balt.nu/lrbalt/archives/2008/02/22/raytracing-in-games/</guid>
		<description><![CDATA[Ik ben benieuwd wanneer PC&#8217;s voldoende sterk zijn. Ze hebben hier namelijk een mooi artikel waarmee raytracing in game-engines is opgenomen. Leidt tot mooie realistische beelden. Kijk ook  eens hier.
]]></description>
			<content:encoded><![CDATA[<p>Ik ben benieuwd wanneer PC&#8217;s voldoende sterk zijn. Ze hebben <a href="http://www.pcper.com/article.php?aid=455&amp;type=expert&amp;pid=1" title="raytracing in games">hier </a>namelijk een mooi artikel waarmee raytracing in game-engines is opgenomen. Leidt tot mooie realistische beelden. Kijk ook  eens <a href="http://www.pcper.com/article.php?aid=334&amp;type=expert" title="raytracing in games">hier</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.balt.nu/lrbalt/archives/2008/02/22/raytracing-in-games/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
