You are here

public function PhantomJSDriver::dragTo in Zircon Profile 8

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

Drags one element to another

Parameters

string $sourceXpath:

string $destinationXpath:

Throws

DriverException

Overrides CoreDriver::dragTo

File

vendor/jcalderonzumba/mink-phantomjs-driver/src/PhantomJSDriver.php, line 74

Class

PhantomJSDriver
Class PhantomJSDriver @package Behat\Mink\Driver

Namespace

Zumba\Mink\Driver

Code

public function dragTo($sourceXpath, $destinationXpath) {
  $sourceElement = $this
    ->findElement($sourceXpath, 1);
  $destinationElement = $this
    ->findElement($destinationXpath, 1);
  $this->browser
    ->drag($sourceElement["page_id"], $sourceElement["ids"][0], $destinationElement["ids"][0]);
}