Skip to content

Instantly share code, notes, and snippets.

@alnutile
Created January 11, 2014 01:20
Show Gist options
  • Save alnutile/8365741 to your computer and use it in GitHub Desktop.
Save alnutile/8365741 to your computer and use it in GitHub Desktop.
Switch to popup
/**
* @hidden
*
* @Then /^I switch to popup by clicking "([^"]*)"$/
*/
public function iSwitchToPopupByClicking($arg1) {
$originalWindowName = $this->getMainContext()->getSession()->getWindowName();
$this->setMainWindow();
$this->getMainContext()->getSession()->getPage()->clickLink("$arg1"); //Pressing the withdraw button
$popupName = $this->getNewPopup($originalWindowName);
//Switch to the popup Window
$this->getMainContext()->getSession()->switchToWindow($popupName);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment