first of all, your code can be shortened to
import webbrowser, sys urls = {'prod':'https://produrl', 'uat':'https://uat', 'sit':'http://sit', 'dev':'http://dev', 'reftest'='http://reftest', 'refqa':'http://refqa' 'refdev':'http://dev'} if len(sys.argv) == 1: print ('W parametrze musisz podać nazwę środowiska...') else: arg = sys.argv[1].lower() url = urls.get(arg, None) if url: webbrowser.get(webbrowser.iexplore).open_new_tab(url) print ('Otwieram {}...'.format(arg)) else: print ('Nie znam takiego środowiska {}...'.format(arg))not sure if it will work but you may try to use some of the modules like pywinauto, pyautogui
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs