SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
30.22k stars 8.11k forks source link

Opera support: capabilities.Capabilities.opera is not a function #9653

Closed milen-yordanov closed 3 years ago

milen-yordanov commented 3 years ago

I'm using npm package "selenium-webdriver": "4.0.0-beta.4" The code is from https://github.com/SeleniumHQ/selenium/blob/trunk/javascript/node/selenium-webdriver/opera.js#L55

   const operaOptions: any = new opera.Options();
   const service = new (<any>opera).ServiceBuilder("e2e/operadriver_mac64/operadriver").build();
   return await opera.Driver.createSession(operaOptions, service);

The result is:

TypeError: capabilities.Capabilities.opera is not a function
    at Options.toCapabilities (/node_modules/selenium-webdriver/opera.js:315:62)
    at Function.createSession (/node_modules/selenium-webdriver/opera.js:367:22)

Changing the code to use new chrome.Options() fixes the issue, but this is just a temporary workaround.

ghost commented 3 years ago

👋 Hi there! Thank you for creating this issue.

I am the Selenium Assistant Bot 🤖, I triage issues in this repository. If I can't do it, I label it to help maintainers identify issues that need triaging.

I am an Open Source project 🙌, post bugs or ideas here!

ghost commented 3 years ago

❗️ It seems this issue is not using any of the supported templates

💡 Supported issue types are (they start with):

Issue templates help this project to stay in shape, please use them and fill them out completely. By doing that you are helping the project because the community and maintainers can provide prompt feedback, and potentially solve the issue.

If you are asking a question, a better way to address this is:

If you think this is incorrect, please feel free to open a new issue.

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.