<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/tags/selenium-client</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Wed, 22 May 2013 07:21:04 GMT</pubDate>
<item>
<title>(Ruby) Selenium and Ruby: How to fix "Cannot call method 'indexOf' of undefined" when opening a page in Google Chrome - noah</title>
<link>http://snipplr.com/view/45567/selenium-and-ruby-how-to-fix-cannot-call-method-indexof-of-undefined-when-opening-a-page-in-google-chrome/</link>
<description><![CDATA[ <p>Instead of just saying @selenium.start, use the following incantation to start up your Chrome instance.</p> ]]></description>
<pubDate>Fri, 10 Dec 2010 18:34:04 GMT</pubDate>
<guid>http://snipplr.com/view/45567/selenium-and-ruby-how-to-fix-cannot-call-method-indexof-of-undefined-when-opening-a-page-in-google-chrome/</guid>
</item>
<item>
<title>(Ruby) Howto set up a Rake task to start and stop the Selenium-RC server - noah</title>
<link>http://snipplr.com/view/27992/howto-set-up-a-rake-task-to-start-and-stop-the-seleniumrc-server/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 08 Feb 2010 23:01:08 GMT</pubDate>
<guid>http://snipplr.com/view/27992/howto-set-up-a-rake-task-to-start-and-stop-the-seleniumrc-server/</guid>
</item>
<item>
<title>(Ruby) How to call JavaScript in the Application Under Test, from Selenium - noah</title>
<link>http://snipplr.com/view/19872/how-to-call-javascript-in-the-application-under-test-from-selenium/</link>
<description><![CDATA[ <p>When writing functional tests with Selenium, it is often convenient to call JavaScript functions and methods, that are part of the Web application you are testing.  After all, Selenium is a functional testing framework for Web UI and most of the exciting bits of Web UI are JS (sorry, all you CSS hackers, but them's the facts). 

The problem is that it's not immediately obvious how you can access the DOM of the Application Under Test (AUT).  Selenium Core (in which all Selenium tests execute) is a frame set, and if you simply try to call your JavaScript with `getEval`, you'll get an error because `getEval` references Selenium Core's DOM, not the DOM of the AUT.

Fortunately the answer is simple.  Use `this.browserbot.getCurrentWindow()` to get a reference to the `window` object in *your* DOM.  Then you can execute any of the JS that lives in your page, right from Selenium!

This example uses the Ruby driver, but the principle is the same regardless of which language you use.</p> ]]></description>
<pubDate>Thu, 17 Sep 2009 13:14:43 GMT</pubDate>
<guid>http://snipplr.com/view/19872/how-to-call-javascript-in-the-application-under-test-from-selenium/</guid>
</item>
</channel>
</rss>