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

Method get_image_url

seleniumbase/fixtures/base_case.py:2217–2226  ·  view source on GitHub ↗

Extracts the URL from an image element on the page.

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

Source from the content-addressed store, hash-verified

2215 return "" # Return an empty string if the property doesn't exist
2216
2217 def get_image_url(self, selector, by="css selector", timeout=None):
2218 """Extracts the URL from an image element on the page."""
2219 self.__check_scope()
2220 if not timeout:
2221 timeout = settings.LARGE_TIMEOUT
2222 if self.timeout_multiplier and timeout == settings.LARGE_TIMEOUT:
2223 timeout = self.__get_new_timeout(timeout)
2224 return self.get_attribute(
2225 selector, attribute="src", by=by, timeout=timeout
2226 )
2227
2228 def find_elements(self, selector, by="css selector", limit=0):
2229 """Returns a list of matching WebElements.

Callers

nothing calls this directly

Calls 3

__check_scopeMethod · 0.95
__get_new_timeoutMethod · 0.95
get_attributeMethod · 0.95

Tested by

no test coverage detected