Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可能会在必须使用 if..else 条件的地方流动。请向我提供如何使用的简要想法。
Button answer_a = (Button) solo.getView(R.id.answer_a); Button answer_b = (Button) solo.getView(R.id.answer_b); if (answer_a.getText().toString().equals("my_text_a")) { solo.clickOnView(answer_a); } else { solo.clickOnView(answer_b); }