Bom dia pessoal !
Gostaria de tirar uma duvida que é o seguinte , estou criando um teste com o appium utilizando o app do Linkedin. porem estou encontrado dificultades por conta do appActivity;
No caso o app do linkedin não chega nem a abrir :
Segue public static void abrirLinkedin() throws MalformedURLException{
DesiredCapabilities configuracoes = new DesiredCapabilities();
configuracoes.setCapability("deviceName", "AOSP on IA Emulator");
configuracoes.setCapability("udid", "emulator-5554");
configuracoes.setCapability("platformName", "Android");
configuracoes.setCapability("platformVersion", "9");
configuracoes.setCapability("autoGrantPermissions", "true");
configuracoes.setCapability("appPackage", "com.linkedin.android");
configuracoes.setCapability("appActivity", "com.linkedin.android.infra.navigation.MainActivity");
URL url = new URL("http://127.0.0.1:4723/wd/hub");
driver = new AppiumDriver<MobileElement>(url,configuracoes);
System.out.println("Iniciando aplicacao.....");
}
Error by console :
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1635160188968 (08:09:48 GMT-0300 (Horário Padrão de Brasília))
[debug] [W3C] Encountered internal error running command: Error: Cannot start the 'com.linkedin.android' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Error executing adbExec. Original error: 'Command 'C:\Users\Thiago\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am start -W -n com.linkedin.android/com.linkedin.android.infra.navigation.MainActivity -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000' exited with code 255'; Stderr: 'Security exception: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.linkedin.android/.infra.navigation.MainActivity } from null (pid=26343, uid=2000) not exported from uid 10091 [debug] [W3C] [debug] [W3C] java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.linkedin.android/.infra.navigation.MainActivity } from null (pid=26343, uid=2000) not exported from uid 10091 [debug] [W3C] at com.android.server.am.ActivityStackSupervisor.checkStartAnyActivityPermission(ActivityStackSupervisor.java:1788) [debug] [W3C] at com.android.server.am.ActivityStarter.startActivity(ActivityStarter.java:717) [debug] [W3C] at com.android.server.am.ActivityStarter.startActivity(ActivityStarter.java:544) [debug] [W3C] at com.android.server.am.ActivityStarter.startActivityMayWait(ActivityStarter.java:1099) [debug] [W3C] at com.android.server.am.ActivityStarter.execute(ActivityStarter.java:486) [debug] [W3C] at com.android.server.am.ActivityManagerService.startActivityAndWait(ActivityManagerService.java:5234) [debug] [W3C] at com.android.server.am.ActivityManagerShellCommand.runStartActivity(ActivityManagerShellCommand.java:474) [debug] [W3C] at com.android.server.am.ActivityManagerShellCommand.onCommand(ActivityManagerShellCommand.java:161) [debug] [W3C] at android.os.ShellCommand.exec(ShellCommand.java:103) [debug] [W3C] at com.android.server.am.ActivityManagerService.onShellCommand(ActivityManagerService.java:16012) [debug] [W3C] at android.os.Binder.shellCommand(Binder.java:634) [debug] [W3C] at android.os.Binder.onTransact(Binder.java:532) [debug] [W3C] at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:3592) [debug] [W3C] at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3291) [debug] [W3C] at android.os.Binder.execTransact(Binder.java:731)'; Code: '255' [debug] [W3C] at ADB.startApp (C:\Users\Thiago\AppData\Roaming\npm\node_modules\appium\node_modules\appium-adb\lib\tools\apk-utils.js:179:11) [debug] [W3C] at AndroidUiautomator2Driver.ensureAppStarts (C:\Users\Thiago\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-driver\lib\driver.js:564:7) [debug] [W3C] at AndroidUiautomator2Driver.startUiAutomator2Session (C:\Users\Thiago\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-driver\lib\driver.js:431:7) [debug] [W3C] at AndroidUiautomator2Driver.createSession (C:\Users\Thiago\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-driver\lib\driver.js:229:7) [debug] [W3C] at AppiumDriver.createSession (C:\Users\Thiago\AppData\Roaming\npm\node_modules\appium\lib\appium.js:387:35) [HTTP] <-- POST /wd/hub/session 500 11642 ms - 5413 [HTTP]