From dd19895d07eaeccb1ed5e7b8c5a5c27c04bba660 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Sat, 28 Dec 2013 11:52:49 +0100 Subject: [PATCH] Updated the driver for the Mink 2.0 API --- composer.json | 2 +- src/Behat/Mink/Driver/Selenium2Driver.php | 18 +----------------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/composer.json b/composer.json index b68a30fd..f03319a8 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "require": { "php": ">=5.3.1", - "behat/mink": "~1.6@dev", + "behat/mink": "dev-2-architecture-changes", "instaclick/php-webdriver": "~1.1" }, diff --git a/src/Behat/Mink/Driver/Selenium2Driver.php b/src/Behat/Mink/Driver/Selenium2Driver.php index 3bb39b27..9f554373 100755 --- a/src/Behat/Mink/Driver/Selenium2Driver.php +++ b/src/Behat/Mink/Driver/Selenium2Driver.php @@ -10,10 +10,8 @@ namespace Behat\Mink\Driver; -use Behat\Mink\Element\NodeElement; use Behat\Mink\Exception\DriverException; use Behat\Mink\Selector\Xpath\Escaper; -use Behat\Mink\Session; use WebDriver\Element; use WebDriver\Exception\NoSuchElement; use WebDriver\Exception\UnknownError; @@ -28,12 +26,6 @@ */ class Selenium2Driver extends CoreDriver { - /** - * The current Mink session - * @var Session - */ - private $session; - /** * Whether the browser has been started * @var Boolean @@ -286,14 +278,6 @@ private function executeJsOnElement(Element $element, $script, $sync = true) return $this->wdSession->execute_async($options); } - /** - * {@inheritdoc} - */ - public function setSession(Session $session) - { - $this->session = $session; - } - /** * {@inheritdoc} */ @@ -505,7 +489,7 @@ public function find($xpath) $elements = array(); foreach ($nodes as $i => $node) { - $elements[] = new NodeElement(sprintf('(%s)[%d]', $xpath, $i+1), $this->session); + $elements[] = sprintf('(%s)[%d]', $xpath, $i+1); } return $elements;