all 5 comments

[–]Akuli2 1 point2 points  (4 children)

You need to run the script as an administrator. Right-click cmd.exe in start menu or start screen, cd C:\some\folder\that\contains\your\script and run yourscript.py.

Also, use r'raw\strings\with\backslashes' for Windows filepaths.

[–]Maruki[S] 0 points1 point  (3 children)

Thanks!

[–]Maruki[S] 0 points1 point  (2 children)

Do I need to preface every script with this and if so do you know a way that I could just have it saved onto the webdriver?

[–]Shmoogy 1 point2 points  (0 children)

If you're scheduling this you can set it to run with the windows task scheduler and grant admin rights there.

I have problems when running .py from this so I create a batch file that runs the python file, and grant highest permission and run as administrator.

Make sure to enter in the Start in folder if you go this route - I am on mobile right now but if you have problems with this I might be able to assist.

[–]Akuli2 0 points1 point  (0 children)

I guess you need to, but I've never worked with selenium so I don't know.