android / android/testing-samples

UiSelector.resourceId("myButtonId") not working

オープン
#147 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
9.3k
フォーク
3.6k
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まずレイアウト XML と UiSelector.resourceId("login_button_facebook") を呼び出しているテストケースを確認し、報告された UiObjectNotFoundException に関連する UiSelector.resourceId および UiObject API を読みます。レンダリングされた Facebook Login ボタンに対するセレクターの動作を確認し、テストでそのボタンを見つけてクリックできることを検証します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
android, java
領域
mobile, testing-qa
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。