Skip to content

Commit

Permalink
Added selectors translations
Browse files Browse the repository at this point in the history
  • Loading branch information
BR0kEN- committed Feb 10, 2016
1 parent e8d24bb commit 7cc79d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Context/RawPageContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ public function element($locator, $selector)
throw new \RuntimeException(sprintf('Locator "%s" was not specified.'));
}

$selector = t($selector);
$element = $this->{'find' . $map[$locator]}($selector);
$this->throwNoSuchElementException($selector, $element);

Expand Down
2 changes: 2 additions & 0 deletions src/Context/TqContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ public function beforeScenario(BehatScope\BeforeScenarioScope $scope)
{
self::collectTags($scope->getScenario()->getTags());

// No need to keep working element between scenarios.
$this->unsetWorkingElement();
// Any page should be visited due to using jQuery and checking the cookies.
$this->visitPath('/');
// By "Goutte" session we need to visit any page to be able to set a cookie
Expand Down

0 comments on commit 7cc79d0

Please sign in to comment.