(context, selector, text, option)
| 454 | @step("User finds '{selector}' and selects \"{text}\" by {option}") |
| 455 | @step('User finds "{selector}" and selects \'{text}\' by {option}') |
| 456 | def 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") |
nothing calls this directly
no test coverage detected
searching dependent graphs…