You are here

public function KeyboardTrait::keyUp in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/jcalderonzumba/mink-phantomjs-driver/src/KeyboardTrait.php \Zumba\Mink\Driver\KeyboardTrait::keyUp()

Pressed up specific keyboard key.

Parameters

string $xpath:

string|integer $char could be either char ('b') or char-code (98):

string $modifier keyboard modifier (could be 'ctrl', 'alt', 'shift' or 'meta'):

Throws

DriverException When the operation cannot be done

File

vendor/jcalderonzumba/mink-phantomjs-driver/src/KeyboardTrait.php, line 88

Class

KeyboardTrait
Class KeyboardTrait @package Zumba\Mink\Driver

Namespace

Zumba\Mink\Driver

Code

public function keyUp($xpath, $char, $modifier = null) {
  $this
    ->findElement($xpath, 1);
  $element = $this
    ->findElement($xpath, 1);
  $key = $this
    ->normalizeCharForKeyEvent($char);
  $modifier = $this
    ->keyEventModifierControl($modifier);
  return $this->browser
    ->keyEvent($element["page_id"], $element["ids"][0], "keyup", $key, $modifier);
}