Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

希望增加控制 unlock apk, webdriveragent 等 程序 是否需要每次安装, build的开关 #437

Closed
wangyunshuai opened this issue Jan 24, 2017 · 6 comments

Comments

@wangyunshuai
Copy link

  • Macaca Version:

  • Macaca Doctor Logs:

  • Operate System:

  • Programming Language:

某些手机,如锤子: 安装 android-unlock apk 时,手机上会弹框, 需要手动点击同意才能进行安装.
因此不能每次都安装这个 apk, 否则无法持续集成测试

@wangyunshuai wangyunshuai changed the title 希望增加控制 android-unlock 等 apk 是否安装的开关 希望增加控制 unlock apk, webdriveragent 等 apk 是否安装, build的开关 Jan 24, 2017
@wangyunshuai wangyunshuai changed the title 希望增加控制 unlock apk, webdriveragent 等 apk 是否安装, build的开关 希望增加控制 unlock apk, webdriveragent 等 程序 是否需要每次安装, build的开关 Jan 24, 2017
@xudafeng
Copy link
Member

看reuse用法

@wangyunshuai
Copy link
Author

@xudafeng
android 安装 两个 apk 的方法根本就没有使用 reuse 参数判断, reuse 的4个值, 我试过了, 并没有达到目的, 请了解

Android.prototype.unlock = function *() {
  if (!_.isExistedFile(UnlockApk.apkPath)) {
    logger.warn(`unlock apk not found in: ${UnlockApk.apkPath}`);
    return;
  }
  // yield this.adb.install(UnlockApk.apkPath);
  var isScreenLocked = yield this.adb.isScreenLocked();

  if (isScreenLocked) {
    yield this.adb.startApp(UnlockApk);
    yield _.sleep(5000);
    yield this.unlock();
  }
};

Android.prototype.setIME = function *() {
  // yield this.adb.install(UnicodeInput.apkPath);
  yield this.adb.setIME(`${UnicodeInput.package}/${UnicodeInput.activity}`);
};

Android.prototype.unsetIME = function *() {
  yield this.adb.unInstall(UnicodeInput.package);
};

@xudafeng
Copy link
Member

@wangyunshuai 明白你的意思了

@wangyunshuai
Copy link
Author

是要再搭一套java环境吗?我的项目是python的。
另外,确定是回答的我的问题吗?代码里没看明白哪里实现的。

@xudafeng
Copy link
Member

@pepsicoffee
Copy link

@xudafeng 是否支持安卓模拟器上的app的中文输入?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants