mink - Behat Attachment File does not work -
i using ‘selenium2’ driver , trying test file upload form input field getting error as
exception thrown (//html/descendant-or-self::*[@id = 'imageid'])[1] 'd:/looks.jpg' not exist on file system
my code in featurecontex.php bellow
> $page = $this->getsession()->getpage(); > $element = $page->find('css', '#imageid'); > $element->attachfile('d:/looks.jpg');
did define files_path? mine in behat.yml. if have defined you'd provide filename should exist in folder defined.
default: context: class: 'featurecontext' extensions: behat\minkextension\extension: files_path: '/var/www/project/public/images' base_url: 'https://local.dev'
Comments
Post a Comment