Use following method to get attribute value using css selector
public String GetIDcss(string css)
{
string id = driver.FindElement(By.CssSelector(@" + css + @")).GetAttribute("id");
return id;
}
public String GetIDcss(string css)
{
string id = driver.FindElement(By.CssSelector(@" + css + @")).GetAttribute("id");
return id;
}
0 comments