Debug & Logging


On this page

#Log into console

You can add output logs into the console inside a test.

Methods log and console are aliases.

Copied!
1->it('check product price', function () use ($frontOfficeProductPage) {
2 $frontOfficeProductPage->goToProduct(42);
3 
4 $price = $frontOfficeProductPage->getPrice();
5 $this->log('price: ' . $price);
6 $this->console(['raw' => $price, 'formatted' => '$' . $price]);
7 
8 Expect::that($price)->isGreaterThan(0);
9})