Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have tried to open a URL using the OperaDriver. My issue is that I am getting browser launched but the desired page is not getting loaded. Below is the code.

public static void setUpBeforeClass() throws Exception {

/*  DesiredCapabilities capabilities = DesiredCapabilities.opera();
      capabilities.setCapability("opera.binary","C:/Program Files(x86)/Opera/opera.exe");
      driver = new OperaDriver(capabilities); 

      DesiredCapabilities capabilities = new DesiredCapabilities();
      //capabilities.setCapability("opera.log.level", "CONFIG");
      capabilities.setCapability("opera.port", "-1");
      capabilities.setCapability("opera.profile", "");
       driver = new OperaDriver(capabilities);


public void testCreateAccount() throws Exception{



I am using Opera browser version 11.10 and running test as JUnit.

When it fails, the following is returned in the console.

Exception in thread "stp-thread" java.nio.channels.ClosedSelectorException at at at at

Thanks in advance

share|improve this question
If you let it fail, what's the error that's returned? – Lyndon Vrooman Oct 15 '12 at 19:38
Lyndon i am getting following error in console, Exception in thread "stp-thread" java.nio.channels.ClosedSelectorException at at at at – Tester Oct 16 '12 at 4:46
Added your error message to the question. I'm not certain about this one. – Lyndon Vrooman Oct 16 '12 at 16:18

try this method its working fine for me.....

capabilities = new DesiredCapabilities();   capabilities.setBrowserName("opera");               capabilities.setCapability("opera.autostart ",true);

driver = new RemoteWebDriver(server, capabilities);
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.