Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting "Could not instantiate class org.openqa.selenium.edge.EdgeDriver" when trying to run 'browserInDocker()' #19

Open
patrykost opened this issue Dec 7, 2021 · 6 comments

Comments

@patrykost
Copy link

No matter which driver I'm trying to use error remains the same "Could not instantiate class org.openqa.selenium.(...)".
I've used this as instruction:https://johnfergusonsmart.com/whats-new-in-serenity-bdd-3-x/

Changes I've maid:

  • added SampleWebDriverManagerEnhancer:
    image

  • added package to serenity.conf:
    image

@wakaleo
Copy link
Member

wakaleo commented Dec 7, 2021

That is a generic Selenium error - the stack trace may provide more details, but this code simply delegates to WebDriverManager, so maybe raising the issue with that project might identify the problem faster.

@patrykost
Copy link
Author

Thanks @wakaleo ,
Unfortunately serenity does not give any different stack trace than this generic one.
In the report I can see also:
Could not instantiate new WebDriver instance of type class org.openqa.selenium.edge.EdgeDriver (The path to the driver executable The path to the driver executable must be set by the webdriver.edge.driver system property; for more information, see https://docs.microsoft.com/en-us/microsoft-edge/webdriver-chromium/. The latest version can be downloaded from https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/). See below for more details.

@wakaleo
Copy link
Member

wakaleo commented Dec 7, 2021

That's just Serenity reporting an error message coming from Selenium. I don't think it's a Serenity issue as such - have you asked the WebDriverManager community?

@patrykost
Copy link
Author

HI @wakaleo ,
I have not, I'll try to debug in free time.

@patrykost
Copy link
Author

Hi @wakaleo
It seems that Serenity is not calling DriverManager.create()/quit().
I've managed to make docker run by adding:
image

image

Unfortunately error message ha not changed and tests are not running on created docker.

@patrykost patrykost reopened this Dec 17, 2021
@wakaleo
Copy link
Member

wakaleo commented Dec 17, 2021

Serenity calls the Driver quit() method at the end of each test, so I don't think that is the issue. There may be more needed to be done to support WebDriverManager docker instances, in which case there are two options: (a) have a look and see what (if any) extra code is needed for the Docker support to work (start with a standard Selenium project), (b) wait until someone on the Serenity team has time/wants to take a look (I have no timeline for this), or (c) raise a support request to sponsor the implementation of this feature (if you are using it for your company projects you can ask your company to sponsor the development).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants