Selenium invokes only the installed version of the browser to run its script. how can i add this feature to my selenium framework like: run the script on Chrome 50,52 and 53. same with firefox, Safari and IE.
On a single computer you can only install one version of each browser. So to run your Selenium tests against multiple version you will need multiple machines.
- Easiest: Setup a virtual machine, install browser version of choice (disable automatic updates), install test-runner tools, copy tests to virtual machine and run the tests.
- Medium: Run you tests against online browsers services, like BrowserStack, SauceLabs or other alternatives.
- Hardest: Setup a Selenium Grid and configure each virtual machine with unique version numbers. Ask the grid for capabilities so your tests runs can find the correct nodes on the grid.
- Most time consuming: Removing the browsers version and reinstalling the version you want to test against.
Another issue you will have is finding the older versions, but searching for them is possible. Directing you to all older versions is to broad for this question. For the Safari on Mac you might need older version of the operating system as Safari is only shipped with OS-updates.
I would recommend using one of the online services if you really need to test and support a broad range of browser versions. Else just support the latest version and add a disclaimer that the users need to upgrade or expect possible issues.