コード例 #1
0
ファイル: CodeCenterPage.java プロジェクト: JustRain/AutoTest
 public static void createcategory1(WebDriver driver, CodeCenterInfo ccinfo)
     throws InterruptedException {
   // driver.findElement(By.xpath("//*[@id='main']/div[1]/div[3]/a[2]")).click();
   driver.findElement(By.linkText("分类访客找回")).click();
   driver.findElement(By.className("ico-add")).click();
   driver.findElement(By.id("name")).sendKeys(ccinfo.getCatename1());
   WebElement categoryvalue = driver.findElement(By.id("paraValue"));
   categoryvalue.clear();
   categoryvalue.sendKeys(ccinfo.getCatevalue1());
   driver.findElement(By.xpath("//*[@id='retarget_form']/div/div[3]/a[1]")).click();
   Thread.sleep(1000);
   PubHandle.usualelementcheck(
       driver,
       By.xpath("//*[@id='main']/div/div[4]/div[2]/table/tbody/tr[1]/td[1]"),
       2,
       ccinfo.getCatename1() + "创建失败",
       ccinfo.getCatename1());
 }