coldbox-modules / cbPlaywright

A library for integrating Playwright and TestBox
MIT License
9 stars 4 forks source link

java.lang.ClassNotFoundException:com.microsoft.playwright.Playwright$CreateOptions not found by lucee.core #10

Closed phoenixfangor closed 1 year ago

phoenixfangor commented 1 year ago

Current:

When I run my test, I get the following error:

Global Bundle Exception (136 ms)
cannot load class through its string name, because no definition for the class with the specified name
[com.microsoft.playwright.Playwright$CreateOptions] could be found caused by 
(java.lang.ClassNotFoundException:com.microsoft.playwright.Playwright$CreateOptions not found by lucee.core [49];
java.lang.ClassNotFoundException:com.microsoft.playwright.Playwright$CreateOptions;
java.lang.ClassNotFoundException:com.microsoft.playwright.Playwright$CreateOptions;)

Test:

component extends="cbPlaywright.models.ColdBoxPlaywrightTestCase" displayName="NavQuoterCustomMaterials" appMapping="/" asyncall=false {

/*********************************** LIFE CYCLE Methods ***********************************/
    // executes before all specs in the run() method
    function beforeAll(){
        super.beforeAll()
    }
    // executes after all suites+specs in the run() method
    function afterAll(){

    }

/*********************************** BDD SUITES ***********************************/

    function run( ){
        Describe( title="Custom Materials", asyncall="false", body=function(){
            it(title="Custom Materials", labels="integration", body=function(){
                dump(variables);
            });
        });
    }
}

Expected:

phoenixfangor commented 1 year ago

Merging our existing javaSettings with the additional cbPlaywright javaSettings was the issue. If this helps someone in the future, I removed the directoryList() function:

    {
        loadPaths: [
            "/com/lib/",
            "filepathgoeshere\testbox\modules\cbPlaywright\lib",
        ],
        loadColdFusionClassPath: true,
        reloadOnChange: false
    };