Anybody have idea how to test file download using cucumber?
I run selenium through chrome, when I'm testing that the csv has downloaded, I use the following in Ruby:
Then /^I should get a downloaded file for fleet: "(.*?)"$/ do |export|
puts Dir["C:/Users/**/Downloads/fleet_#{export}_export_all_*.csv"].last
end
It simply looks in the default download directory and confirms that the file is there and outputs the filename within cmd.