Skip to content

Commit

Permalink
Bump minimum required version of behat/mink to ~1.8 and symfony/panth…
Browse files Browse the repository at this point in the history
…er to ~0.7

* switchToIFrame requires int, WebDriverElement or element and not string anymore
as of php-webdriver/webdriver 1.8 and symfony/panther 0.7 which uses w3c compatibility
  • Loading branch information
robertfausk committed Mar 28, 2020
1 parent a845633 commit ace507c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -18,8 +18,8 @@
],
"require": {
"php": ">=7.1",
"behat/mink": "^1.7.1@dev",
"symfony/panther": "~0.4,<0.7",
"behat/mink": "~1.8",
"symfony/panther": "~0.7",
"ext-dom": "*"
},
"require-dev": {
Expand Down
5 changes: 4 additions & 1 deletion src/PantherDriver.php
Expand Up @@ -212,8 +212,11 @@ public function switchToIFrame($name = null)
{
if (null === $name) {
$this->client->switchTo()->defaultContent();
} elseif ($name) {
$iFrameElement = $this->getCrawlerElement($this->getFilteredCrawler(\sprintf("//iframe[@name='%s']", $name)));
$this->client->switchTo()->frame($iFrameElement);
} else {
$this->client->switchTo()->frame($name);
$this->client->switchTo()->frame(null);
}
$this->client->refreshCrawler();
}
Expand Down

0 comments on commit ace507c

Please sign in to comment.