@world.absorb
def select_option(name, value, wait_time=GLOBAL_WAIT_FOR_TIMEOUT):
 select_css = "select[name='{}']".format(name)
 option_css = "option[value='{}']".format(value)
 css_selector = '{} {}'.format(select_css, option_css)
 css_click(css_selector=css_selector, wait_time=wait_time)
 wait_for((lambda _: css_has_value(select_css, value)))
 return True

@ world . absorb def select_option ( name , value , wait_time = GLOBAL_WAIT_FOR_TIMEOUT ) : select_css = "select[name='{}']" . format ( name ) option_css = "option[value='{}']" . format ( value ) css_selector = '{} {}' . format ( select_css , option_css ) css_click ( css_selector = css_selector , wait_time = wait_time ) wait_for ( ( lambda _ : css_has_value ( select_css , value ) ) ) return True
a method to select an option then for synchronization purposes .