Junit 5 - No ParameterResolver registered for parameter

后端 未结 6 3328
长情又很酷
长情又很酷 2021-02-05 01:41

Source : JUnit 5, Eclipse 4.8 , Selenium

I can write up and execute Selenium script without any special test framework but I wanted to use Junit 5 (because we have depe

6条回答
  •  半阙折子戏
    2021-02-05 02:16

    As Marc Philipp mentioned in his comment, you need to ensure that JUnit Jupiter can instantiate your test class.

    For your particular scenario, you'll need to remove your custom constructor that accepts a WebDriver.

    Then you have two options:

    1. Create the WebDriver on your own -- for example, in an @BeforeAll or @BeforeEach method.
    2. Use an extension such as Selenium Jupiter to help manage the WebDriver for you.

提交回复
热议问题