本文整理汇总了PHP中PHPUnit_Extensions_SeleniumTestCase::sessionId方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_Extensions_SeleniumTestCase::sessionId方法的具体用法?PHP PHPUnit_Extensions_SeleniumTestCase::sessionId怎么用?PHP PHPUnit_Extensions_SeleniumTestCase::sessionId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPUnit_Extensions_SeleniumTestCase
的用法示例。
在下文中一共展示了PHPUnit_Extensions_SeleniumTestCase::sessionId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onNotSuccessfulTest
/**
* This method is called when a test method did not execute successfully.
*
* @param Exception $e
*/
protected function onNotSuccessfulTest(Exception $e)
{
if ($e instanceof PHPUnit_Framework_ExpectationFailedException) {
$buffer = 'Current URL: ' . $this->drivers[0]->getLocation() . "\n";
if ($this->captureScreenshotOnFailure && !empty($this->screenshotPath) && !empty($this->screenshotUrl)) {
$filename = $this->getScreenshotPath() . $this->testId . '.png';
$this->drivers[0]->captureEntirePageScreenshot($filename);
$buffer .= 'Screenshot: ' . $this->screenshotUrl . '/' . $this->testId . ".png\n";
}
}
$this->stopSession();
self::$sessionId = NULL;
if ($e instanceof PHPUnit_Framework_ExpectationFailedException) {
if (is_object($e->getComparisonFailure())) {
$message = $e->getComparisonFailure()->toString();
} else {
$message = $e->getMessage();
}
$buffer .= "\n" . $message;
throw new PHPUnit_Framework_ExpectationFailedException($buffer);
}
throw $e;
}
示例2: restoreSessionStateAfterFailedTest
private function restoreSessionStateAfterFailedTest()
{
self::$sessionId = NULL;
}
示例3: restoreSessionStateAfterFailedTest
private function restoreSessionStateAfterFailedTest()
{
$this->selectWindow('null');
self::$sessionId = NULL;
}