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

Method set_attribute_all

seleniumbase/fixtures/base_case.py:2056–2062  ·  view source on GitHub ↗

Same as set_attributes(), but using querySelectorAll naming scheme. This method uses JavaScript to set/update a common attribute. All matching selectors from querySelectorAll() are used. Example => (Make all links on a website redirect to Google): self.set_attribute_a

(self, selector, attribute, value, by="css selector")

Source from the content-addressed store, hash-verified

2054 self.__extra_actions.append(action)
2055
2056 def set_attribute_all(self, selector, attribute, value, by="css selector"):
2057 """Same as set_attributes(), but using querySelectorAll naming scheme.
2058 This method uses JavaScript to set/update a common attribute.
2059 All matching selectors from querySelectorAll() are used.
2060 Example => (Make all links on a website redirect to Google):
2061 self.set_attribute_all("a", "href", "https://google.com")"""
2062 self.set_attributes(selector, attribute, value, by=by)
2063
2064 def remove_attribute(
2065 self, selector, attribute, by="css selector", timeout=None

Callers

nothing calls this directly

Calls 1

set_attributesMethod · 0.95

Tested by

no test coverage detected