• 微信 webview 的自动化技术 at 2017年09月25日

    我在 switch context 时失败,Server 端 Log:

    [Chromedriver] Set chromedriver binary as: /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver
    [Chromedriver] Killing any old chromedrivers, running: pkill -15 -f "/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver.*--port=8000"
    [Chromedriver] No old chromedrivers seemed to exist
    [Chromedriver] Spawning chromedriver with: /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver --url-base=wd/hub --port=8000 --adb-port=5037
    [Chromedriver] [STDOUT] Starting ChromeDriver 2.28.455517 (2c6d2707d8ea850c862f04ac066724273981e88f) on port 8000
    Only local connections are allowed.
    [JSONWP Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8000/wd/hub/status] with no body
    [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"\",\"status\":0,\"value\":{\"build\":{\"version\":\"alpha\"},\"os\":{\"arch\":\"x86_64\",\"name\":\"Mac OS X\",\"version\":\"10.12.5\"}}}"
    [JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.tencent.mm","androidUseRunningApp":true,"args":[],"androidProcess":"com.tencent.mm:tools","extensions":[],"androidDeviceSerial":"85GACME624JX"}}}
    [JSONWP Proxy] Got response with status 200: {"sessionId":"82e6879e6b9151b7eabdde4e31307544","status":33,"value":{"message":"session not created exception: please close '' and try again\n  (Driver info: chromedriver=2.28.455517 (2c6d2707d8ea850c862f04ac066724273981e88f),platform=Mac OS X 10.12.5 x86_64)"}}
    [JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.tencent.mm","androidUseRunningApp":true,"args":[],"androidProcess":"com.tencent.mm:tools","extensions":[],"androidDeviceSerial":"85GACME624JX"}}}
    [JSONWP Proxy] Got response with status 200: {"sessionId":"b185366db77d4ee0a616037f9fac3ec5","status":33,"value":{"message":"session not created exception: please close '' and try again\n  (Driver info: chromedriver=2.28.455517 (2c6d2707d8ea850c862f04ac066724273981e88f),platform=Mac OS X 10.12.5 x86_64)"}}
    [JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.tencent.mm","androidUseRunningApp":true,"args":[],"androidProcess":"com.tencent.mm:tools","extensions":[],"androidDeviceSerial":"85GACME624JX"}}}
    [JSONWP Proxy] Got response with status 200: {"sessionId":"e09b925f60e70fc87c5a41084d9fd2a5","status":33,"value":{"message":"session not created exception: please close '' and try again\n  (Driver info: chromedriver=2.28.455517 (2c6d2707d8ea850c862f04ac066724273981e88f),platform=Mac OS X 10.12.5 x86_64)"}}
    [JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.tencent.mm","androidUseRunningApp":true,"args":[],"androidProcess":"com.tencent.mm:tools","extensions":[],"androidDeviceSerial":"85GACME624JX"}}}
    [JSONWP Proxy] Got response with status 200: {"sessionId":"660d89bd2310fdd79d6bbf5421a03d36","status":33,"value":{"message":"session not created exception: please close '' and try again\n  (Driver info: chromedriver=2.28.455517 (2c6d2707d8ea850c862f04ac066724273981e88f),platform=Mac OS X 10.12.5 x86_64)"}}
    [Chromedriver] Chromedriver exited unexpectedly with code null, signal SIGTERM
    [Chromedriver] Changed state to 'stopped'
    [Chromedriver] Error: session not created exception: please close '' and try again
      (Driver info: chromedriver=2.28.455517 (2c6d2707d8ea850c862f04ac066724273981e88f),platform=Mac OS X 10.12.5 x86_64)
        at Chromedriver.callee$2$0$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-chromedriver/lib/chromedriver.js:176:15)
        at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
        at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
        at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
        at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
     Error: session not created exception: please close '' and try again
      (Driver info: chromedriver=2.28.455517 (2c6d2707d8ea850c862f04ac066724273981e88f),platform=Mac OS X 10.12.5 x86_64)
        at Chromedriver.callee$2$0$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-chromedriver/lib/chromedriver.js:176:15)
        at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
        at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
        at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
        at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    [MJSONWP] Encountered internal error running command: Error: session not created exception: please close '' and try again
      (Driver info: chromedriver=2.28.455517 (2c6d2707d8ea850c862f04ac066724273981e88f),platform=Mac OS X 10.12.5 x86_64)
        at Chromedriver.callee$2$0$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-chromedriver/lib/chromedriver.js:176:15)
        at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
        at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
        at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    

    有哪个同学知道这个问题怎么解决?

  • 大家来讨论下 GAutomator at 2017年08月29日

    简单使用了一下,感觉很好,重打包过程并不复杂,刚好有个做游戏的客户,请他们做了一个给我,试用了一下。重打包注入的代码的基本功能建立一个 SocketServer,实时和外部通讯,功能包括,dump 页面游戏控件,寻找 GameObject,定位 GameObject 位置等等。如果非要说对游戏本身有影响,我觉得可能在性能方面会有一点,毕竟 SocketServer 实现的功能,在网络,内存,cpu 都是要占用一些的。
    优点: 1.对于测试游戏,除图像识别外,提供了另外一条路径;2. 查找游戏控件迅速,基本上毫秒间就可以获取位置;3. 重新打包过程不复杂。
    缺点: 需要重打包游戏,大家都知道最终 release 的版本一般是不会有注入 Gautomator 的操作。所以只能用作功能测试,不能用作最终 release 版本测试。

  • 上手 Appium-desktop beta.4 [iOS] at 2017年07月31日

    @testly 请问怎么向 iOS 真机发送 home 键指令?

  • iOS 性能测试 at 2017年07月28日

    那这样的话,必须是有 app 的源码才能编译运行,获取性能数据啊,是吗?

  • 简单点击,输入,滑动都可以

  • 我遇到 “ Could not remove app: 'Command 'ios-deploy --uninstall_only --id 90fc50c58632c80e75122f7a70f6b45961bec2b2 --bundle_id com.apple.test.WebDriverAgentRunner-Runner' exited with code 253'” 的错误,有没有哪位同学可以指导我一下

  • @Lihuazhang 感谢恒温提醒

  • 使用这个方法识别一张小图,平均需要多少 ms?

  • @zasdsd 能描述详细一点啊,使用反射就能绕开权限的问题?

  • 一般情况下都是不可以的,除非手机 root,并且你的 app 拿到 root 权限,然后在代码里执行 “am instrument -w -e class ......./android.support.test.runner.AndroidJUnitRunner”。

  • OPPO

    color OS 3 以后,使用 adb install 安装需要输入 OPPO 账号。
    解决方法:OPPO 对市场上部分安卓市场开放安装不需要账号的权限。制作一个安卓 app,包名和有安装权限的某个市场相同,在 app 中吊起安装界面,可以成功回避安装限制。