Selenium Server error: Unable to get browser
Asked Answered
W

6

10

I'm running Selenium Standalone Server 2.25 on Windows 7, with Internet Explorer 9 as a browser, and I'm getting this error for every test that requires opening the browser:

Selenium::WebDriver::Error::UnknownError:
       Unable to get browser (WARNING: The server did not provide any stacktrace information)
       Command duration or timeout: 10 milliseconds
       Build info: version: '2.25.0', revision: '17482', time: '2012-07-18 21:08:56'
       System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_07'
       Driver info: driver.version: EventFiringWebDriver
       Session ID: 356e9fc8-2d2b-4808-964c-4a1fea7415f9 (org.openqa.selenium.WebDriverException)

What am I doing wrong? The exact same information appears on the Selenium Server console.

Wnw answered 2/10, 2012 at 16:3 Comment(0)
W
26

The error disappeared after enabling the Protected Mode settings for all the zones in Internet Explorer (Tools > Internet Options > Security tab).

Wnw answered 2/10, 2012 at 16:3 Comment(4)
Yup, oddly though, in the constructor of the IEDriver it does check for this, so it should have told you.Hereby
@Hereby yes. I don't know why, but with the default IE configuration, it doesn't say what the problem is.Wnw
github.com/SeleniumHQ/selenium/wiki/… explains why enabling protected mode for all zones will fix this IE bug (still present in IE11)Gualtiero
Helped me a lotOstracize
G
20

For IE 11 only, you will need to set a registry entry on the target computer so that the driver can maintain a connection to the instance of Internet Explorer it creates.

For 32-bit Windows installations, the key you must examine in the registry editor is

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE

For 64-bit Windows installations, the key is

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE

Please note that the FEATURE_BFCACHE subkey may or may not be present, and should be created if it is not present. Important: Inside this key, create a DWORD value named iexplore.exe with the value of 0

Download the registry file from http://heliumhq.com/docs/internet_explorer.

See https://code.google.com/p/selenium/wiki/InternetExplorerDriver for this and more necessary IE configuration steps.

Gony answered 18/6, 2014 at 8:30 Comment(1)
Now this is strange. Until about 2 hours ago my tests were working without any issues on IE. Without any changes suddenly they stopped working, I got the same error message as OP. But this solution fixed it.Besotted
L
2

My usual tactic is to individually add sites that require automated testing to 'trusted sites' in IE.

Go to Tools > Internet Options > Security then click Trusted Sites and the Sites button and individually add the website(s) needed.

Probably easier to get past your IT manager that way if you're locked down.

Lingulate answered 29/11, 2012 at 15:54 Comment(1)
Use same solution for last version of IE 11 use 32 bit version of IEDriver (tested with selenium 2.47.1 and 2.50.1)Burgher
N
0

I'm using Selenium at Eclipse and my solution for this trouble is run IDE as administrator

Nelda answered 7/9, 2016 at 1:53 Comment(0)
B
0

i have added the url which i am trying to access in the Trusted Sites that way it worked for me after trying all the turnarounds

Brunelleschi answered 8/5, 2017 at 8:29 Comment(0)
N
-1

You must try this...

DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();

capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
System.setProperty("webdriver.ie.driver",IE_DRIVER_PATH);
driver = new InternetExplorerDriver(capabilities);
Narcisanarcissism answered 1/9, 2015 at 6:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.