0

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()

2 Answers 2

4

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)
Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.