The work is you have to code a macro program which is very easy and it is used in “imacros” a addon used in Firefox.
Check the image attached. In that image, you can see the red box in the right side and a green box in the left side. The red box contains the links which is made to be clicked automatically through the macro code.
The features should be supported by the macro are,
1. It should click on the link which opens in the same page and it should return to the previous page within 5 seconds.
2. The exceptions should be handled correctly. (The exceptions are server not found, connection timed out, page not loaded within 30 seconds, unsafe site).
3. It should navigate through all the pages present.