-
-
Notifications
You must be signed in to change notification settings - Fork 236
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
How to start appium for context.startInstrumentation #498
Comments
Do you mean you'd like to start your test app with |
Yes, I want to in my test App to start Appium. Achieve the “adb shell is am instrument -w your.test.app/androidx.test.runner.AndroidJUnitRunner” effect 。I find a way is in my app use context.startInstrumentation() method, but I don't know it right or not,. if I want to mplement such functionality in my app, How should I do? thanks. |
Then,
These steps may achieve it |
I know you means, but my test app in mobile phone has not permission to exec shell commods. I should user Intent to start or startInstrumentation or others in my test app? |
I want implement the function is in my test app, to start the test AppiumUiAutomator2Server(In terminal is input adb shell is am instrument -w your.test.app/androidx.test.runner.AndroidJUnitRunner). |
You cant imagine if I install the two appium test apk.But in normal I must input adb shell is am instrument -w your.test.app/androidx.test.runner.AndroidJUnitRunner in terminal.But I want my test app auto start the appium.It means I didn't to input adb shell commond.Just launch my test app,and then across my test app to start appium(It is equivalent to we input adb shell commond in terminal)? |
It is impossible because of standard Android security restrictions. instrumentation process could only be executed by a shell or a root user. The shell user is only available externally via adb and the latter is only available in rooted devices. |
So if I want in my app to start AppiumUiAutomator2Server is no way? |
I see... then perhaps no |
Might you consider providing a way that the other app can start the server instead of input adb shell is am instrument -w io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner ? It's can more convenient for use appium test |
for adb shell is am instrument -w io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner
I wanto to start in my android application,how to start use startInstrumentation method, thanks
The text was updated successfully, but these errors were encountered: