[英]how to check elements form a csv file with selenium web driver in java?
大家好:)我正在用Java中的Selenium Web驱动程序测试Web应用程序。 我想下载一个csv文件,然后检查元素是否正确。 我想知道,Selenium是否可以检查csv文件中的元素并将它们与我期望的元素进行比较。
此代码使我可以下载并保存文件。 现在,我想比较或检查元素是否良好:公共类TestsExtraction扩展了GestionExtraction {
@Test
public void testConfiguration_fichier1() throws BadPageException {
// Connection to the web app as superAdmin
connexionIHM(User.SUPERADMIN);
// go and select the csv file for downloading through the web app
SeleniumTools.selectionneDansMenuGauche(getWebDriver(), "8", "2");
// click on the button to download the file
getWebDriver().findElement(By.xpath("//*[@id='extractionConfiguration_idServeurSelectioner']/option["+ numeroOption +"]")).click();
// disconnect from the web app
deconnexionIHM();
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.