Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Update the driver for the Mink 2.0 API #108

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},

Expand Down
18 changes: 1 addition & 17 deletions src/Behat/Mink/Driver/Selenium2Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -28,12 +26,6 @@
*/
class Selenium2Driver extends CoreDriver
{
/**
* The current Mink session
* @var Session
*/
private $session;

/**
* Whether the browser has been started
* @var Boolean
Expand Down Expand Up @@ -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}
*/
Expand Down Expand Up @@ -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;
Expand Down