Skip to content

Instantly share code, notes, and snippets.

@erkattak
Created January 13, 2012 14:46
Show Gist options
  • Save erkattak/1606605 to your computer and use it in GitHub Desktop.
Save erkattak/1606605 to your computer and use it in GitHub Desktop.
def chosen_select (element_id, option_number)
page.execute_script("$('##{element_id}').next('.chzn-container').trigger('mousedown')")
page.execute_script("$('##{element_id}_chzn_o_#{option_number}').trigger('mouseover').trigger('mouseup')")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment