<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Andrey Shchekin's Blog - Latest Comments in Evaluating Javascript in WatiN</title><link>http://ashmind.disqus.com/</link><description></description><atom:link href="https://ashmind.disqus.com/evaluating_javascript_in_watin/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 06 Sep 2013 13:19:23 -0000</lastBuildDate><item><title>Re: Evaluating Javascript in WatiN</title><link>http://blog.ashmind.com/2007/09/05/evaluating-javascript-in-watin/#comment-1032418305</link><description>&lt;p&gt;The WatiN API has changed and the above code does not work without some changes. I made some small modifications and enhancements here:&lt;/p&gt;&lt;p&gt;&lt;a href="https://gist.github.com/pagebrooks/6466660" rel="nofollow noopener" target="_blank" title="https://gist.github.com/pagebrooks/6466660"&gt;https://gist.github.com/pag...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Page Brooks</dc:creator><pubDate>Fri, 06 Sep 2013 13:19:23 -0000</pubDate></item><item><title>Re: Evaluating Javascript in WatiN</title><link>http://blog.ashmind.com/2007/09/05/evaluating-javascript-in-watin/#comment-26736684</link><description>&lt;p&gt;I've been working to create some extension methods to support CSS Selectors in WatiN. It makes element selection much more natural, especially if you are already using something like jQuery.  You can check it out at &lt;a href="http://bit.ly/7kiQdL" rel="nofollow noopener" target="_blank" title="http://bit.ly/7kiQdL"&gt;http://bit.ly/7kiQdL&lt;/a&gt; .  &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">dk</dc:creator><pubDate>Sun, 20 Dec 2009 12:56:16 -0000</pubDate></item><item><title>Re: Evaluating Javascript in WatiN</title><link>http://blog.ashmind.com/2007/09/05/evaluating-javascript-in-watin/#comment-13578677</link><description>&lt;p&gt;I think this can be done easier (without really involving JS).&lt;br&gt;But I have not worked with Watin for a year so I do not really remember anything.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andrey Shchekin</dc:creator><pubDate>Wed, 29 Jul 2009 19:28:43 -0000</pubDate></item><item><title>Re: Evaluating Javascript in WatiN</title><link>http://blog.ashmind.com/2007/09/05/evaluating-javascript-in-watin/#comment-13553326</link><description>&lt;p&gt;will these scripts help me to recognize radio buttons on Java script pop up?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">smita</dc:creator><pubDate>Wed, 29 Jul 2009 15:59:58 -0000</pubDate></item><item><title>Re: Evaluating Javascript in WatiN</title><link>http://blog.ashmind.com/2007/09/05/evaluating-javascript-in-watin/#comment-2506441</link><description>&lt;p&gt;Thanks for this post Andrey - awesome piece of code that  was a breeze to add to my test suite - keep up the good work :-)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James</dc:creator><pubDate>Thu, 10 Jul 2008 04:37:34 -0000</pubDate></item><item><title>Re: Evaluating Javascript in WatiN</title><link>http://blog.ashmind.com/2007/09/05/evaluating-javascript-in-watin/#comment-2506440</link><description>&lt;p&gt;Hi Andrey,&lt;/p&gt;&lt;p&gt;Newbie here.  How do I get the WatIN document object to pass and what string code to need to send in.&lt;/p&gt;&lt;p&gt;Thanks,&lt;br&gt;Gerald&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Gerald</dc:creator><pubDate>Thu, 15 May 2008 18:14:35 -0000</pubDate></item><item><title>Re: Evaluating Javascript in WatiN</title><link>http://blog.ashmind.com/2007/09/05/evaluating-javascript-in-watin/#comment-2506436</link><description>&lt;p&gt;Yes, of course.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andrey Shchekin</dc:creator><pubDate>Thu, 20 Sep 2007 16:21:17 -0000</pubDate></item><item><title>Re: Evaluating Javascript in WatiN</title><link>http://blog.ashmind.com/2007/09/05/evaluating-javascript-in-watin/#comment-2506439</link><description>&lt;p&gt;Hi Andrey,&lt;/p&gt;&lt;p&gt;I recently added the code from Ayende to WatiN. Now I read your code and it looks even better. Is it OK to include this in WatiN?&lt;/p&gt;&lt;p&gt;Jeroen van Menen&lt;br&gt;lead developer of WatiN&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jeroen van Menen</dc:creator><pubDate>Tue, 18 Sep 2007 10:18:21 -0000</pubDate></item><item><title>Re: Evaluating Javascript in WatiN</title><link>http://blog.ashmind.com/2007/09/05/evaluating-javascript-in-watin/#comment-2506438</link><description>&lt;p&gt;I completely agree with you on user tests.&lt;br&gt;But what I was writing this time was closer to JS unit tests — something like "changing the selected value in a combo box should change some property of a global object on the page".&lt;/p&gt;&lt;p&gt;Basically I wanted to fix fragility of my javascript and didn't want to do it with more javascript. Even if WatiN would have to call up the browser for each test fixture.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andrey Shchekin</dc:creator><pubDate>Wed, 12 Sep 2007 03:38:22 -0000</pubDate></item><item><title>Re: Evaluating Javascript in WatiN</title><link>http://blog.ashmind.com/2007/09/05/evaluating-javascript-in-watin/#comment-2506437</link><description>&lt;p&gt;You should be careful with this approach when writing user/acceptance tests (its better suited for interaction/integration tests to see that events really do get wired up...but then its a slippery slope).&lt;/p&gt;&lt;p&gt;The UATs are meant to be written from the user's perspective.  The tests should read that way and reflect what a user would actually do, including how they themselves would verify that an action was successfully completed.  The users might even be able to read and understand what the test is trying to do.  When you start getting under the hood and fiddling with javascript directly from the test, then it gets further away from being a user test. The user certainly won't be calling javascript to verify that an action they took really did affect the state of the page.&lt;/p&gt;&lt;p&gt;Hitting the javascript also makes the test fragile because it is too tied to the implementation details which make it harder (well just more annoying really) when you want to change the implementation.  Why should the (state-based) test care that certain javascript code was called, so long as the end result is that something on the page reflected the expected outcome.  With ajax web app testing, this does tend to require some waits, but typically you can get it to wait for a specific expected value to appear or change to happen (i.e. wait for your ajax progress indicator to 'stop' instead of an arbitrary 3000 ms).&lt;/p&gt;&lt;p&gt;When I find myself (instinct) starting down this path, I step back and evaluate what is missing in the ui that is forcing the test to pop the hood.  Usually all it needed was a visual indicator to the user that probably should have been there in the first place.  Not always.  But usually.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Estes</dc:creator><pubDate>Wed, 05 Sep 2007 21:12:58 -0000</pubDate></item></channel></rss>