adspace


How to get an attribute value using selenium webdriver?

Answer Posted / Ramesh Singh Brijwal

You can get an attribute value of an element in Selenium WebDriver by calling the `getAttribute()` method on the WebElement instance. For example: `String attrValue = driver.findElement(By.id("element_id")).getAttribute("attribute_name");`

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do you know how to locate a link using its text in selenium?

986


How can you fetch an attribute from an element? How to retrieve typed text from a textbox?

1197


Have you created any framework?

1039


what will be the first salary and what will be the hike in the salary?

929


What’s selenese?

920