我正在尝试根据我的功能编写espresso函数以匹配第一个espresso找到的元素,即使找到了多个匹配的项目.
例如:我有一个包含商品价格的单元格的列表视图.我希望能够将货币兑换成加元并验证商品价格是否为加元.
我正在使用这个功能:
onView(anyOf(withId(R.id.product_price), withText(endsWith("CAD"))))
.check(matches(
isDisplayed()));
Run Code Online (Sandbox Code Playgroud)
这会抛出AmbiguousViewMatcherException.
在这种情况下,我不关心有多少或几个单元格显示CAD,我只想验证它是否显示.有没有办法让espresso在遇到符合参数的物体时立即通过此测试?
使用最新的股票rom .img for google(occam)处理Nexus 4的根脚本,我有以下代码片段:
./adb wait-for-device
echo "remounting system"
./adb shell "mount -o remount,rw /system"
./adb push su /system/bin/
echo "pushing super user"
./adb push Superuser.apk /system/app/
echo "pushing busybox"
./adb push busybox /system/xbin/
./adb shell "chmod 06755 /system/bin/su"
./adb shell "chmod 0644 /system/app/Superuser.apk"
./adb shell "chmod 04755 /system/xbin/busybox"
./adb shell "cd /system/xbin"
./adb shell "busybox --install /system/xbin/"
Run Code Online (Sandbox Code Playgroud)
我一直在收到错误
mount: Operation not permitted
failed to copy 'su' to '/system/bin//su': Read-only file system
pushing super user
failed to copy 'Superuser.apk' …Run Code Online (Sandbox Code Playgroud)