I am using ‘selenium2’ driver and trying to test the file upload form input field but getting error as
Exception thrown by (//html/descendant-or-self::*[@id = 'ImageID'])[1]
'D:/looks.jpg' does not exist on the file system
My code In FeatureContex.php as bellow
> $page = $this->getSession()->getPage();
> $element = $page->find('css', '#ImageID');
> $element->attachFile('D:/looks.jpg');
Here, this code is the default code of behat and mink. try this.