Skip to content

Commit

Permalink
Try to fix ui test
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeltroger committed May 23, 2024
1 parent 8338b5d commit 245ae72
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class AndroidFileAppRobot {
private val listViewSelector = By.desc("List view")

fun openFileManagerApp() = apply {
uiDevice.executeShellCommand("am force-stop com.android.documentsui")
val intent: Intent = context.packageManager.getLaunchIntentForPackage("com.android.documentsui")!!
context.startActivity(intent)
}
Expand Down Expand Up @@ -67,6 +66,9 @@ class AndroidFileAppRobot {
}

private fun selectFile(fileName: String, longClick: Boolean = false) {
if (!uiDevice.hasObject(testDataDirSelector)) {
goToPdfFolder()
}
uiDevice.wait(Until.hasObject(pdfSelector), TIMEOUT)

val uiScrollable = UiScrollable(UiSelector().scrollable(true))
Expand Down

0 comments on commit 245ae72

Please sign in to comment.