Skip to content

Instantly share code, notes, and snippets.

@angelovstanton
Created August 20, 2020 10:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angelovstanton/78315aefa3d02a2b19b2c08f27e7f2ca to your computer and use it in GitHub Desktop.
Save angelovstanton/78315aefa3d02a2b19b2c08f27e7f2ca to your computer and use it in GitHub Desktop.
@Test
public void VerifyFileDownloadChrome() throws IOException {
var expectedFilePath = Paths.get("c:\\temp\\Testing_Framework_2015_3_1314_2_Free.exe");
try
{
driver.navigate().to("https://www.telerik.com/download-trial-file/v2/telerik-testing-framework");
wait.until(x -> Files.exists(expectedFilePath));
long bytes = Files.size(expectedFilePath);
Assert.assertEquals(4326192, bytes);
}
finally
{
if (Files.exists(expectedFilePath))
{
Files.delete(expectedFilePath);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment