Skip to content

Commit

Permalink
Don't iterate windows, when already at correct window (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
aik099 committed Mar 22, 2024
1 parent 8a540d9 commit 71c242b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/WebdriverClassicDriver.php
Expand Up @@ -1013,6 +1013,12 @@ private function mouseOverElement(RemoteWebElement $element): void
*/
private function withWindow(?string $name, callable $callback): void
{
if ($name === null) {
$callback();

return;
}

$origName = $this->getWindowName();

try {
Expand Down

0 comments on commit 71c242b

Please sign in to comment.