Here is the Selenium RC code for selenium.GetAttribute in Webdriver. This code is in Visual Studio C#
public string GetAttribute(string xpath, string attribut)
{
string value = "";
if (IsElementPresent(xpath))
{
value = driver.FindElement(By.XPath(xpath)).GetAttribute(attribut);
}
return value;
}
