<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>success</status>
  <items_returned>3</items_returned>
  <items_available>3</items_available>
  <first_item_position>0</first_item_position>
  <result>
    <project>
      <id>10480</id>
      <name>Signature Verification</name>
      <created_at>2007-12-22T17:34:32Z</created_at>
      <updated_at>2009-01-27T06:29:29Z</updated_at>
      <description>Discriminative Verification of Handwritten Signatures.</description>
      <homepage_url>http://code.google.com/p/signature-verification</homepage_url>
      <download_url>http://code.google.com/p/signature-verification/downloads/list</download_url>
      <url_name>signature-verification</url_name>
      <medium_logo_url>http://bits.ohloh.net/attachments/13281/Signature_20Pen_1__med.jpg</medium_logo_url>
      <small_logo_url>http://bits.ohloh.net/attachments/13281/Signature_20Pen_1__small.jpg</small_logo_url>
      <user_count>1</user_count>
      <average_rating>4.5</average_rating>
      <rating_count>2</rating_count>
      <analysis_id>256029</analysis_id>
      <licenses>
        <license>
          <name>gpl3</name>
          <nice_name>GNU General Public License 3</nice_name>
        </license>
      </licenses>
    </project>
    <project>
      <id>61674</id>
      <name>SignIt</name>
      <created_at>2008-12-18T02:52:10Z</created_at>
      <updated_at>2009-06-08T08:09:19Z</updated_at>
      <description>An Open Office.org Writer's plug-in to sign a document and later verify the same using the verification utility. 

This is a port of Signature-Verification into Open Office.org.</description>
      <homepage_url>http://code.google.com/p/signit</homepage_url>
      <download_url>http://code.google.com/p/signit/downloads/list</download_url>
      <url_name>signit</url_name>
      <medium_logo_url>http://bits.ohloh.net/attachments/13285/OpenOfficeLogo_1__med.jpg</medium_logo_url>
      <small_logo_url>http://bits.ohloh.net/attachments/13285/OpenOfficeLogo_1__small.jpg</small_logo_url>
      <user_count>1</user_count>
      <average_rating>4.0</average_rating>
      <rating_count>1</rating_count>
      <analysis_id>601046</analysis_id>
      <licenses>
        <license>
          <name>gpl3_or_later</name>
          <nice_name>GNU General Public License 3 or later</nice_name>
        </license>
      </licenses>
    </project>
    <project>
      <id>130061</id>
      <name>Silverlight Selenium</name>
      <created_at>2009-01-05T05:25:28Z</created_at>
      <updated_at>2009-05-09T18:49:00Z</updated_at>
      <description>The silverlight-selenium projectThe silverlight-selenium libraries extend the Selenium RC clients, adding Silverlight communication capabilities to the Selenium RC tests.  

The silverlight-selenium RC client extension is currently available for the following Selenium RC client drivers: Java and .Net, Ruby and Python. The Selenium RC client extensions --Silvernium components&#8212;are available in the Downloads session.  

The Silvernium componentThe Silvernium is the component adding Silverlight communication capabilities to the Selenium framework.  

Basically, the Silvernium is a Selenium RC Client driver extension for helping exercise the tests against the Silverlight component.  

The following is the SilverNibblesTest -&#8211;a Seleniun based Unit test case testing SilverNibbles, a Web application containing SilverlightControl, a Silverlight scriptable object. Try out the SilverNibbles application here. Read Mark Heath&#8217;s blog on how to make SilverNibbles scriptable here.  


using NUnit.Framework;
using Selenium;
using ThoughtWorks.Selenium.Silvernium;

namespace IntegrationTests
{
    [TestFixture]
    public class SilverNibblesTest
    {
        private const string URL = &quot;http://www.markheath.me.uk/silvernibbles&quot;;
        private const string OBJECTID = &quot;SilverlightControl&quot;;
        private const string SCRIPTKEY = &quot;SilverNibbles&quot;;
        private ISelenium selenium;
        private Silvernium silvernium;

        [SetUp]
        public void SetUp()
        {
            selenium = new DefaultSelenium(&quot;localhost&quot;, 4444, &quot;*iexplore&quot;, URL);
            selenium.Start();
            selenium.Open(URL);
            silvernium = new Silvernium(selenium, OBJECTID, SCRIPTKEY);
        }

        [TearDown]
        public void TearDown()
        {
            selenium.Stop();
        }
        [Test]
        public void ShouldCommunicateWithSilverNibbleApplication()
        {
            Assert.AreEqual(&quot;SilverNibbles&quot;, selenium.GetTitle());
            // verifies default properties in the silverlight object
            Assert.AreEqual(640, silvernium.ActualWidth());
            Assert.AreEqual(460, silvernium.ActualHeight());

            // verifies user defined properties and methods
            // content.SilverNibbles.StartingSpeed;,  returns 5
            Assert.AreEqual(&quot;5&quot;, silvernium.GetPropertyValue(&quot;StartingSpeed&quot;));
            // content.SilverNibbles.NewGame('1');,  returns null
            Assert.AreEqual(&quot;null&quot;, silvernium.Call(&quot;NewGame&quot;, &quot;1&quot;));


            // testing set and get for a user defined property
            Assert.AreEqual(&quot;5&quot;, silvernium.GetPropertyValue(&quot;StartingSpeed&quot;));
            // setting the property
            silvernium.SetPropertyValue(&quot;StartingSpeed&quot;, &quot;8&quot;);
            // getting it again
            Assert.AreEqual(&quot;8&quot;, silvernium.GetPropertyValue(&quot;StartingSpeed&quot;));
        }
    }
}


Selenium RC / Silverlight IntegrationSelenium RC uses JavaScript to communicate with the browser. And Silverlight Scriptable attribute provides a mechanism to mark the Silverlight application&#8217;s classes and functions available for JavaScript calls. Therefore Silverlight-Selenium uses JavaScript as the conduit between Selenium RC and the Silverlight application.   With Silverlight Scriptable attribute you can expose specific Silverlight application functions.For example, the following code adds external invocation capabilities to the SilverNibbles NewGame()method. 

[Scriptable]
public void NewGame(int players)
{
...On the testing side, The Silvernium is the component adding Silverlight communication capabilities to the Selenium framework. Basically, the Silvernium is a Selenium RC Client driver extension for helping exercise the tests against the Silverlight object. The Silvernium constructor takes a Selenium instance and the Silverlight object ID and the scriptable key as parameters. An instance of Silvernium is used to invoke the functions on the Silverlight application.  

You can invoke functions which were externalized by the Scriptable attribute, as well as the default functions and properties of any Silverlight object (e.g, ,,background,  isLoaded,ActualWidth(), etc). The following are code snapshots from the SilverNibblesTest &#8212;the sample Seleniun based Unit test. 

            Assert.AreEqual(460, silvernium.ActualHeight());

            // content.SilverNibbles.StartingSpeed;,  returns 5
            Assert.AreEqual(&quot;5&quot;, silvernium.GetPropertyValue(&quot;StartingSpeed&quot;));

            // content.SilverNibbles.NewGame('1');,  returns null
            Assert.AreEqual(&quot;null&quot;, silvernium.Call(&quot;NewGame&quot;, &quot;1&quot;));


            // testing set and get for a user defined property
            Assert.AreEqual(&quot;5&quot;, silvernium.GetPropertyValue(&quot;StartingSpeed&quot;));
            // setting the property
            silvernium.SetPropertyValue(&quot;StartingSpeed&quot;, &quot;8&quot;);</description>
      <homepage_url>http://code.google.com/p/silverlight-selenium</homepage_url>
      <download_url>http://code.google.com/p/silverlight-selenium/downloads/list</download_url>
      <url_name>silverlight-selenium</url_name>
      <medium_logo_url>http://bits.ohloh.net/attachments/13289/silverlight_logo_mini_med.png</medium_logo_url>
      <small_logo_url>http://bits.ohloh.net/attachments/13289/silverlight_logo_mini_small.png</small_logo_url>
      <user_count>1</user_count>
      <average_rating>2.0</average_rating>
      <rating_count>1</rating_count>
      <analysis_id>432966</analysis_id>
      <licenses>
        <license>
          <name>gpl3</name>
          <nice_name>GNU General Public License 3</nice_name>
        </license>
      </licenses>
    </project>
  </result>
</response>
