一、Install the SeleniumIDE plug-in in the firefox
二、Open the SeleniumIDE to record the process
web
三、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
ui
四、Code Selenium Java WebDriver project, and take the data-pair in info.cv as test case
this
1.the csvReader can not auto-quit ,so using index judgement to quitfirefox
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 index3d
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!code