diff --git a/src/Behat/MinkExtension/Context/MinkContext.php b/src/Behat/MinkExtension/Context/MinkContext.php index fa356a2..43a529e 100644 --- a/src/Behat/MinkExtension/Context/MinkContext.php +++ b/src/Behat/MinkExtension/Context/MinkContext.php @@ -411,6 +411,16 @@ class MinkContext extends RawMinkContext implements TranslatedContextInterface $this->assertSession()->elementsCount('css', $element, intval($num)); } + /** + * Prints current URL to console. + * + * @Then /^print current URL$/ + */ + public function printCurrentUrl() + { + $this->printDebug($this->getSession()->getCurrentUrl()); + } + /** * Prints last response to console. * diff --git a/src/Behat/MinkExtension/Context/MinkDictionary.php b/src/Behat/MinkExtension/Context/MinkDictionary.php index 94a17f1..92fdfca 100644 --- a/src/Behat/MinkExtension/Context/MinkDictionary.php +++ b/src/Behat/MinkExtension/Context/MinkDictionary.php @@ -477,6 +477,16 @@ trait MinkDictionary $this->assertSession()->elementsCount('css', $element, intval($num)); } + /** + * Prints current URL to console. + * + * @Then /^print current URL$/ + */ + public function printCurrentUrl() + { + $this->printDebug($this->getSession()->getCurrentUrl()); + } + /** * Prints last response to console. *