Skip to content

Commit

Permalink
Add idle
Browse files Browse the repository at this point in the history
  • Loading branch information
jackkray committed Oct 25, 2024
1 parent 7132f73 commit df5ca26
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bank-sdk.check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
script: >
adb push .github/test_pdfs/password-protected.pdf /sdcard/Download ;
adb push .github/test_pdfs/sample.pdf /sdcard/Download ;
adb push .github/test_pdfs/test-image-no-results.jpg /sdcard/Download ;
# adb push .github/test_pdfs/test-image-no-results.jpg /sdcard/Download ;
adb push .github/test_pdfs/test-pdf-no-results.pdf /sdcard/Download ;
adb push .github/test_pdfs/test_image.jpeg /sdcard/Download ;
adb push .github/test_pdfs/Testrechnung-RA-1.pdf /sdcard/Download ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@ import androidx.test.uiautomator.UiSelector
class ImageUploader {
private val device = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
fun uploadImageFromPhotos() {
device.waitForIdle()
// Thread.sleep(2000)
Thread.sleep(2000)
// val photoList = UiScrollable(UiSelector().scrollable(true))
// val firstPhoto: UiObject = photoList.getChildByInstance(UiSelector().className("android.widget.ImageView"), 3)
// firstPhoto.click()

val photoList = UiScrollable(UiSelector().scrollable(true))
val firstPhoto: UiObject = photoList.getChildByInstance(UiSelector().className("android.widget.ImageView"), 3)
val firstPhoto: UiObject = photoList.getChild(UiSelector().className("android.widget.ImageView").instance(0))
firstPhoto.click()

// val buttons = device.findObjects(By.clazz("android.widget.ImageView"))
// buttons[3].click()

// device.waitForIdle()
}

fun clickAddButton() {
Expand Down

0 comments on commit df5ca26

Please sign in to comment.