File tree Expand file tree Collapse file tree
uiautomationutilities/src/main/java/com/microsoft/identity/client/ui/automation/app Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424
2525import static com .microsoft .identity .client .ui .automation .utils .CommonUtils .FIND_UI_ELEMENT_TIMEOUT ;
2626
27+ import android .os .Build ;
2728import android .text .TextUtils ;
2829import android .widget .Button ;
2930import android .widget .EditText ;
@@ -82,6 +83,11 @@ protected void initialiseAppImpl() {
8283
8384 @ Override
8485 public void handleFirstRun () {
86+ if (Build .VERSION .SDK_INT > Build .VERSION_CODES .P ) {
87+ // On later apis there is an extra permission prompt, we handle the button by text
88+ UiAutomatorUtils .handleButtonClickForObjectWithText ("Allow access to manage all files" );
89+ UiAutomatorUtils .pressBack ();
90+ }
8591 CommonUtils .grantPackagePermission ();
8692 // Because switching the App Configuration will decide whether to truly enable the Broker,
8793 // it's essential to turn on the Broker beforehand.
You can’t perform that action at this time.
0 commit comments