public function SocialMinkContext::attachFileToHiddenField in Open Social 8
Same name and namespace in other branches
- 8.2 tests/behat/features/bootstrap/SocialMinkContext.php \SocialMinkContext::attachFileToHiddenField()
Attaches file to field with specified name.
@When /^(?:|I )attach the file "(?P<path>[^"]*)" to hidden field "(?P<field>(?:[^"]|\\")*)"$/
File
- tests/
behat/ features/ bootstrap/ SocialMinkContext.php, line 93
Class
- SocialMinkContext
- Defines application features from the specific context.
Code
public function attachFileToHiddenField($field, $path) {
$field = $this
->fixStepArgument($field);
$javascript = "jQuery('#" . $field . "').parent().removeClass('hidden')";
$this
->getSession()
->executeScript($javascript);
$this
->attachFileToField($field, $path);
}