stack twitter rss linkedin cross

Wilco van Esch

Skip to main content

Search results

    ERROR: Cannot define class using reflection

    Running tests driven by WebDriver, I experienced the following issue.

    ERROR: Cannot define class using reflection
     at new RuntimeError
     (.\node_modules\webdriverio\build\lib\utils\ErrorHandler.js:144:12)
    

    This occurred after, and proved to be a direct result of, a Java update.

    To solve this, sadly you'll have to downgrade from JDK 10 to JDK 9 on your local machine (until Selenium WebDriver is updated to be compatible with Java 10 and until you're ready to update WebDriver on your project).

    You can find legacy JDK versions in the Oracle Java Archive.