Been banging my head, I'm just trying to switch to a google sign in pop up window. These are the solutions I've tried:
Solution 1:
$I->switchToNextTab();
RESULT:
unknown error: $ is not defined
Solution 2:
$I->switchToWindow("name_of_other_window");
RESULT:
I'm still in the current window
Solution 3:
$this->I->executeInSelenium(function (\Facebook\WebDriver\Remote\RemoteWebDriver $webdriver) {
$handles = $webdriver->getWindowHandles();
$lastWindow = end($handles);
$webdriver->switchTo()->window($lastWindow);
});
RESULT:
unknown error: $ is not defined
Does anyone know how to resolve this issue.
Just an example below, but this is exactly how it's implemented