-
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
When i use plain playwright js script i see the Expect calls in the trace.
With playwright-php traces are working, but i see no expect calls did i miss a config?
Example php snippet that is not in the trace
declare(strict_types=1);
require __DIR__.'/vendor/autoload.php';
use Playwright\Configuration\PlaywrightConfigBuilder;
use Playwright\PlaywrightFactory;
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
$log = new Logger('stdout');
$log->pushHandler(new StreamHandler('php://stdout', Logger::DEBUG));
$playwrightConfig = PlaywrightConfigBuilder::create()
->withLogger($log)
->withTracing(true)
->build()
;
$playwright = PlaywrightFactory::create($playwrightConfig);
$browser = $playwright->chromium()->connect('ws://playwright:8191/3630656d81258c6faa0e988cf725c427');
$context = $browser->newContext([
'ignoreHTTPSErrors' => true,
]);
$page = $context->newPage();
$context->startTracing($page, [
'screenshots' => true,
'snapshots' => true,
]);
$page->goto('https://www.google.de');
var_dump($page->getByText('Über Google')->first()->textContent());
var_dump(\Playwright\Testing\expect($page->getByText('Über Google')->first())->toBeVisible());
$page->getByRole('button', ['name' => 'Alle ablehnen'])->focus();
In the trace i did not see the getByText() calls.

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels