Open ErenYeager80 opened 2 years ago
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...
setFileDetector(new LocalFileDetector)
Enjoy it :)
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 :)