Created
September 24, 2021 05:35
-
-
Save Vinay08sharma/805ef99dd81bb9dbc8e8b35a65c1d933 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('Verify on click of download PDF, PDF should be downloaded', async () => { | |
driver.navigate('url') | |
reporter.startStep('Clicking on download PDF button'); | |
await topicPage.clickDownloadPDF(); | |
await studentDriver.pause(20000); // Download take some time, you can add code to wait until file exist | |
const isPresent = DirectoryUtils.validateFileIsPresentInDirectory(filePath); | |
chaiExpect(isPresent, | |
'Expected the presence of file, but not found').to.be.true; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment