请尝试以下代码段。如果你能够使用Android键盘点击,那么下面的代码应该工作。
((AndroidDriver)driver).pressKey(new KeyEvent(AndroidKey.SEARCH));
我用TouchAction实现了这一点。
TouchAction touchAction =新的TouchAction(驱动程序); touchAction.tap(new PointOption()。withCoordinates(111,222))。perform()