Opera webdriver, Selenium 4 and javaScript

121 views Asked by At

I read that Opera can be launched using chrome.Options(): https://github.com/SeleniumHQ/selenium/issues/10835#issuecomment-1219801825 But these tips didn't help, when launching it writes: SessionNotCreatedError: session not created: Missing or invalid capabilities. any idea what I'm doing wrong?

  operaConfig: {
    'capabilities': {
      'w3c': 'true'
    },
    'args': [
      '--no-sandbox',
      '--disable-dev-shm-usage',
      '--remote-debugging-port=9222'
    ]
  }
getOperaOptions() {
        let options = new chrome.Options();
        options.set('caps', operaConfig.capabilities);

        new Map(Object.entries(operaConfig.args)).forEach(arg => {
            options.addArguments(arg)
        });
        return options;
    }

chrome runs successfully with the same function but with a different config. i think the problem is in it

opera version 100.0.4815.21, chromium 114.0.5735.110

operavebdriver 114.0.5735.110

selenium-webdriver 4.10.0

0

There are 0 answers