For our automation scripts we are testing various type of applications. Some of these applications needs proxy configuration to access the application page while for some of them proxy mustn't be configured.
To solve this we use a function named "initAutomation" that takes application name as a parameter. This function is being called at the beginning of the test script and checks the application name and then decides to configure proxy settings before the execution.
Following piece of code accomplishes this functionality.