无法使用calabash从Android模拟器中截取屏幕截图

时间:2017-04-20 07:03:49

标签: calabash-android

android`用于我的UIAutomation测试。我在控制台中遇到以下内容。有什么建议吗?

Success
  Background:                # features/02_login/login.feature:4
    Given the app is running # features/android/step_definitions/common_actions.rb:8
Could not take screenshot
java.io.IOException: EOF
    at com.android.ddmlib.AdbHelper.read(AdbHelper.java:643)
    at com.android.ddmlib.AdbHelper.read(AdbHelper.java:616)
    at com.android.ddmlib.AdbHelper.getFrameBuffer(AdbHelper.java:296)
    at com.android.ddmlib.CalabashAdbHelper.getFrameBuffer(Unknown Source)
    at com.android.ddmlib.CalabashDevice.getScreenshot(Unknown Source)
    at sh.calaba.screenshot.ScreenshotTaker.takeScreenshot(Unknown Source)
    at sh.calaba.screenshot.ScreenshotTaker.main(Unknown Source)

1 个答案:

答案 0 :(得分:0)

我找到了答案。使用var externalURL = nlapiResolveURL('SUITELET', 'customscript_xxxx', 'customdeploy_xxxx', true); externalURL = externalURL.replace('forms', 'system'); var dataCenter = externalURL.slice(0, externalURL.search('app'));