Android の uiautomator を使用すると、テキスト フィールドにテキストを設定できますが、キーボードを閉じることができません。一部の電話機では、横向きモードのときにキーボードが画面全体を占有し、そのビューから出るには [完了] をタップする必要があります。キーボードを抑制することができれば、横向きと縦向きの両方で uiautomator を問題なく実行できます。
new UiObject(new UiSelector().text("Enter Text")).click();
new UiObject(new UiSelector().className("android.widget.EditText").instance(0)).setText("sample text");
// This is where I need to suppress the keyboard to view the app instead of just the keyboard itself.
new UiObject(new UiSelector().text("Submit")).click();
前もって感謝します。