You cannot access banned topics.
@Test
public void addContact(){
WebElement el = driver.findElement(By.name("Add Contact"));
el.click();
List textFieldsList = driver.findElements(By.tagName("textfield"));
textFieldsList.get(0).sendKeys("wangyang");
textFieldsList.get(1).sendKeys("18872573204");
textFieldsList.get(2).sendKeys("stephenwang@gmail.com");
driver.findElement(By.name("Save")).click();
}
指定设备的 uuid 号,4.2 以下版本用 selendroid 模式。代码如下:
#4.1 启动变量
desired_caps = {}
desired_caps['platformName'] = 'Android'
desired_caps['version'] = '4.1'
desired_caps['deviceName'] = 'EC233DA70E2F'
desired_caps['automationName'] = 'selendroid'
desired_caps['app'] = r'D:\code\app\acfun_2.5.7.0.apk'
desired_caps['appPackage'] = 'tv.acfundanmaku.video'
desired_caps['appActivity'] = 'tv.acfundanmaku.video.entity.activity.SplashActivity'