android / android/testing-samples
UiSelector.resourceId("myButtonId") not working
- Ngôn ngữ chính
- Java
- Star
- 9.3k
- Fork
- 3.6k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I'm trying to get the facebook Login button in UIautomator but its failing to find the button given the id of the button
```
```
And here is the code how I'm accessing the button in my test case
`UiObject facebookButton = mDevice.findObject(new UiSelector().resourceId("login_button_facebook"));`
Its failing to find the button saying :
```
android.support.test.uiautomator.UiObjectNotFoundException: UiSelector[RESOURCE_ID=login_button_facebook]
at android.support.test.uiautomator.UiObject.click(UiObject.java:416)
```
Please let me know if I'm doing it wrong.
The documentation has not much detail about how to use it.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với XML layout và test case gọi UiSelector.resourceId("login_button_facebook"), sau đó đọc các API UiSelector.resourceId và UiObject liên quan đến UiObjectNotFoundException được báo cáo. Xác nhận hành vi của selector đối với nút đăng nhập Facebook đã được render và kiểm tra rằng test có thể tìm thấy và nhấp vào nút đó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- android, java
- Lĩnh vực
- mobile, testing-qa
- Loại issue
- Lỗi
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100