Java+selenium+feeder+AutoIt+自动加载插件
package dataproject.datapro;
import static org.testng.Assert.assertEqualsNoOrder;
import java.io.File;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import org.databene.benerator.anno.Source;
import org.databene.feed4testng.FeedTest;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;
import org.openqa.selenium.interactions.Actions;
import org.testng.annotations.Test;
public class test extends FeedTest {
WebDriver driver=null;
@Test(description="这是添加会员功能",dataProvider="feeder")
@Source("data/Login.csv")//指定数据来源
public void loinTest(String name,String password,String Yword)
{
//设置浏览器的属性
System.setProperty("webdriver.firefox.bin", "C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe");
//定义个firefox地址
//String strpath="C:\\Users\\test\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\q3lo2ug8.default";
String strpath="C:\\Users\\rewq\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\q3lo2ug8.default";
FirefoxProfile profile=new FirefoxProfile(new File(strpath));
driver=new FirefoxDriver(profile);
//最大化窗体
driver.manage().window().maximize();
//正式
//driver.get("url");
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
//对元素进行定位f
//密码
driver.findElement(By.xpath("//input[@id='password1']")).sendKeys(password);
//验证码
driver.findElement(By.xpath("//input[@id='jcaptchaCode']")).sendKeys(Yword);
//用户名
driver.findElement(By.xpath("//input[@id='username1']")).sendKeys(name);
//等待一段时间
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
//点击登录
driver.findElement(By.id("submitForm")).click();
}
@Test(dependsOnMethods={"loinTest"},dataProvider="feeder")
@Source("data/Apply.xls")//指定数据来源
public void Apply(String name,String zjType,String certificateNumber,String phoneNumber,String email,String address,String verificationTime,String certificateExecute,String certificateType,String isOpen)
{
//等待一段时间响应
driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
//[start] 登记申请单
//鼠标放在
Actions action=new Actions(driver);
action.moveToElement(driver.findElement(By.linkText("登记申请"))).perform();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
action.clickAndHold(driver.findElement(By.linkText("填写申请单")));
action.release(driver.findElement(By.linkText("填写申请单"))).perform();
//[end]
//等待一段时间
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
//是ifram标签,先跳出默认的ifream
driver.switchTo().frame(driver.findElement(By.id("win")));
//点击认证
driver.findElement(By.xpath("//div[@id='tab1']/h4/ul/li/div/div/a/img")).click();
driver.manage().timeouts().implicitlyWait(30,TimeUnit.SECONDS);
driver.findElement(By.id("personApplicant.name")).clear();
//填写申请单上的信息
driver.findElement(By.id("personApplicant.name")).sendKeys(name);
//定位select元素
//职业-专业技术人员
WebElement profession=driver.findElement(By.xpath("//select[@id='personApplicant.professionId']"));
org.openqa.selenium.support.ui.Select select=new org.openqa.selenium.support.ui.Select(profession) ;
select.selectByIndex(1);
//证件类型-身份证
WebElement certificate=driver.findElement(By.xpath("//select[@id='papersTypeId']"));
org.openqa.selenium.support.ui.Select select1=new org.openqa.selenium.support.ui.Select(certificate) ;
if(zjType.equals("身份证"))
{
select1.selectByIndex(1);
}else if(zjType.equals("护照")){
select1.selectByIndex(1);
}else if(zjType.equals("军官证")){
select1.selectByIndex(2);
}
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
//证件编号
driver.findElement(By.xpath("//input[@id='papersNumber']")).sendKeys(certificateNumber);
driver.findElement(By.xpath("//input[@id='personApplicant.telphone']")).clear();
driver.findElement(By.xpath("//input[@id='personApplicant.telphone']")).sendKeys(phoneNumber);
driver.findElement(By.xpath("//input[@id='emailApplyInfoPerson']")).clear();
driver.findElement(By.xpath("//input[@id='emailApplyInfoPerson']")).sendKeys(email);
driver.findElement(By.xpath("//input[@id='personApplicant.address']")).clear();
driver.findElement(By.xpath("//input[@id='personApplicant.address']")).sendKeys(address);
//证书的发送方式-自取
WebElement postmethod=driver.findElement(By.xpath("//select[@id='sendMethodId']"));
org.openqa.selenium.support.ui.Select me=new org.openqa.selenium.support.ui.Select(postmethod);
me.selectByIndex(2);
//证书要求-中文
WebElement CertificationR=driver.findElement(By.xpath("//select[@id='reportRequestId']"));
org.openqa.selenium.support.ui.Select request=new org.openqa.selenium.support.ui.Select(CertificationR) ;
request.selectByIndex(1);
//鉴证时限-正常
WebElement Verification =driver.findElement(By.xpath("//select[@id='timeLimitId']"));
org.openqa.selenium.support.ui.Select time=new org.openqa.selenium.support.ui.Select(Verification) ;
if(verificationTime.equals("正常")){
time.selectByIndex(1);
}else if(verificationTime.equals("加急")){
time.selectByIndex(2);
}
else if(verificationTime.equals("特急")){
time.selectByIndex(3);
}
//艺术品类别-书画类
WebElement ArtCa=driver.findElement(By.xpath("//select[@id='appProductions0.productionTypeId']"));
org.openqa.selenium.support.ui.Select category=new org.openqa.selenium.support.ui.Select(ArtCa) ;
category.selectByIndex(1);
//认证执行标准-M
WebElement execute=driver.findElement(By.xpath("//select[@id='identifyMethodId']"));
org.openqa.selenium.support.ui.Select M=new org.openqa.selenium.support.ui.Select(execute) ;
if(certificateExecute.equals("T/CSIQ 1011-2015")){
M.selectByIndex(1);
}else if(certificateExecute.equals("T/CSIQ 1011-2015-M")){
M.selectByIndex(2);
}
//证书类型-A类证书
WebElement type=driver.findElement(By.xpath("//select[@id='certificateLevelId']"));
org.openqa.selenium.support.ui.Select Ctype=new org.openqa.selenium.support.ui.Select(type) ;
if(certificateType.equals("A类证书")){
Ctype.selectByIndex(1);
}
else if(certificateType.equals("B类证书")){
Ctype.selectByIndex(2);
}
else if(certificateType.equals("备案证书")){
Ctype.selectByIndex(3);
}
//是否公开-是
WebElement Open=driver.findElement(By.xpath("//select[@id='openTagId']"));
org.openqa.selenium.support.ui.Select IsOpen=new org.openqa.selenium.support.ui.Select(Open) ;
if(isOpen.equals("是")){
IsOpen.selectByIndex(1);
}
else if(isOpen.equals("否")){
IsOpen.selectByIndex(2);
}
}
@Test(dependsOnMethods={"Apply"},description="这是艺术品信息",dataProvider="feeder")
@Source("data/Art.xls")
public void ArtInfo(String artName ,String author,String createAge,String createTime,String qualityStatus,
String caiz,String inscriptions,String artSizeC,String framedWay){
//艺术品的基本信息
driver.findElement(By.xpath("//input[@id='appProductions0.production.name']")).sendKeys(artName);
driver.findElement(By.xpath("//input[@id='appProductions0.production.author']")).sendKeys(author);
//标注创作年代
WebElement Year=driver.findElement(By.xpath("//select[@id='appProductions0.production.createTimeId']"));
org.openqa.selenium.support.ui.Select BYear=new org.openqa.selenium.support.ui.Select(Year) ;
if(createAge.equals("当代(1949年以后)")){
BYear.selectByIndex(1);
}else if(createAge.equals("近代(1840-1949年之间)")){
BYear.selectByIndex(2);
}else if(createAge.equals("古代(1840年以前)")){
BYear.selectByIndex(3);
}else {
BYear.selectByIndex(4);
}
//标注创作时间
driver.findElement(By.xpath("//input[@id='appProductions0.production.calloutTime']")).sendKeys(createTime);
//品相状态
WebElement Quality =driver.findElement(By.xpath("//select[@id='appProductions0.production.stateId']"));
org.openqa.selenium.support.ui.Select QualityS=new org.openqa.selenium.support.ui.Select(Quality) ;
if(qualityStatus.equals("完整")){
QualityS.selectByIndex(1);
}else if(qualityStatus.equals("破损")){
QualityS.selectByIndex(2);
}else if(qualityStatus.equals("其他")){
QualityS.selectByIndex(3);
}
//材质//select[@id='appProductions0.production.textureId']
WebElement CZ=driver.findElement(By.xpath("//select[@id='appProductions0.production.textureId']"));
org.openqa.selenium.support.ui.Select CZ1=new org.openqa.selenium.support.ui.Select(CZ) ;
if(caiz.equals("宣纸")){
CZ1.selectByIndex(1);
}
else if(caiz.equals("绢")){
CZ1.selectByIndex(2);
}
else if(caiz.equals("其他")){
CZ1.selectByIndex(3);
}
//款识
driver.findElement(By.xpath("//input[@id='appProductions0.production.logo']")).sendKeys(inscriptions);
//艺术品尺寸
driver.findElement(By.xpath("//input[@id='appProductions0.production.size']")).sendKeys(artSizeC);
//装裱方式-长卷
WebElement Framed =driver.findElement(By.xpath("//select[@id='appProductions0.production.mountId']"));
org.openqa.selenium.support.ui.Select FramedS =new org.openqa.selenium.support.ui.Select(Framed ) ;
if(framedWay.equals("长卷")){
FramedS.selectByIndex(1);
}else if(framedWay.equals("中堂")){
FramedS.selectByIndex(2);
}else if(framedWay.equals("条幅")){
FramedS.selectByIndex(3);
}else if(framedWay.equals("对联")){
FramedS.selectByIndex(4);
}else if(framedWay.equals("横幅")){
FramedS.selectByIndex(5);
}else if(framedWay.equals("横披")){
FramedS.selectByIndex(6);
}else if(framedWay.equals("册页")){
FramedS.selectByIndex(7);
}else if(framedWay.equals("斗方")){
FramedS.selectByIndex(8);
}else if(framedWay.equals("镜片")){
FramedS.selectByIndex(9);
}else if(framedWay.equals("折扇")){
FramedS.selectByIndex(10);
}else if(framedWay.equals("团面")){
FramedS.selectByIndex(11);
}else if(framedWay.equals("扇面")){
FramedS.selectByIndex(12);
}else if(framedWay.equals("画心")){
FramedS.selectByIndex(13);
}else if(framedWay.equals("其他")){
FramedS.selectByIndex(14);
}else if(framedWay.equals("立轴")){
FramedS.selectByIndex(15);
}
//点击图片上传,用autoIT,艺术品全图
driver.findElement(By.id("SWFUpload_0")).click();
//java的Runtime模块的getruntime.exe()方法可以调用exe程序并执行
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
Runtime exe=Runtime.getRuntime();
try{
String str="E://0830.exe";
exe.exec(str);
}catch(IOException e){
System.out.println("Error to run the 0830");
e.printStackTrace();
}
}
@Test(dependsOnMethods={"ArtInfo"},description="这是艺术品落款")
public void ArtInfo1() throws InterruptedException
{
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
WebElement Isdelete=null;
boolean a=true;
while(a)
{
Isdelete=driver.findElement(By.xpath("//div[@id='imgDiv0']/a"));
boolean b=Isdelete.isDisplayed();
if(!b)
{
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
}else{
driver.findElement(By.id("SWFUpload_1")).click();
Runtime exe1 =Runtime.getRuntime();
try{
String str="E://0831.exe";
exe1.exec(str);
}catch(IOException e){
System.out.println("Error to run the 0831");
e.printStackTrace();
}
a=false;
}
}
}
@Test(dependsOnMethods={"ArtInfo1"},description="上传艺术品名人章")
public void ArtInfo2() throws InterruptedException{
WebElement Isdelete=null;
boolean a=true;
while(a)
{
Isdelete=driver.findElement(By.xpath("//div[@id='imgDiv1']/a"));
boolean b=Isdelete.isDisplayed();
if(!b)
{
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
}else{
driver.findElement(By.id("SWFUpload_2")).click();
Runtime exe1 =Runtime.getRuntime();
try{
String str="E://0832.exe";
exe1.exec(str);
}catch(IOException e){
System.out.println("Error to run the 0832");
e.printStackTrace();
}
a=false;
}
}
}
@Test(dependsOnMethods={"ArtInfo2"},description="这是弹出窗口")
public void ArtInfo3() throws InterruptedException{
WebElement Isdelete=null;
boolean a=true;
while(a)
{
Isdelete=driver.findElement(By.xpath("//div[@id='imgDiv2']/a"));
boolean b=Isdelete.isDisplayed();
if(!b)
{
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
}else{
driver.findElement(By.linkText("提交申请单")).click();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
//这就没有找到元素
driver.switchTo().defaultContent();
driver.switchTo().frame(driver.findElement(By.id("win")));
driver.findElement(By.linkText("确定")).click();
//driver.switchTo().alert().accept();
a=false;
}
}
}
@Test(dependsOnMethods={"ArtInfo3"},description="这是待申请复审")
public void ApplyAuto() throws InterruptedException
{
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.switchTo().defaultContent();
Actions action =new Actions(driver);
action.moveToElement(driver.findElement(By.linkText("申请复核"))).perform();
driver.manage().timeouts().implicitlyWait(40, TimeUnit.SECONDS);
action.clickAndHold(driver.findElement(By.linkText("待申请复核列表")));
action.release(driver.findElement(By.linkText("待申请复核列表"))).perform();
}
@Test(dependsOnMethods={"ApplyAuto"},description="这是申请复审办理操作")
public void ApplyAuto1()
{
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.switchTo().defaultContent();
driver.switchTo().frame(driver.findElement(By.id("win")));
//driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
//driver.findElement(By.linkText("尾页")).click();
//java.util.List<WebElement>elements= driver.findElements(By.xpath("//table[@id='table']/tbody/tr"));
//int size=elements.size();
//driver.findElement(By.xpath("//tr["+size+"]/td[10]/a")).click();
// driver.findElement(By.xpath("//tr[0]/td[10]/a")).click();
driver.findElement(By.xpath("//table[@id='table']/tbody/tr/td[11]/a")).click();
//[start] 带解释
//driver.findElement(By.xpath("(//div[@class='pagination']/ul/li)[last()]/a[title='尾页']")).click();
//java.util.List<WebElement> elements=driver.findElements(By.xpath("//div[@class='pagination']/ul/li"));
//int size=elements.size();
// driver.findElement(By.xpath("(//div[@class='pagination']/ul/li)[last()]/a[title='尾页']")).click();
//String Classname= driver.findElement(By.xpath("(//div[@class='pagination']/ul/li)[last()]/a[title='尾页']")).getAttribute("class");
//if(!Classname.equals("disabled"))
//{
//driver.findElement(By.cssSelector("a[title='尾页']")).click();
//}
//[end]
driver.switchTo().defaultContent();
driver.switchTo().frame(driver.findElement(By.id("win")));
driver.findElement(By.xpath("//a[contains(text(),'申请复核意见')]")).click();
driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
driver.findElement(By.id("shouldCost")).sendKeys("100");
driver.findElement(By.id("payCost")).sendKeys("10");
driver.findElement(By.id("content")).sendKeys("备注");
driver.findElement(By.id("attestation")).sendKeys("复核意见");
driver.findElement(By.linkText("申请复核通过")).click();
}
@Test(dependsOnMethods={"ApplyAuto1"},description="这是待认证")
public void Attest() throws InterruptedException
{
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.switchTo().defaultContent();
Actions action =new Actions(driver);
action.moveToElement(driver.findElement(By.linkText("艺术品认证"))).perform();
driver.manage().timeouts().implicitlyWait(40, TimeUnit.SECONDS);
action.moveToElement(driver.findElement(By.linkText("认证"))).perform();
action.clickAndHold(driver.findElement(By.linkText("待认证列表")));
action.release(driver.findElement(By.linkText("待认证列表"))).perform();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.switchTo().defaultContent();
driver.switchTo().frame(driver.findElement(By.id("win")));
//单独写,定位不到,得switchTo一下
// driver.findElement(By.linkText("尾页")).click();
// java.util.List<WebElement> elements=driver.findElements(By.xpath("//table[@id='table']/tbody/tr"));
// int size=elements.size();
// driver.findElement(By.xpath("//tr["+size+"]/td[10]/a")).click();
driver.findElement(By.xpath("//table[@id='table']/tbody/tr/td[11]/a")).click();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.findElement(By.linkText("认证信息")).click();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
//上传数据包
driver.findElement(By.id("SWFUpload_1")).click();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
Runtime exe2=Runtime.getRuntime();
try{
String str="E://Attest.exe";
exe2.exec(str);
}catch(IOException e){
System.out.println("Error to run the Attest");
e.printStackTrace();
}
driver.manage().timeouts().implicitlyWait(100, TimeUnit.SECONDS);
// Thread.sleep(1000);
//判断一下压缩文件是否上传
WebElement IsUpload=null;
boolean c=true;
while(c)
{
IsUpload=driver.findElement(By.id("uploadButton3-queue"));
boolean b=IsUpload.isDisplayed();
if(!b){
driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
}else{
c=false;
}
}
driver.findElement(By.linkText("开始上传")).click();
driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
WebElement Isdelete=null;
boolean c1=true;
while(c1)
{
Isdelete=driver.findElement(By.xpath("//table[@id='imgTable']"));
boolean b=Isdelete.isDisplayed();
if(!b)
{
driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
}else{
c1=false;
}
}
driver.findElement(By.id("contentId")).sendKeys("认证通过");
driver.findElement(By.linkText("提交认证数据")).click();
//弹出框确定
driver.switchTo().defaultContent();
driver.switchTo().frame(driver.findElement(By.id("win")));
driver.findElement(By.linkText("确定")).click();
}
@Test(dependsOnMethods={"Attest"},description="这是认证复审")
public void AssertRe()
{
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.switchTo().defaultContent();
Actions action =new Actions(driver);
action.moveToElement(driver.findElement(By.linkText("艺术品认证"))).perform();
driver.manage().timeouts().implicitlyWait(40, TimeUnit.SECONDS);
action.moveToElement(driver.findElement(By.linkText("认证复核"))).perform();
action.clickAndHold(driver.findElement(By.linkText("待认证复核列表")));
action.release(driver.findElement(By.linkText("待认证复核列表"))).perform();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.switchTo().defaultContent();
driver.switchTo().frame(driver.findElement(By.id("win")));
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
//单独写,定位不到,得switchTo一下
// driver.findElement(By.linkText("尾页")).click();
// java.util.List<WebElement> elements=driver.findElements(By.xpath("//table[@id='table']/tbody/tr"));
// int size=elements.size();
// driver.findElement(By.xpath("//tr["+size+"]/td[10]/a")).click();
driver.findElement(By.xpath("//table[@id='table']/tbody/tr/td[11]/a")).click();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.findElement(By.linkText("复核意见")).click();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.findElement(By.id("attestation")).sendKeys("认证复审通过");
driver.findElement(By.linkText("提交复核信息")).click();
//弹出框确定
driver.switchTo().defaultContent();
driver.switchTo().frame(driver.findElement(By.id("win")));
driver.findElement(By.linkText("确定")).click();
}
@Test(dependsOnMethods={"AssertRe"},description="这是待草拟")
public void Draft()
{
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.switchTo().defaultContent();
Actions action =new Actions(driver);
action.moveToElement(driver.findElement(By.linkText("艺术品认证"))).perform();
driver.manage().timeouts().implicitlyWait(40, TimeUnit.SECONDS);
action.moveToElement(driver.findElement(By.linkText("证书草拟"))).perform();
action.clickAndHold(driver.findElement(By.linkText("待草拟证书列表")));
action.release(driver.findElement(By.linkText("待草拟证书列表"))).perform();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.switchTo().defaultContent();
driver.switchTo().frame(driver.findElement(By.id("win")));
//单独写,定位不到,得switchTo一下
// driver.findElement(By.linkText("尾页")).click();
// java.util.List<WebElement> elements=driver.findElements(By.xpath("//table[@id='table']/tbody/tr"));
// int size=elements.size();
// driver.findElement(By.xpath("//tr["+size+"]/td[10]/a")).click();
driver.findElement(By.xpath("//table[@id='table']/tbody/tr/td[11]/a")).click();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.switchTo().defaultContent();
driver.switchTo().frame(driver.findElement(By.id("win")));
driver.findElement(By.xpath("//a[contains(text(),'证书草拟')]")).click();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.findElement(By.linkText("证书草拟确认")).click();
//弹出框确定
driver.switchTo().defaultContent();
driver.switchTo().frame(driver.findElement(By.id("win")));
driver.findElement(By.linkText("确定")).click();
}
@Test(dependsOnMethods={"Draft"},description="这是待签发证书列表")
public void Issue()
{
// driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
// driver.switchTo().defaultContent();
// Actions action=new Actions(driver);
// action.moveToElement(driver.findElement(By.linkText("艺术品认证"))).perform();
// action.moveToElement(driver.findElement(By.linkText("证书签发"))).perform();
// action.clickAndHold(driver.findElement(By.linkText("待签发证书列表")));
// action.release(driver.findElement(By.linkText("待签发证书列表"))).perform();
// driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
// driver.switchTo().defaultContent();
// driver.switchTo().frame(driver.findElement(By.id("win")));
//// driver.findElement(By.linkText("尾页")).click();
//// java.util.List<WebElement> elements=driver.findElements(By.xpath("//table[@id='table']/tbody/tr"));
//// int size=elements.size();
//// driver.findElement(By.xpath("//tr["+size+"]/td[10]/a")).click();
// driver.findElement(By.xpath("//table[@id='table']/tbody/tr/td[10]/a")).click();
// driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
// driver.findElement(By.linkText("证书签发")).click();
// driver.findElement(By.linkText("打印正本")).click();
driver.close();
driver.quit();
}
}