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…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.
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.
Oh, wow-- yeah that makes sense! Does it matter if you run the service as the local system account and check the “Allow service to interact with desktop”? I assume this is a known issue with Windows in general and Google may have some advice on it.