Skip to content

Instantly share code, notes, and snippets.

@biot023
Created February 4, 2010 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save biot023/294620 to your computer and use it in GitHub Desktop.
Save biot023/294620 to your computer and use it in GitHub Desktop.
# features/support/my_env.rb
def enter_text( input, text )
input.node.clear
input.node.send_keys( text.to_s )
end
# features/steps/feature_steps.rb
When /^I enter "([^\"]*)"$/ do |value|
enter_text( "//*[@class = 'current']//input", value )
find( "//*[@class = 'current']//input" ).value.should == value
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment