<?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: Selenium IDE: getCurrentWindow() problems</title>
	<atom:link href="http://crschmidt.net/blog/archives/348/selenium-ide-getcurrentwindow-problems/feed/" rel="self" type="application/rss+xml" />
	<link>http://crschmidt.net/blog/archives/348/selenium-ide-getcurrentwindow-problems/</link>
	<description>Ramblings of a GIS Hacker</description>
	<pubDate>Wed, 30 May 2012 06:26:22 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Chase Seibert</title>
		<link>http://crschmidt.net/blog/archives/348/selenium-ide-getcurrentwindow-problems/comment-page-1/#comment-22409</link>
		<dc:creator>Chase Seibert</dc:creator>
		<pubDate>Wed, 04 May 2011 18:45:01 +0000</pubDate>
		<guid isPermaLink="false">http://crschmidt.net/blog/?p=348#comment-22409</guid>
		<description>Thanks! Worked for me. Here is a python snippet:

def javascript(sel, script):
    return sel.get_eval("""
    (function() {
            with(this) {
              %(script)s
            }
          }).call(selenium.browserbot.getUserWindow());
    """ % locals())

Example use, uncheck all checkboxes on a page:

javascript(self.selenium, "$('input[type=checkbox]').attr('checked', false);")</description>
		<content:encoded><![CDATA[<p>Thanks! Worked for me. Here is a python snippet:</p>
<p>def javascript(sel, script):<br />
    return sel.get_eval(&#8221;"&#8221;<br />
    (function() {<br />
            with(this) {<br />
              %(script)s<br />
            }<br />
          }).call(selenium.browserbot.getUserWindow());<br />
    &#8220;&#8221;" % locals())</p>
<p>Example use, uncheck all checkboxes on a page:</p>
<p>javascript(self.selenium, &#8220;$(&#8217;input[type=checkbox]&#8216;).attr(&#8217;checked&#8217;, false);&#8221;)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

