Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Login to web application
#2
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

Reply


Messages In This Thread
Login to web application - by malinowy - Sep-12-2018, 10:47 AM
RE: Login to web application - by buran - Sep-12-2018, 06:21 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020