Here is the Selenium RC code for selenium.Check in Webdriver. This code is in Visual Studio C#
public void Check(string xpath)
{
if (!driver.FindElement(By.XPath(xpath)).Selected)
{
driver.FindElement(By.XPath(xpath)).Click();
}
}
