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 text = "";
if (IsElementPresent(xpath))
text = driver.FindElement(By.XPath(xpath)).GetAttribute("href");
return text;

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

Leave a Reply

Last articles