環境:windows 7
Capybara(selenium-webdriver) + Turnip でテスト
以下のファイル構成で、ファイルがアップロードされません。
お知恵を下さい。
xxxx.future
…割愛…
かつ パス "C:\file\file.xls" にあるファイルを "data[date][xls]" に添付する
…割愛…
global_steps.rb
…割愛…
step %(パス :path にあるファイルを :field に添付する) do |path, field|
attach_file field, path
end
…割愛…
出力結果
Capybara::FileNotFound:
cannot attach file, C:\file\file.xls does not exist
/解決*****************************************/
テスト環境
c:\test\spec\futures\xxx.future
c:\test\spec\futures\file.xls
c:\test\spec\steps\global_steps.rb
xxxx.future
…割愛…
かつ パス "\file.xls" にあるファイルを "data[date][xls]" に添付する
…割愛…
global_steps.rb のソースコード
…割愛…
step %(パス :path にあるファイルを :field に添付する) do |path, field|
attach_file field, path
end
…割愛…
/*******************************************/
回答1件
あなたの回答
tips
プレビュー