MCPcopy Index your code
hub / github.com/seleniumbase/SeleniumBase / set_attribute

Function set_attribute

sbase/steps.py:1170–1177  ·  view source on GitHub ↗
(context, selector, attribute, value)

Source from the content-addressed store, hash-verified

1168@step("Find '{selector}' and set {attribute} to \"{value}\"")
1169@step('Find "{selector}" and set {attribute} to \'{value}\'')
1170def set_attribute(context, selector, attribute, value):
1171 sb = context.sb
1172 value = normalize_text(value)
1173 if attribute.startswith("'") or attribute.startswith('"'):
1174 attribute = attribute[1:]
1175 if attribute.endswith("'") or attribute.endswith('"'):
1176 attribute = attribute[:-1]
1177 sb.set_attribute(selector, attribute, value)
1178
1179
1180@step("Find all '{selector}' and set {attribute} to '{value}'")

Callers

nothing calls this directly

Calls 2

normalize_textFunction · 0.85
set_attributeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…