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

Method get_text_content

seleniumbase/fixtures/base_case.py:2163–2173  ·  view source on GitHub ↗

Returns the text that appears in the HTML for an element. This is different from "self.get_text(selector, by="css selector")" because that only returns the visible text on a page for an element, rather than the HTML text that's being returned from this method.

(
        self, selector="body", by="css selector", timeout=None
    )

Source from the content-addressed store, hash-verified

2161 return property_value
2162
2163 def get_text_content(
2164 self, selector="body", by="css selector", timeout=None
2165 ):
2166 """Returns the text that appears in the HTML for an element.
2167 This is different from "self.get_text(selector, by="css selector")"
2168 because that only returns the visible text on a page for an element,
2169 rather than the HTML text that's being returned from this method."""
2170 self.__check_scope()
2171 return self.get_property(
2172 selector, property="textContent", by=by, timeout=timeout
2173 )
2174
2175 def get_property_value(
2176 self, selector, property, by="css selector", timeout=None

Callers

nothing calls this directly

Calls 2

__check_scopeMethod · 0.95
get_propertyMethod · 0.95

Tested by

no test coverage detected