Skip to content

bug: inspector with remote playwright #81

@gimler

Description

@gimler

I run playwright in another container. When i try to use the inspector it did not pause

$playwrightConfig = new PlaywrightConfig(
    headless: false,
);
$playwright = PlaywrightFactory::create($playwrightConfig);

// Provide the wsEndpoint() emitted by a process that called launchServer().
$remoteWsEndpoint = getenv('ws://playwright:8191/04bd2bde391aab6cf5fa2d10bc5cc3a1');

$browser = $playwright->chromium()->withInspector()->connect($remoteWsEndpoint);
echo "Successfully connected to remote browser!\n";

$page = $browser->newPage();
$page->goto('https://www.google.de');

// This opens Playwright Inspector and pauses execution.
echo "Calling page->pause() — Inspector should open now...\n";
$page->pause();

echo "Resumed from Inspector. Closing...\n";
$browser->close();

output

Successfully connected to remote browser!
Calling page->pause() — Inspector should open now...
Resumed from Inspector. Closing...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions