public function seeInPopup($text)
    {
        if ($this->isPhantom()) {
            throw new ModuleException($this, 'PhantomJS does not support working with popups');
        }
        $alert = $this->webDriver->switchTo()->alert();
        try {
            $this->assertStringContainsString($text, $alert->getText());
        } catch (\PHPUnit\Framework\AssertionFailedError $e) {
            $alert->dismiss();
            throw $e;
        }
    }
public function seeInPopup($text)
    {
        if ($this->isPhantom()) {
            throw new ModuleException($this, 'PhantomJS does not support working with popups');
        }
        $alert = $this->webDriver->switchTo()->alert();
        try {
            $this->assertStringContainsString($text, $alert->getText());
        } catch (\PHPUnit\Framework\AssertionFailedError $e) {
            $alert->dismiss();
            throw $e;
        }
    }
public function seeInPopup ( $ text ) { if ( $ this -> isPhantom ( ) ) { throw new ModuleException ( $ this , 'PhantomJS does not support working with popups' ) ; } $ alert = $ this -> webDriver -> switchTo ( ) -> alert ( ) ; try { $ this -> assertStringContainsString ( $ text , $ alert -> getText ( ) ) ; } catch ( \ PHPUnit \ Framework \ AssertionFailedError $ e ) { $ alert -> dismiss ( ) ; throw $ e ; } }
Checks that the active JavaScript popup,
as created by `window.alert`|`window.confirm`|`window.prompt`, contains the given string.

@param $text

@throws \Codeception\Exception\ModuleException
Checks that the active JavaScript popup as created by window . alert | window . confirm | window . prompt contains the given string .