阅读背景:

[Selenium]如何实现上传本地文件

来源:互联网 
public void uploadLocalFileToServer(String uploadFileName){
		String AutomationPath = System.getProperty("user.dir");
		String filePath=AutomationPath+"\src\test\resources\testData\"+uploadFileName;
		logger.info("Upload file path : "+filePath);
		WebElement magnifyIcon = page.getMagnifyIconOfSampleReport();
		magnifyIcon.sendKeys(filePath);
		Assert.assertEquals(page.getSampleReportTxtInput().getAttribute("value"),uploadFileName,uploadFileName+" should be listed in Sample Report .");
		Assert.assertTrue(page.getSampleReportDeleteIcon().isDisplayed(), uploadFileName+" should be listed in Sample Report with a delete icon on the right.");
	}
public void uploadLocalFileToServer(String 



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: