MOBILE-4069 behat: Fix bug when checking URL in browser tab

main
Dani Palou 2022-05-18 13:10:46 +02:00
parent 6cc731eeea
commit 2c80555c1b
1 changed files with 1 additions and 1 deletions

View File

@ -681,7 +681,7 @@ class behat_app extends behat_app_helper {
if (!is_null($urlpattern)) {
$this->getSession()->switchToWindow($windowNames[1]);
$windowurl = $this->getSession()->getCurrentUrl();
$windowhaspattern = preg_match("/$urlpattern/", $windowurl);
$windowhaspattern = !!preg_match("/$urlpattern/", $windowurl);
$this->getSession()->switchToWindow($windowNames[0]);
if ($not === $windowhaspattern) {