检查@BeforeClass里面是否配置了 driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), cap); 转载于:https://www.cnblogs.com/silna/p/9360737.html