Ognjen Regoje bio photo

MY NAME IS
Ognjen Regoje
BUT YOU CAN CALL ME OGGY


I make things that run on the web (mostly).

More /ABOUT me.

And about /PROJECTS I've been involved in.

Email me at me@ognjen.io

me@ognjen.io Twitter LinkedIn Instagram Github

Uploading a file in cucumber tests

In order to upload a file in a cucumber test, that is to use a file select input, define the following in your user_steps.rb:

  And(/^I attach "(.*?)" to "(.*?)"$/) do |field, file|
    page.attach_file field, File.join(Rails.root, file)
  end

#cucumber #file field #rails #technical