我有一个安装APK,但使用USB兼容Mac文件浏览器我找不到它的路径 [英] I have an installed apk but i cannot find its path using usb with file explorer on mac
问题描述
我想在我的Android设备上已安装的应用程序运行Appium。
I want to run Appium on an already installed app on my Android device.
(这是一个第三方应用程序。像FB或Gmail)
(it's a 3rd party app. Like FB or Gmail)
我要定
File appDir = new File(classpathRoot, "../../../---");
File app = new File(appDir, "----.apk");
但我找不到在安装设备上的APK(带USB插入,仍然没有找到在文件浏览器中的APK)
But I cannot find where is the apk installed on my device (plugged in with USB and still don't find the apk in the file explorer)
怎么能轻易找到这个APK路径?
how can i easily find this apk path?
推荐答案
如果您需要自动化其中已安装在Android设备上的应用程序,你并不需要在所有指定的APK文件。你的能力应该是以下几点:
If you need to automate an app which is already installed on your Android device, you do not need to specify an APK file at all. You capabilities should be the following:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("browserName", "");
capabilities.setCapability("platformName","Android");
capabilities.setCapability("appActivity", "<your-android-activity>");
capabilities.setCapability("appPackage", "<your-android-package>");
driver = new AndroidDriver(new URL("http://<url-to-your-appium-server>:4723/wd/hub"), capabilities);
功能 appActivity
和 appPackage
在这种情况下,强制不指定功能当应用程序
!
Capabilities appActivity
and appPackage
are mandatory in this case when not specifying capability app
!
-
能力
appActivity
:你想从你的包推出的Android活动活动名称。此往往需要通过一个pceded $ P $。 (例如,.MainActivity
而不是MainActivity
)。
Capability
appActivity
: Activity name for the Android activity you want to launch from your package. This often needs to be preceded by a . (e.g.,.MainActivity
instead ofMainActivity
).
能力 appPackage
:您要运行,如 com.example.android.myApp Android应用程序的Java包
。
这篇关于我有一个安装APK,但使用USB兼容Mac文件浏览器我找不到它的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!