Created
March 3, 2011 22:47
-
-
Save pullmonkey/853786 to your computer and use it in GitHub Desktop.
capybara celerity driver does not trigger JS change event
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When /^(?:|I )select "([^"]*)" from "([^"]*)"(?: within "([^"]*)")?$/ do |value, field, selector| | |
with_scope(selector) do | |
select(value, :from => field) | |
# this is what changed .. 1) need to find the ID of the field that was passed in and then trigger a change event | |
id = "#" + find_field(field)[:id] | |
page.execute_script("$('#{id}').trigger('change');") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment