Skip to content

Commit 3fdb83d

Browse files
committed
fix UI issue with OneAuthTestApp
1 parent 18d7e12 commit 3fdb83d

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • uiautomationutilities/src/main/java/com/microsoft/identity/client/ui/automation/app

uiautomationutilities/src/main/java/com/microsoft/identity/client/ui/automation/app/OneAuthTestApp.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
import static com.microsoft.identity.client.ui.automation.utils.CommonUtils.FIND_UI_ELEMENT_TIMEOUT;
2626

27+
import android.os.Build;
2728
import android.text.TextUtils;
2829
import android.widget.Button;
2930
import 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.

0 commit comments

Comments
 (0)