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

Function select_option_by_option

sbase/steps.py:456–470  ·  view source on GitHub ↗
(context, selector, text, option)

Source from the content-addressed store, hash-verified

454@step("User finds '{selector}' and selects \"{text}\" by {option}")
455@step('User finds "{selector}" and selects \'{text}\' by {option}')
456def select_option_by_option(context, selector, text, option):
457 sb = context.sb
458 text = normalize_text(text)
459 if option.startswith("'") or option.startswith('"'):
460 option = option[1:]
461 if option.endswith("'") or option.endswith('"'):
462 option = option[:-1]
463 if option == "text":
464 sb.select_option_by_text(selector, text)
465 elif option == "index":
466 sb.select_option_by_index(selector, text)
467 elif option == "value":
468 sb.select_option_by_value(selector, text)
469 else:
470 raise Exception("Unknown option: %s" % option)
471
472
473@step("Wait for '{selector}' to be visible")

Callers

nothing calls this directly

Calls 4

normalize_textFunction · 0.85
select_option_by_textMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…