Type [Login/Password] in respective fields in a browser, from an executable Python (python_prog.exe)

I had created a Python executable file (python_prog.exe) - to be executed via ‘cmd’ prompt, with the following syntax:

C:> python_prog.exe -url <application_url> -l -p

with the purpose to login in the specified url <applcation_url>, and then, in its specified ‘login’ and ‘password’ fields,
insert the and , respectivelly, so - after it - I can select, cut and paste the necessary text from its screen.
In the script [python_prog.py] I have the folowing lines to do this:

driver = webdriver.Firefox() 

# 'mylogin' provided by the '-l' argument

# 'myp@ss0rd' provided by the '-p' argument
pyautogui.hotkey("alt", "tab")

After I had compiled it, generated it, and executed it, with the following commands:

pyinstaller --onefile python_prog.py
copy dist\python_prog.exe .

python_prog.exe -url -l mylogin -p myp@ssw0rd

With the above command line, I am able to open with my browser the related URL.
Therefore, the ‘mylogin’ is typed in my ‘C:>’ prompt:

‘mylogin’ is not recognized as a internal command


Is there a way to make my executable, after open my URL in my browser, to put the login and password
on each specified fields, so I can access my application’s screen?

I appreciate any tips you can give me.

In advance, thank you.


Luiz Cássio