Downloads latest PDF using selenium


Overview :

1.Identify any website that regularly posts publicly accessible PDF files. Examples may include some government website that posts PDFs of notices and circulars, court websites that posts PDFs of judgements, arXiv or journal websites that posts PDFs of research papers, financial regulator website that posts PDFs of corporate filings, or any other website that regularly posts PDF files.

2. Use Selenium IDE to record a test automation to download the latest PDF posted on your chosen website. Your script must download the latest PDF posted when the script is run, and not hardcode the file to download. You can install Selenium IDE from here: https://www.selenium.dev/selenium-ide/.

3. Use selenium side runner to execute your SIDE file via the command line and verify that your automation works as expected. You can install Selenium side runner from here: https://www.seleniumhq.org/selenium-ide/docs/en/introduction/command-line-runner/

Website used:

https://rbi.org.in

To run script using code runner, so follow the steps:

Open terminal or Windows+R and write cmd
install node
install -g selenium-side-runner
Installing a browser driver: For Edge : npm install -g edgedriver
type command: selenium-side-runner /path/to/your-project-name.side

Using Selenium IDE:

Download this repository.
Open the Selenium IDE Extension in your browser.
Click open an existing project and navigate to the downloaded .side file
Run the .SIDE file using the play button on the top side.


View Code View Demo