MCPcopy Create free account
hub / github.com/seleniumbase/SeleniumBase / get_attribute

Method get_attribute

seleniumbase/core/sb_cdp.py:1693–1697  ·  view source on GitHub ↗

Find an element and return the value of an attribute. If the element doesn't exist: Raises an exception. If the attribute doesn't exist: Returns None.

(self, selector, attribute)

Source from the content-addressed store, hash-verified

1691 return value
1692
1693 def get_attribute(self, selector, attribute):
1694 """Find an element and return the value of an attribute.
1695 If the element doesn't exist: Raises an exception.
1696 If the attribute doesn't exist: Returns None."""
1697 return self.find_element(selector).get_attribute(attribute)
1698
1699 def get_element_html(self, selector):
1700 """Find an element and return the outerHTML."""

Callers 15

get_element_attributeMethod · 0.95
is_attribute_presentMethod · 0.45
attribuut_ophalenMethod · 0.45
obtenir_attributMethod · 0.45
ottenere_attributoMethod · 0.45
obtener_atributoMethod · 0.45
특성_검색Method · 0.45
属性を取得するMethod · 0.45
获取属性Method · 0.45
obter_atributoMethod · 0.45

Calls 1

find_elementMethod · 0.95

Tested by 6

test_wordleMethod · 0.36
test_baseMethod · 0.36
test_wordleMethod · 0.36