diff --git a/src/WebdriverClassicDriver.php b/src/WebdriverClassicDriver.php index 2d4ba13..61363f1 100644 --- a/src/WebdriverClassicDriver.php +++ b/src/WebdriverClassicDriver.php @@ -186,10 +186,10 @@ public function switchToWindow(?string $name = null): void $this->getWebDriver()->switchTo()->window((string)$name); } - public function switchToIFrame(?string $name = null): void + public function switchToIFrame($name = null): void { $frameQuery = $name; - if ($name && $this->getWebDriver()->isW3cCompliant()) { + if ($name && !is_int($name) && $this->getWebDriver()->isW3cCompliant()) { try { $frameQuery = $this->getWebDriver()->findElement(WebDriverBy::id($name)); } catch (NoSuchElementException $e) {