测试之家
  • 社区
  • 问答
  • 招聘
  • 社区学堂新
  • 开源项目
  • 活动
  • Wiki
  • 注册
  • 登录
版主
Lihuazhang (恒温)
第 110 位会员 / 2013-10-21
阿里巴巴 @ 上海
405 篇帖子 • 7845 条回帖
2532 关注者
33 正在关注
33 收藏
人生很多事情你也已经经历了。从我们35岁开始,到60岁、70岁,也就是经历一些生老病死的日常事情。加油!
打赏支持
GitHub Public Repos
  • ai-agents-with-llama3 12

  • lihuazhang.github.com 9

    my blog

  • juit5-json-params 7

    juit5-json-params

  • MediaCrawler 1

    小红书笔记 | 评论爬虫、抖音视频 | 评论爬虫、快手视频 | 评论爬虫、B 站视频 | 评论爬虫、微博帖子 | 评论爬虫

  • javascript-algorithms 1

    Algorithms and data structures implemented in JavaScript with explanations and links to further r...

  • ahchoo 1

    test for cloudfoundry

  • AutoClick 1

    基于Robotium的自动遍历方案

  • UI-Testing-Cheat-Sheet 1

    How do I test this with UI Testing?

  • revolt-fx 0

  • letsmove 0

More on GitHub
  • 個人信息
  • 個人專欄
  • 帖子
  • 回帖
  • 收藏
  • 正在關注
  • 關注者
  • [更新 topic 下载地址] 深圳第二期沙龙活动圆满结束~ at 2016年06月26日

    #3 楼 @defias 关注 Testerhome。

  • 测试帖子 at 2016年06月26日

    https://testerhome.com/topics/5231

  • Appium 自动化—基于 java 的 iOS 环境搭建 at 2016年06月26日

    #11 楼 @momoyue 你不测 android 的话 那就不用设置。

  • 辞职 or 继续学习 at 2016年06月26日

    https://testerhome.com/topics/5270

  • 测试帖子 at 2016年06月26日

    https://testerhome.com/topics/5270

  • 辞职 or 继续学习 at 2016年06月25日

    换家公司还这样呢?再换?

  • 对 Jenkins+ANT+Jmeter 接口测试的实践 at 2016年06月25日

    有些代码的图 可以贴代码吗?

  • 上线用户活跃状态图,类似 GitHub,更新添加 topic 数量,1topic=2*reply at 2016年06月25日

    https://testerhome.com/topics/5264 如果在这里提到 5264 这个帖子,那么那个帖子里会有反应。

  • eclipse 快捷键以及使用技巧大全 at 2016年06月24日

    好好排版啊

  • Appium inspector 获取 ios 元素属性的问题 at 2016年06月24日

    #2 楼 @jira webview 里面 就是 html 了啊。 用传统的 Webdriver 就可以了。

  • Macaca 运行官方例子不成功,望指导 at 2016年06月23日

    #3 楼 @dippa 不行, 你可以去 macaca 的 gitter 问。 社区有社区的规定,现在没有问答区,等以后问答区出来,这样的提问可以。

  • Macaca 运行官方例子不成功,望指导 at 2016年06月23日

    这种 请直接找他私聊。

  • AppCrawler 自动遍历工具 1.2.1 版本 at 2016年06月23日

    https://security.tencent.com/index.php/blog/msg/105?from=timeline&isappinstalled=1 腾讯也采用了。 及早开源,造福人类啊

  • ubuntu 安装 appium 遇到的问题 at 2016年06月22日

    #8 楼 @huang053117 环境变量不对吧

  • CrossWalk Hybrid 混合应用 webview 无法获取到 (Android) at 2016年06月22日

    #10 楼 @wang04170 https://github.com/piotrekkmt/chromedriver-appium

  • CrossWalk Hybrid 混合应用 webview 无法获取到 (Android) at 2016年06月21日

    #5 楼 @chenhengjie123 让楼主在 check 一遍吧

  • CrossWalk Hybrid 混合应用 webview 无法获取到 (Android) at 2016年06月21日

    1.5.3 亲测!

    前提

    你已经安装好了 appium,无论是 GUI 还是 npm 的。

    打补丁

    从这里下载 https://github.com/appium/appium/files/320185/webview_helpers_cordova_suppport.patch.zip,解压。
    然后进入到 appium/node_modules/appium-android-driver/ 这个目录下,进行补丁:

    patch -p1 lib/webview-helpers.js /path/to/patch/file/webview_helpers_cordova_suppport.patch
    

    打好补丁后,重新把 appium-android-driver build 一下:

    npm install
    

    下载打过补丁的 chromedriver

    从 https://github.com/piotrekkmt/chromedriver-appium/blob/master/chromedriver 下载打过补丁的 chromedriver。
    将这个目录下 appium/node_modules/appium-android-driver/node_modules/appium-chromedriver/chromedriver/mac/下的 chromedriver 替换成打过补丁的。

    启动 Appium 即可

    客户端的关键代码如下:

    
    import os
    import unittest
    from appium import webdriver
    from time import sleep
    
    pkg_name = 'com.xxx.bbb'
    desird_caps={}
    desird_caps['platformName'] = 'Android'
    desird_caps['deviceName'] = 'Samsung'
    desird_caps['udid'] = '2bcf97ef'
    desird_caps['appPackage'] = pkg_name
    desird_caps['appActivity'] = ‘com.xxx.bbb.activity.SplashActivity'
    desird_caps['platformVersion'] = '5.1.1'
    
    
    ANDROID_DEVICE_SOCKET = pkg_name + "_devtools_remote"
    desird_caps['androidDeviceSocket'] = ANDROID_DEVICE_SOCKET
    chromeOptions = {}
    chromeOptions['androidDeviceSocket'] = ANDROID_DEVICE_SOCKET
    desird_caps['chromeOptions'] = chromeOptions;
    
    driver = webdriver.Remote('http://localhost:4723/wd/hub',desird_caps)
    
    

    运行过程中会返回一个没有名字的 webview:

    [debug] [ADB] Getting connected devices...
    [debug] [ADB] 1 device(s) connected
    [debug] [ADB] Running /Applications/android-sdk/platform-tools/adb with args: ["-P",5037,"-s","2bcf97ef","shell","cat","/proc/net/unix"]
    [debug] [AndroidDriver] Available contexts: ["NATIVE_APP","WEBVIEW_"]
    [MJSONWP] Responding to client with driver.getContexts() result: ["NATIVE_APP","WEBVIEW_"]
    [HTTP] <-- GET /wd/hub/session/077ca253-cd31-41da-8ce1-7c2bf0cbb107/contexts 200 80 ms - 97
    [BaseDriver] Shutting down because we waited 60 seconds for a command
    
    
  • CrossWalk Hybrid 混合应用 webview 无法获取到 (Android) at 2016年06月21日

    居然已经有解决方案了。

  • 苹果手机后台关闭微博会影响其他音频软件算是 bug 吗? at 2016年06月20日

    #4 楼 @orange_chen 你报个问题,系统版本,手机型号,无线类型都不说,让大家猜测。

  • iOS 真机运行 Appium 长期答疑! at 2016年06月20日

    #104 楼 @pacerron 元素是可见的,或者你可以理解为该元素有 accessible 的属性。

  • iOS 真机运行 Appium 长期答疑! at 2016年06月20日

    #102 楼 @pacerron 你都知道原因了。。。那我有啥办法。。

  • 苹果手机后台关闭微博会影响其他音频软件算是 bug 吗? at 2016年06月20日

    我不会啊

  • fir.im Weekly - 从 iOS 10 SDK 新特性说起 at 2016年06月20日

    干货满满

  • Appium 运行出错:Permission to start Activity denied. at 2016年06月20日

    学会发问前搜索,https://testerhome.com/topics/1943

    解决方法是在 AndroidManifest.xml 文件中将 Activity 设置成允许调用:Android:exported=” true”

  • Appium 运行出错:Permission to start Activity denied. at 2016年06月20日

    新手,请自觉发帖到新手区

  • 上一页
  • 1
  • 2
  • 3
  • …
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • …
  • 270
  • 271
  • 272
  • 下一页
  • 关于 / 活跃用户 / 中国移动互联网测试技术大会 / 反馈 / Github / API / 帮助推广
    TesterHome社区,测试之家,由众多测试工程师组织和维护的技术社区,致力于帮助新人成长,提高测试地位,推进质量发展。Inspired by RubyChina
    友情链接 WeTest腾讯质量开放平台 / InfoQ / 掘金 / SegmentFault / 测试窝 / 百度测试吧 / IT大咖说
    简体中文 / 正體中文 / English

    ©testerhome.com 测试之家   渝ICP备2022001292号
      渝公网安备 50022202000435号    版权所有 © 重庆年云聚力信息技术有限公司