robotframework / OldSeleniumLibrary

Deprecated Selenium library for Robot Framework
Apache License 2.0
13 stars 3 forks source link

Add "Get Attribute" keyword #87

Closed spooning closed 9 years ago

spooning commented 9 years ago

Originally submitted to Google Code by bryan.oakley on 4 Feb 2010

I would like to add a keyword named "Get Attribute". I think the implementation would be:

def get_attribute(self,attributeLocator):
    """
    Gets the value of an element attribute. The value of the 
    attribute may differ across browsers (this is the case 
    for the "style" attribute, for example).

    'attributeLocator' is an element locator followed by an 
    @⁠ sign and then the name of the attribute, e.g. "foo@⁠bar"
    """
    return self._selenium.get_attribute(attributeLocator)

I will be happy to own this but I'd like someone with more knowledge of the library to code-review it.