Using selenium.GetAttribute in Webdriver 

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;

Author: Pavandeep Puddupakkam on December 9, 2011
Category: Selenium RC, WebDriver
Tags: , ,
Selenium Webdriver Forum -The Online Community for Selenium Webdriver and Selenium RC Users and Professionals

Leave a Reply

Last articles