Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

[WIP] Updated the driver for the Mink 2.0 API #29

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 @@ -16,7 +16,7 @@

"require": {
"php": ">=5.3.1",
"behat/mink": "~1.5.0@dev",
"behat/mink": "dev-2-architecture-changes",
"behat/sahi-client": "~1.1.0@dev"
},

Expand Down
15 changes: 1 addition & 14 deletions src/Behat/Mink/Driver/SahiDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace Behat\Mink\Driver;

use Behat\Mink\Element\NodeElement;
use Behat\Mink\Session;
use Behat\SahiClient\Client;
use Behat\SahiClient\Exception\ConnectionException;

Expand All @@ -25,7 +23,6 @@ class SahiDriver extends CoreDriver
private $started = false;
private $browserName;
private $client;
private $session;

/**
* Initializes Sahi driver.
Expand Down Expand Up @@ -53,16 +50,6 @@ public function getClient()
return $this->client;
}

/**
* Sets driver's current session.
*
* @param Session $session
*/
public function setSession(Session $session)
{
$this->session = $session;
}

/**
* Starts driver.
*/
Expand Down Expand Up @@ -260,7 +247,7 @@ public function find($xpath)
$count = intval($this->evaluateScript($function));
$elements = array();
for ($i = 0; $i < $count; $i++) {
$elements[] = new NodeElement(sprintf('(%s)[%d]', $xpath, $i + 1), $this->session);
$elements[] = sprintf('(%s)[%d]', $xpath, $i + 1);
}

return $elements;
Expand Down