Python, Selenium and the case of the unelevated privilege winerror 740

The paranoia of writing up anything for people in the same profession is real. I can get into specifics if it’s helpful but this feels like a common issue, yet my attempts to research it, led to a dead end. Hopefully, someone recognizes it. My google fu up to and including working has failed me:)

Up until a couple of weeks back I had working tests with the following set up.
win7, python 3.7, Selenium they had been working for several months
When calling Chromedriver, “winerror 740” requires elevated permissions. I am a local admin on the system, the effective file permissions for python , chromedriver and selenium folders should allow everything

(I can also get it to work on my home machine,

at it’s simplest

Typing that into Python command line.

from selenium import webdriver
driver = webdriver.Chrome(executable_path = “c:/pytest/chromedriver.exe”)

soon as I enter that into the console, or it’s called by a test I get the 740 error as it can’t import webdriver, or if I import all of selenium, it can’t execute it
Ty in advance for any pointers

1 Like


I had a similar problem on Windows and I needed to remove my chrome driver and reinstall it.

Is it definitely up-to-date etc?

Most of my issues were because my Chrome updates automatically but my driver doesn’t and it just falls over. Eventually it got so far behind it threw a wobbly and just stopped working entirely. I never worked out the exact reason why.


Sorry I missed this and this is really unhelpful but your opening statement @haltse sounds like either a book or comic that I want to read. I hope you find a resolution to your issue but as a plot involving mystery problems, an unassuming protagonist and a geeky background is interesting. That said, I have had a drink this Sunday night and may be reading more into it than is on the surface!

1 Like

Faith, thank you for the reply, I forgot to update how I solved it.

I’d replaced chromedriver with the latest version prior, but while troubleshooting this I’d pretty much replaced every part of the process, Updated / reinstalled python, selenium, chromedriver etc to no avail. Was able to get the same scripts working on another profile etc. E.G., proving it could work to those doubters in IT:)

In the end, moving the working directory the script was called from, cured it. Same user, same effective permissions, no reason. So once more I helped out the helpdesk by improving their clearance rate:)

1 Like


Yes I’ll start out with the ending and work my backwards.

The crime was committed by enterprise security software , in the working folder with permissions.
Hopefully the drink was not scotch I fear running out :slight_smile:


In our environment we avoid this kind of issue via the established principle that we do all engineering and development work on Linux virtual machines where we control the permissions. For us, Windows is for Office and email.

I asked them last week if they had any objections to us using Linux. So far no news is good news

If you’ve been provided with a reasonable spec PC, you could frame the question as “would you allow Oracle VirtualBox?”

Using that gets us around a host of corporate IT restrictions that would simply close our office down.

Yeah I have the iron to drive a virtual instance, the objections lay more around what it connects with:) Given time will win them over.

You’re so lucky. We’re told… no you can’t unless you run the corporate image of Windows on them, totally defeating the object. Corporate IT here seem geared up to support office workers only and have no idea what R&D do (of which test is sub-team here). They’ve even started randomly pushing out updates to Visual Studio breaking stuff left, right and centre. When we point out we need fixed versions of toolchains they just shout ‘security’ and won’t enter into meaningful discussions.

We’ve even just purchased an expensive server for our own build / CI processes an they insisted on wiping the OS and replacing with their corporate image which they then found out won’t support the hardware! Two weeks later… we’re still waiting for them to give us the machine in a working state.

1 Like