Lickut
Lickut

Reputation: 163

Selenium Webdriver - Opera - Unable to receive message from renderer

I'm trying to run my Java selenium tests using Opera (version 31). I'm using last version of Selenium Webdriver (2.47.1) and last version of OperaChromiumDriver (0.2.2).
I've tried to use next method to instantiate Opera:

 System.setProperty("webdriver.chrome.driver", "\\path\\to\\my\\operadriver.exe");
 WebDriver driver = new ChromeDriver();

And i've tried another method with RemoteWebdriver:

DesiredCapabilities capabilities = DesiredCapabilities.opera();
ChromeOptions options = new ChromeOptions();
options.setBinary("/path/to/opera");
capabilities.setCapability(ChromeOptions.CAPABILITY, options);
WebDriver driver = new RemoteWebDriver(new URL("http://127.0.0.1:9515"),capabilities);

(these methods are described in answers to this question: How to use OperaChromiumDriver for opera version >12.X)

Both methods have the same problem. Opera opens, but then crushes with next exception:

org.openqa.selenium.SessionNotCreatedException: session not created exception from disconnected: Unable to receive message from renderer
(Session info: Opera with embedded Chromium 0.1889.230)
(Driver info: OperaDriver=0.2.0 (ba47709ed9e35ce26dbd960fb5d75be104290d96),platform=Windows NT 6.1 x86_64
(WARNING: The server did not provide any stacktrace information)

Firefox, Chrome and IE drivers work as it should be, i have such problem only with OperaChromiumDriver.
Can anyone help me with this issue?

Upvotes: 3

Views: 2954

Answers (1)

user493955
user493955

Reputation: 36

Try to instantiate OperaDriver like this instead:

File operaFile = new File("\\path\\to\\my\\operadriver.exe");
System.setProperty("webdriver.opera.driver", operaFile.getAbsolutePath());
WebDriver driver = new OperaDriver();

In my application, .getAbsolutePath() works but just specifying the path in .setProperty does not. No idea why, since the string output of either is identical.

Unfortunately I am still unable to use OperaDriver in my tests because it becomes unresponsive after loading a few pages. This occurs on 3 different machines running different versions of Windows and returns only this error:

[SEVERE]: Timed out receiving message from renderer:

FirefoxDriver, ChromeDriver, and InternetExplorerDriver all work fine with my tests, so, whatever.

Upvotes: 2

Related Questions