Question

I tried to run this simple test script. I tried to launched it from eclipse and cmd. When I launch it, I get prompt msg

"Could not load extension from 'C:\Users\C03049\AppData\Local\Temp\scoped_dir45`6_4977\internal'. Loading of unpacked extensions is disabled by the administrator."

When I click ok, it loads the url but then I get error

"selenium.common.exceptions.WebDriverException: Message: u'unknown error: cannot get automation extension\nfrom unknown error: page could not be found: chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html\n (Session info: chrome=31.0.1650.57)\n (Driver info: chromedriver=2.6.232923,platform=Windows NT 6.1 SP1 x86_64)' "

Here is the code. Can somebody explain me the error and possible solution?

driver = webdriver.Chrome()
driver.get('http://www.google.com')
time.sleep(5)
driver.save_screenshot('path/test.png')
driver.close()
Was it helpful?

Solution

I found out the way using chrome Options. We have to disable extensions.

from selenium.webdriver.chrome.options import Options

chrome_options = Options()
chrome_options.add_argument("--disable-extensions")

driver = webdriver.Chrome(chrome_options=chrome_options)

OTHER TIPS

Your sysadmin has denied you permission from loading unpacked extensions in the browser. Possible solution is to call him up and tell him the situation and ask him for further direction.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top