BLUF:Help me figure out how to run a selenium python script from PowerShell.
Forgive the wordy post, adding some back story…Ok, so my at my job I have been tasked with automating the startup and shutdown of our entire system in the event of a power loss. So I tackle it right away with power shell (PS), leveraging plink to send commands to our RHEL machines.
There are however one or two tasks that can only be performed through web browsers. So I turn to python with selenium. Run through the steps I need to perform manually, write them down in notepad, turn that into python.
My script.py works great, but does not work from PS. So I write a .bat telling it where my script.py file is and to run it. The .bat works, script.py still works great, but when I run .bat from PS, nothing.
I know the env is set correctly because when I move the .bat from my users folder to c:windowssystem32 and run it, my script.py still works fine.
So far I have tried Start-Process, Invoke-Command, Invoke-Item, and others that I simply cannot remember ATM.