1、文件:/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-android-driver/lib/driver.js,注释以下几句代码

await this.adb.uninstallApk(this.opts.appPackage);

  await helpers.installApkRemotely(this.adb, this.opts);

  await helpers.resetApp(this.adb, this.opts.app, this.opts.appPackage, this.opts.fastReset);
  await this.checkPackagePresent();
 
2、文件:/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-android-driver/build/lib/driver.js,注释以下几句代码:
    return _regeneratorRuntime.awrap(_androidHelpers2['default'].resetApp(this.adb, this.opts.app, this.opts.appPackage, this.opts.fastReset));
    return _regeneratorRuntime.awrap(this.adb.uninstallApk(this.opts.app));
    return _regeneratorRuntime.awrap(_androidHelpers2['default'].installApkRemotely(this.adb, this.opts));
    return _regeneratorRuntime.awrap(this.checkPackagePresent());
 
3、文件:/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-android-driver/lib/android-helpers.js 注释以下几句代码
    await adb.install(unicodeIMEPath, false);

  await helpers.pushSettingsApp(adb);
  await helpers.pushUnlock(adb);
 
4、文件/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-android-driver/build/lib/android-helpers.js  替换以下几句代码
    return _regeneratorRuntime.awrap(helpers.initUnicodeKeyboard(adb))  替换为return context$1$0.abrupt('return', defaultIME);
    return _regeneratorRuntime.awrap(helpers.pushSettingsApp(adb));  替换为return context$1$0.abrupt('return', defaultIME);
    return _regeneratorRuntime.awrap(helpers.pushUnlock(adb));  替换为return context$1$0.abrupt('return', defaultIME);
 
 
 
 
 

Appium禁止appium setting和unlock在设备上重复安装的更多相关文章

  1. 如何禁止 Mac OS X 在外接设备上生成 .DS_Store 文件?以及如何批量删除 .DS_Store 文件?

    如何禁止 Mac OS X 在外接设备上生成 .DS_Store 文件?以及如何批量删除 .DS_Store 文件?原文链接:http://www.java2class.net/bbs/viewthr ...

  2. 【Abode Air程序开发】在设备上进行安装

    在设备上进行安装 在 Google Android 设备上安装应用程序 在 Apple iOS 设备上安装应用程序 在 Google Android 设备上安装应用程序 在项目的开发.测试和部署阶段, ...

  3. 不通过App Store,在iOS设备上直接安装应用程序(转)

    今天在iOS设备上安装天翼云存储app,在safari上直接打开http://cloud.189.cn/wap/index.jsp,点击“点击免费安装”,如下图: 神奇的事情发生了,设备上直接下载ap ...

  4. 不通过AppStore,在iOS设备上直接安装应用程序的原理

    本文转载至  http://mobile.51cto.com/hot-439095.htm 通过itms-services协议,可以通过safari浏览器直接在iOS设备上安装应用程序.利用这种方式, ...

  5. Android 在同一台设备上安装多个同一项目的apk

    如果设备上已经安装了一个apk,再次安装这个apk就会提示覆盖前面的应用 解决办法: 方法一:手动改包名 不好改,改了几次都不成功(可能是代码在svn管理的原因,改完后文件夹里的代码就没了),确实不实 ...

  6. appium--解决每次安装appium setting和Unlock

    前戏 每次启动appium进行自动化的时候,都会提示我们需要安装appium setting和Unlock,而且还都要手动确认 那这两个文件是做什么的呢? Appium settings:用于设置网络 ...

  7. Appium(客户端版)解决每次运行Android,都安装Appium Setting和Unlock的方法

    遇到的问题:使用的Appium界面的server进行启动,每次启动时都会安装Appium Setting和Unlock文件. 通过log可以看到安装路径如下:   Appium Setting安装包路 ...

  8. Appium——解决每次启动时都安装setting和unlock app方法

    找到appium安装目录 C:\Program Files (x86)\Appium\node_modules\appium\lib\devices\android 修改代码,注释掉弹出setting ...

  9. 【Appium】每次启动是提示安装setting和unlock app的解决办法

    进入appium安装目录,C:\Program Files (x86)\Appium\node_modules\appium\lib\devices\android,编辑android.js文件,注释 ...

随机推荐

  1. Codeforces Round #304 (Div. 2) C. Soldier and Cards —— 模拟题,队列

    题目链接:http://codeforces.com/problemset/problem/546/C 题解: 用两个队列模拟过程就可以了. 特殊的地方是:1.如果等大,那么两张牌都丢弃 : 2.如果 ...

  2. U盘安装Ubuntu 14.04 LTS正式版

    Ubuntu 14.04 LTS正式版发布,而且提供五年的支持和维护服务.Ubuntu 14.04是Ubuntu开发团队历经五年的心血之作.许多新手都喜欢把Linux安装文件刻录成光盘再安装,而安装好 ...

  3. 【概念】SVG(2)

    Style <svg width="200" height="200" xmlns="http://www.w3.org/2000/svg&qu ...

  4. 基于区域的全卷积神经网络(R-FCN)简介

    在 Faster R-CNN 中,检测器使用了多个全连接层进行预测.如果有 2000 个 ROI,那么成本非常高. feature_maps = process(image)ROIs = region ...

  5. mysql函数之七:replace() MySQL批量替换指定字段字符串

    mysql replace实例说明: UPDATE tb1 SET f1=REPLACE(f1, 'abc', 'def'); REPLACE(str,from_str,to_str) 在字符串 st ...

  6. centos7升级最新内核

    由于最近在测试ceph 的straw2算法,但是要使用straw2需要最新为4.1.0的内核,因此决定将虚机内核升级最新4.11.4. 步骤1.检查本机内核版本 #uname -sr 3.10.0-5 ...

  7. sublimelinter-php 错误代码提示

    先安装 SublimeLinter 如同其他插件一样使用 Package Control 来安装. 按下 Ctrl+Shift+p 进入 Command Palette 输入install进入 Pac ...

  8. Linux安装ntp同步时间

    1.安装 yum install  ntp 安装下就可以了. 2.寻找一个网络时间服务器,比如一些国家授时中心 微软公司授时主机(美国) time.windows.com 台警大授时中心(台湾) as ...

  9. error:未定义的引用

    用qtcreator编程的话,先在.pro文件中这样写: INCLUDEPATH += \ /usr/local/include/ LIBS += \ -L"/usr/local/lib&q ...

  10. hue集成各种组件

    一.Hue安装 可以编译安装,我这里有已经编译好的,直接解压使用: hue默认端口:8888 http://gethue.com/ https://github.com/cloudera/hue ht ...