cbPlayWright launchInteractiveBrowser() does not launch an interactive browser

I saw Eric Peterson’s wonderful session about cbPlaywright, but my reality isn’t so peachy.

I am able to run my test, but a browser never opens for the interactive browser.
I have tried launchBrowser with browserType & headless specified and that does not launch a browser either.

Any help would be greatly appreciated. Any suggestions?

component extends="cbPlaywright.models.PlaywrightTestCase" { 

    function run( ){
        Describe( "Custom Materials", function(){
            it("Custom Materials", function(){ 

                        var browser = launchInteractiveBrowser( variables.playwright.chromium() );
                        var page = browser.newPage();
                        navigate( page, "http://" & CGI.HTTP_HOST );
                        waitForLoadState( page );
                        expect( page.title() ).toBe( "Welcome to my site!" );
                   
            });
        });
    }
}

Hmm…that definitely is odd. If you throw in a page.pause() does it pause for you then?

Yes, it does seem to be pausing.

And showing a browser? Or just pausing forever?

Just pausing forever! No browser. :frowning:

I’m running the tests against my local environment on a VM and I see a lot of chrome processes, but they never appear in the VM’s UI.

I updated Lucee to run under the user I login as, and that has not made a difference.

Hmm…I’m not sure here. You might want to try reinstalling the drivers and dependencies using commandbox-cbplaywright and the playwright-cli. Sorry I don’t have more ideas!

I am going to try installing CommandBox on my local VM, but that would mean that CommandBox is a dependency. That might be a deal breaker for us, but we’ll see.

InteractiveBrowserNotWorking

On the VM, I installed both commandbox-cbplaywright and cbplaywright, to no avail.

I would also like to point out that these chromium instances are NOT closing on their own.

I am replying to myself with some more details in hopes this helps someone else in the future.

Here’s what playwright codegen sitenamehere generates for Chromium (and it DOES appear in the UI):

I also ran the test directly in the VM, and that did NOT make a difference. There is still no visible chromium browser.

I would go out on a limb and guess you have some sort of machine-specific issue, possibly related to anti-virus going on. While Eric wrote the wrapper for playwright, he did not make Playwright itself nor can we really support that 3rd party software. You may want to look into a help forum for Playwright itself for clues on how it’s operating.

I agree! I’m looking into Playwright’s debugging options now. I appreciate all your and Eric’s time and attention.