- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试设置我的测试自动化引擎。不幸的是,当我运行我的测试并失败时,没有截屏。我在日志中找不到任何错误告诉我出了什么问题。
我正在使用:Magento 社区 1.7.0.0, Selenium 服务器 2.24.1,火狐 13.0.1,PHPUnit 3.6.11,Magento 测试自动化框架(最新版本)。Ubuntu 12.04
我的问题是:1.如何归纳问题出在哪里?2. 有谁在那个firefox和selenium版本上截图成功的吗?
最佳答案
我写了没有 magento taf 的简单测试,它一定会失败:
class WebTest extends PHPUnit_Extensions_SeleniumTestCase
{
protected $captureScreenshotOnFailure = TRUE;
protected $screenshotPath = '/home/lpp2/Pulpit/report/';
protected $screenshotUrl = '/home/lpp2/Pulpit/report/';
protected function setUp()
{
$this->setBrowser("*chrome");
$this->setBrowserUrl("http://www.google.pl/");
}
public function testMyTestCase()
{
$this->open("http://www.google.pl/");
$this->click("id=gbi4t");
$this->waitForPageToLoad("30000");
$this->type("id=Email", "user.name");
$this->type("id=Passwd", "pass");
$this->click("id=signIn");
$this->waitForPageToLoad("30000");
$this->assertEquals("Google", $this->getTitle());
}
}
?>
我的 phpunit.xml:
<phpunit>
<testsuites>
<testsuite name="Google">
<file>google.php</file>
</testsuite>
</testsuites>
<logging>
<log type="coverage-html" target="./report/coverage/" charset="UTF-8"
yui="true" highlight="false"
lowUpperBound="35" highLowerBound="70"/>
<log type="plain" target="./report/logfile.txt"/>
<log type="junit" target="./report/logfile.xml" logIncompleteSkipped="false"/>
</logging>
</phpunit>
得到了很好的截图。所以问题出在magento taf上。有些东西是禁用的。我在 .../magento_taf/lib/Mage/Selenium/TestCase.php 树行中找到了注释:
protected $captureScreenshotOnFailure = TRUE;
protected $screenshotPath = SELENIUM_TESTS_SCREENSHOTDIR;
protected $screenshotUrl = SELENIUM_TESTS_SCREENSHOTDIR;
取消注释 -> 还是不行!
编辑:好的,我已经从 github 下载了最新版本,现在可以使用了。
关于firefox - 运行 MTAF 时使用 selenium server 2.24.1 和 firefox 13 截屏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11344450/
我需要截屏并保存截屏。我需要在不使用与 PC 的任何连接或不取消手机根目录的情况下执行此操作。每当触发事件时,我都需要这样做。例如,当游戏中显示广告时......或者当游戏结束并显示蛇的分数等时。你能
我正在尝试捕捉(屏幕截图) View 。为此,我使用下面显示的一段代码将其作为 PNG 图像保存到我的文档目录中。 UIGraphicsBeginImageContextWithOptions(hig
本文实例总结了常见的java编程实现屏幕截图方法。分享给大家供大家参考,具体如下: 方法一: ?
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许在 Stack Overflow 上提出有关通用计算硬件和软件的问题。您可以编辑问题,使其成为
我正在构建一个跨平台桌面应用程序。我正在使用 electronjs 框架开发我的桌面应用程序。我想在我的应用程序启动时添加每 5 分钟截取一次屏幕截图的功能! 帮助将不胜感激我的 main.js //
我从另一个包导入这个类并尝试调用这个方法,但它不起作用。 当我在同一个类中创建此方法并调用它时,它正在工作。 private void getScreenshot() throws IOExcept
我正在尝试截取增强现实屏幕的屏幕截图并将其作为位图传递给另一个 Activity 。 这是我用来截取屏幕截图的代码: 截屏功能 public static void tmpScreenshot(Bit
我有一个绘图区,我在里面画了一些图形或图像,所以我有这个回调来截屏: void CanvasToolBox::actionCanvasCamera() { auto root = Gdk::W
我正在使用 AVCaptureMetadataOutput 以使用 iOS QRCode、条形码扫描功能。这很好用,我得到了通过 AVCaptureMetadataOutput 委托(delegate
我想截取我 View 中特定部分的屏幕截图(具体来说是 ImageView ),是否有机会.... 最佳答案 看来您需要执行 renderInContext。 // Size of the resul
这个问题在这里已经有了答案: Read binary stdout data like screencap data from adb shell? (19 个回答) 关闭5年前. 我正在尝试尽快获取
嘿,我正在使用 WEBRTC 进行屏幕共享。但是我被困在我需要用户整个屏幕的地方,但是浏览器为用户提供了更多选项,例如应用程序和浏览器选项卡,所以我想检查用户从浏览器产生的弹出窗口中选择的选项,如果它
我正在压力测试中测试应用程序。 这就是为什么我需要它在发生错误(错误窗口打开)或挂起或崩溃时重新启动。同时,我需要收集有关导致重启的问题的所有有用信息:制作转储文件,并从错误窗口复制错误文本(和/或获
按照目前的情况,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
嗨,这里有人可以帮助我使用 phantomJS 截取我的 div 吗?我如何截取我的 #dropzone 然后将其附加到同一页面? 请帮忙。 最佳答案 有两种方法可以部分呈现网页。 1) 只用 div
这是我写的用于保存网页截图的简单python代码。 from selenium import webdriver import time driver=webdriver.Firefox() driv
出于安全原因,我当前正在构建的应用程序要求应用程序必须阻止操作系统在应用程序被插入后台时截取该应用程序的屏幕截图。这样在应用之间切换时将无法看到最后一个 Activity 屏幕。 我打算将此功能放在应
我正在尝试从 Silverlight 5 应用程序中截取子类 XNA DrawingSurface 元素的屏幕截图。这个 sl 应用程序将在一个 aspx 页面内运行。 这是我迄今为止尝试过但没有成功
我正在使用 Xcode 构建 iPhone/iPad 应用程序。 现在我想截取这个应用程序的屏幕截图。 尺寸为 960x640。 那怎么办? 模拟器屏幕太小 最佳答案 您可以使用 cmd+S进入模拟器
我找到了一些代码示例,但我不知道哪些 JNA 版本可以使用哪些方法。我只找到了一些片段,其中缺少类,而且我无法导入它们。 我想知道我应该使用哪个 JNA 版本以及如何获取 BufferedImage
我是一名优秀的程序员,十分优秀!