gpt4 book ai didi

php - captureScreenshotOnFailure 不工作,损坏

转载 作者:行者123 更新时间:2023-11-28 20:44:26 25 4
gpt4 key购买 nike

我一辈子都无法使用这些屏幕截图:

应该很简单,但是没有错误消息,什么也没有。在我开始挖掘源代码之前,任何人都可以阐明一些信息吗?

class ScreenshotTest extends PHPUnit_Extensions_Selenium2TestCase {
protected $captureScreenshotOnFailure = TRUE;
protected $screenshotPath = 'C:\\';
protected $screenshotUrl = 'http://127.0.0.1/';

protected function setUp()
{
$this->setBrowser('firefox');
$this->setBrowserUrl('http://127.0.0.1/');
}

public function testTitle()
{
$this->url('http://127.0.0.1');
$this->assertEquals('foobarbaz', $this->title());
} }

最佳答案

啊哈 - 发现问题了。

extends PHPUnit_Extensions_Selenium2TestCase

应该是

extends PHPUnit_Extensions_SeleniumTestCase

明白了!

文档中的第一个示例是针对 PHPUnit_Extensions_Selenium2TestCase 的。页面上的所有其他内容均用于 PHPUnit_Extensions_SeleniumTestCase

编辑

这个问题让我开始了几天来寻找答案的斗争。对于遇到这个问题的下一个人/女孩,有一些初学者级别的头痛没有在任何地方明确说明,我在 Where the heck is any Selenium 2 documentation for PHPUnit? 记录了它们。 .

关于php - captureScreenshotOnFailure 不工作,损坏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19085777/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com