appium操作chrome浏览器
1.安卓手机下载手机版chrome浏览器
2.Andriod setting中选择“chrome”
3.通过css定位得到百度输入框为:#index-kw
4.编写代码
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.TouchAction;
}
@After
public void tearDown() throws Exception {br/>driver.quit();
}
@Test
public void addContact() throws InterruptedException{
driver.get("http://m.baidu.com");
driver.findElementByCssSelector("#index-kw").sendKeys("suzhou");
}
}