2016 Tianjin University Software Testing (lab2)

Selenium lab instruction

1、Install the SeleniumIDE plug-in in the firefox
2、Open the SeleniumIDE to record the process
905903-20160415110604832-1796206723.png

3、Use the student ID to log in on the website http://www.ncfxy.com and then you can see and check the e-mail information
905903-20160415110941254-1183105547.png
905903-20160415114039020-1776406241.png

4、Code Selenium Java WebDriver project, and take the data-pair in info.cv as test case
905903-20160415111134988-1556519314.png

905903-20160415112952816-1146421413.jpg

The problem we have meet:(just some details problem)

1.the csvReader can not auto-quit ,so using index judgement to quit

for(int i =0 ; csvReader.readRecord()&&i<109;i++){
    list[i][0] = new String(csvReader.get(0));
    list[i][1] = new String(csvReader.get(1));
    
}

2.the index

assertEquals(this.input2, driver.findElement(By.xpath("//tbody[@id='table-main']/tr[1]/td[2]")).getText());}

/tr[1]/td[2] means the second td in the first tr. The index is not from zero!

转载于:https://www.cnblogs.com/ida-xj/p/5394599.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值