MinkExtension icon indicating copy to clipboard operation
MinkExtension copied to clipboard

Adding an exception when the file you are trying to attach is not found

Open toni-kolev opened this issue 9 years ago • 4 comments

I was trying to attach a file to a field and the step "passed" then I saw that the file was actually not attached, after a quick check I figured out that the file was deleted but I got the step "passing". I've decided that it will be a good idea to add an exception when the file you are trying to attach is not found.

This is realted to 'attachFileToField' function.

toni-kolev avatar Dec 01 '16 13:12 toni-kolev

What if you're using SauceLabs, where Selenium isn't running locally and you can't really check that file exists?

aik099 avatar Dec 01 '16 17:12 aik099

It has nothing to do with Selenium/PhantomJS. The check is performed on the environment from where Behat is started.

toni-kolev avatar Dec 01 '16 19:12 toni-kolev

Shouldn't we move the check deeper into the code, so that no matter how upload is invoked we still check, that does exist? Maybe into Mink code itself?

aik099 avatar Dec 01 '16 19:12 aik099

I'm open for any suggestions.

toni-kolev avatar Dec 02 '16 06:12 toni-kolev