Selenium lab instruction
1、Install the SeleniumIDE plug-in in the firefox
2、Open the SeleniumIDE to record the process
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
4、Code Selenium Java WebDriver project, and take the data-pair in info.cv as test case
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!