• 你把 uiautomatorviewer 的图也放出来下

  • appium 显示等待 at March 20, 2019

    几种等待方法跟 selenium 是一样的

  • 什么错你贴出来啊😂

  • appium 闪退还是被测 app 闪退

  • JD 挺有意思的一个现象 at March 15, 2019

    经常遇到啊,显示能领券,登录了就没了,登录另一个号就有了,习惯了。
    不同的帐号本来就是区别对待的。

  • 这命令不用 sudo,你代理设置好了吗,好像要大写的 HTTP_PROXY

  • 你这个也不像 H5

  • h5 没触发事件吧,比如一个链接,你找元素一般要找到 a 标签,有时候找到父元素 click 了是没效果。

  • 你的意思是a[-3:-1]

  • 9002 端口的 web 可以访问,9000 端口的还是无法访问,提示 500 错误。
    哎,不懂谷歌的东西这么难用,支持个代理这么难吗,系统设置了代理就出错了。而且启动服务指定了不安装依赖(都装好了)还是要去请求服务安装乱七八糟的东西,这还叫 “local instanse” 吗,哎
    现在的情况是:
    不设置系统代理,服务无法启动
    设置了代理,服务可以启动,但是 9000 端口服务异常

  • 这样是不行的,我通过 ssh 连进去,不管配没配代理都是不成功的。
    我只有通过 ubuntu 的系统界面 setting 配置代理,然后打开 terminal 才成功的。。

  • 这个我提了个 issue,他们这样回复的

    I has meet it,it is because it will access localhost port 9004 9003 9006 and so on when init,so the proxy server must on the same machine with clustfuzz server and igore localhost by proxy rules.
    We have a note for this in documentation, see https://google.github.io/clusterfuzz/getting-started/local-instance/#running-a-local-server. list of ports needed are here - https://github.com/google/clusterfuzz/blob/master/src/local/butler/constants.py
    "Note: the local instance may use ports other than 9000, such as 9008, for things like uploading files. Therefore, using the local instance may break if the needed ports are unavailable or if you can only access some of the needed ports from your browser (for example: because of port forwarding or firewall rules when accessing from another host)."

    链接:https://github.com/google/clusterfuzz/issues/223
    配置代理和不配置代理的错都不一样的,因为之前我是在虚拟机里面,ssh 进去的,今天给虚拟机安装了图形界面,直接在里面操作(在 setting 里面配置的代理),能启动起来打开管理界面了。

  • 今天倒是启动起来了,但是我找了好久没找到这个按钮。我看官方文档也是这么写的啊,哎。。
    进入 Jobs 页面,点击【ADD NEW JOB】按钮

  • 我有个办法,用你的免费证书打个测试的 app,只要这个 app 不卸载,装相同证书的 app 都不会让你信任的。
    缺点是:免费证书也只能信任 7 天,所以每周要信任一次,但是比每次都信任好多了不是嘛

  • 我猜是框架里面有异常处理,它要获取异常信息,如果你自己处理了,它就获取不到了。
    这估计是你们组的规则呗

  • 你都说了 chrome 看到的,那就是 h5 了啊,h5 的 id 你怎么能用 appium inspector 看到,你要用 h5 的元素来定位,你要先切换 context 到 h5,然后再操作

  • 我是 Ubuntu,开始配置的代理是小写的http_proxy,报错跟你一样的,也是 go 的依赖安装不上,后来搜了下,bazel 走代理,配置了之后就可以了

    export HTTP_PROXY=http://ip:port
    export HTTPS_PROXY=http://ip:port
    

    另外发现配置了代理之后有时候还是连不上 google,我怀疑是 IPV6 的问题,所以我把系统的 IPV6 禁用了。。
    现在我本地服务还是启动不了,提了一个 issue,现在还没人回。

  • 如果你想 5 个用例分开执行,比如一个设备执行 2 个,一个设备执行 3 个,那这种应该需要你自己另外处理了。
    如果你想 5 个用例既在 A 设备,又在 B 设备执行(前提是用例跟帐号无关 ,不会互相踢下线),那就直接运行两次就行了,但是参数 systemPort 要为每个设备指定不同的。

  • 问题三可以设置代理 (注意要大写)

    export HTTP_PROXY=http://
    export HTTPS_PROXY=http://
    

    搞这个快一天了没搞定,代理问题都搞死人了

    ================
    最后安装成功了,但是无法启动本地 web 服务,一直报错

    Running: python polymer_bundler.py (cwd='local')
    | App Engine templates are up to date.
    Clearing local datastore by removing local/storage.
    Created symlink: source: /home/test/clusterfuzz/local/storage/local_gcs, target /home/test/clusterfuzz/src/appengine/local_gcs.
    Traceback (most recent call last):
      File "butler.py", line 282, in <module>
        main()
      File "butler.py", line 256, in main
        command.execute(args)
      File "src/local/butler/run_server.py", line 162, in execute
        test_utils.setup_pubsub(constants.TEST_APP_ID)
      File "/home/test/clusterfuzz/src/python/tests/test_libs/test_utils.py", line 308, in setup_pubsub
        _create_pubsub_topic(client, project, queue['name'])
      File "/home/test/clusterfuzz/src/python/tests/test_libs/test_utils.py", line 284, in _create_pubsub_topic
        if client.get_topic(full_name):
      File "/home/test/clusterfuzz/src/python/google_cloud_utils/pubsub.py", line 193, in get_topic
        response = self._execute_with_retry(request)
      File "/home/test/clusterfuzz/src/python/base/retry.py", line 88, in _wrapper
        result = func(*args, **kwargs)
      File "/home/test/clusterfuzz/src/python/google_cloud_utils/pubsub.py", line 108, in _execute_with_retry
        return request.execute()
      File "/home/test/clusterfuzz/src/third_party/googleapiclient/_helpers.py", line 130, in positional_wrapper
        return wrapped(*args, **kwargs)
      File "/home/test/clusterfuzz/src/third_party/googleapiclient/http.py", line 837, in execute
        method=str(self.method), body=self.body, headers=self.headers)
      File "/home/test/clusterfuzz/src/third_party/googleapiclient/http.py", line 162, in _retry_request
        resp, content = http.request(uri, method, *args, **kwargs)
      File "/home/test/clusterfuzz/src/third_party/google_auth_httplib2.py", line 198, in request
        uri, method, body=body, headers=request_headers, **kwargs)
      File "/home/test/clusterfuzz/src/third_party/httplib2/__init__.py", line 1694, in request
        (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
      File "/home/test/clusterfuzz/src/third_party/httplib2/__init__.py", line 1434, in _request
        (response, content) = self._conn_request(conn, request_uri, method, body, headers)
      File "/home/test/clusterfuzz/src/third_party/httplib2/__init__.py", line 1390, in _conn_request
        response = conn.getresponse()
      File "/usr/lib/python2.7/httplib.py", line 1121, in getresponse
        response.begin()
      File "/usr/lib/python2.7/httplib.py", line 438, in begin
        version, status, reason = self._read_status()
      File "/usr/lib/python2.7/httplib.py", line 402, in _read_status
        raise BadStatusLine(line)
    httplib.BadStatusLine: ''
    
  • 定位失败错误是啥?

    driver.find_element_by_android_uiautomator("new UiSelector().text('11')")
    

    不行吗

  • 在 postman 中使用 rsa 加密 at February 14, 2019

    直接复制 github 的 prescript 就行了,url 你填下百度,然后发送一个请求,就可以看到加解密成功了,我刚试了没问题

    //download forgeJS from web and set varible
    if(!pm.globals.has("forgeJS")){
            pm.sendRequest("https://raw.githubusercontent.com/loveiset/RSAForPostman/master/forge.js", function (err, res) {
            if (err) {
                console.log(err);}
            else {
                pm.globals.set("forgeJS", res.text());}
    })}
    
    eval(postman.getGlobalVariable("forgeJS"));
    
    const public_key = '-----BEGIN PUBLIC KEY-----\n'+
    'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDORoOSW2gbHl6s/YmS1jWxb954\n'+
    'X/jflZ2dK65oM/Bxii2Iba80IiC9+Sa1phmOVDAk+IVDsPNZ+YJ2Qg0hPmoLSLxe\n'+
    'f2A6ySJPl5su8TaGOuVZg1SRyk55bjHymQUnxryD/ml1EmBUaGcrs9FCiVBy38kg\n'+
    'eZNbCexucVQxn6OYlwIDAQAB\n'+
    '-----END PUBLIC KEY-----'
    
    const private_key = '-----BEGIN PRIVATE KEY-----\n' +
    'MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAM5Gg5JbaBseXqz9\n' +
    'iZLWNbFv3nhf+N+VnZ0rrmgz8HGKLYhtrzQiIL35JrWmGY5UMCT4hUOw81n5gnZC\n' +
    'DSE+agtIvF5/YDrJIk+Xmy7xNoY65VmDVJHKTnluMfKZBSfGvIP+aXUSYFRoZyuz\n' +
    '0UKJUHLfySB5k1sJ7G5xVDGfo5iXAgMBAAECgYEAk6KQZN4bQt2XsYS9RGUghOCm\n' +
    'f81g2NXCu00aROZ3vyvArxaiAVQzzwRWGkjJnb7PvoZJC0vIwKr+HxnjP9nmFufd\n' +
    '+0EnBT+imYSzrfZhfGGwyI6EIyy/XcoW5lf0xltx3w9mJicnR9kMzNtZ5mNGPMNn\n' +
    'CgAgjvZqnWYb+f6tb/ECQQD0tdpg8ts3puXclPe51my+LbKhEbyFSMzvtMTDCRmO\n' +
    'd0jrmZhQomsZacC8+l+2l6WTj5vrhVQlAVUeUJ7kldQNAkEA18q53wor6a4Cv0OL\n' +
    'xFzBWXRCMVFfyCWAFQUpTSGrIM/X4Lx30IZCShtvkdh1ky39b9T6lpOjES7MK4Dh\n' +
    'xttCMwJAUGBi6DEcm/zvxzIO5DVv5k9wOsNunoC4/4rqjf0xLcA0bV43z1RpxSEd\n' +
    'M3UxdvH8aqli10slxjnX0Ws9pWspCQJBALqSncgYzETbXaauqO5a4BUOrphjafPr\n' +
    'cGU8NCxrGsFg0p6NdO5G1pOqSvmHdIiPL9t8AjkkZs3Zb0+BvDOpqP8CQQDZhfh4\n' +
    '/c/Qzp4szj7+GXTZ1cmGwAuFo2/9uiumUAS3f19EpgoV9u9eyJ4gZPEBDvAjO961\n' +
    'kAjdja4DAy4SbCXy\n' +
    '-----END PRIVATE KEY-----'
    
    //encrypt text "plaintext"
    var publicKey = forge.pki.publicKeyFromPem(public_key);
    var encryptedText = forge.util.encode64(publicKey.encrypt("plaintext", 'RSA-OAEP', {
      md: forge.md.sha1.create(),
      mgf1: {
        md: forge.md.sha1.create()
      }
    }));
    console.log("encrypted text:" + encryptedText);
    
    // decrypt text
    var privateKey = forge.pki.privateKeyFromPem(private_key);
    var decryptedText = privateKey.decrypt(forge.util.decode64(encryptedText), 'RSA-OAEP', {
      md: forge.md.sha1.create(),
      mgf1: {
        md: forge.md.sha1.create()
      }
    });
    
    console.log("dectypted text:" + decryptedText);
    
  • 估计是网络问题导致下载不完整就调起了安装更新

  • 使用 django 的 model 插入的话,这个对象插入之后获取 object.id 就行了吧

  • 感觉一点介绍不足以让其他人采用呀,除了这些对比介绍,还要你的详细使用说明,迁移方案,甚至培训讲解

  • root 了用 tcpdump
    或者电脑开热点,然后 wireshark 抓包
    不过没有证书都是加密的数据了