diff --git a/src/Casper.php b/src/Casper.php index e5fec51..bf3e332 100644 --- a/src/Casper.php +++ b/src/Casper.php @@ -280,6 +280,29 @@ public function fillFormSelectors($selector, $data = array(), $submit = false) return $this; } + /** + * upload Files + * to the element matching the provided selector: + * + * @param string $selector + * @param array $data + * + * @return \Browser\Casper + */ + public function uploadFile($selector, $data = array()) + { + $jsonData = json_encode($data); + $fragment = <<script .= $fragment; + + return $this; + } + /** * Sends native keyboard events