You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wai Hon Law edited this page Jan 15, 2014
·
1 revision
Consider the following <input> html element.
<input type='file' id='file_input'></input>
<?php
// getting the input element
$file_input = $driver->findElement(
WebDriverBy::id('file_input')
);
// set the file detector
$file_input->setFileDetector(new LocalFileDetector());
// upload the file and submit the form
$file_input->sendKeys($file_path)->submit();