panther
panther copied to clipboard
test of file uploading
I tested many way to upload file but in each way i got some errors. At the last, this code worked to me:
$crawler->findElement(WebDriverBy::cssSelector(file input selector))->setFileDetector(new LocalFileDetector)->sendKeys(absolute file path);
The important section of this code is : setFileDetector(new LocalFileDetector)
i tried with out that line and I get errors...
Enjoy it :)