Skip to content

Commit

Permalink
Renamed variables in the "switchToWindow" method to better explain co…
Browse files Browse the repository at this point in the history
…de logic
  • Loading branch information
aik099 committed Jun 28, 2024
1 parent 43666a6 commit d04dfda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/WebdriverClassicDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,11 @@ public function back(): void

public function switchToWindow(?string $name = null): void
{
$name = $name === null
$handle = $name === null
? $this->initialWindowHandle
: $this->getWindowHandleFromName($name);

$this->getWebDriver()->switchTo()->window((string)$name);
$this->getWebDriver()->switchTo()->window((string)$handle);
}

public function switchToIFrame(?string $name = null): void
Expand Down

0 comments on commit d04dfda

Please sign in to comment.