1

This is my HTML Structure
HTML Structure

I want to make sure that the title is 'Favorite Restaurant', How do i test this using codecept-puppeteer ?

I already tried this, but it doesn't work

Feature('Favorite Restaurant');

Before(({ I }) => {
  I.amOnPage('/#/favorite');
});

Scenario('showing empty favorite restaurants', async ({ I }) => {
  I.wait(3);
  const text = await I.grabTextFrom(
    'pierce/favorite-module .section-header h2',
  );
  console.log(text);
});

Test log

Ahmed Ashour
  • 5,179
  • 10
  • 35
  • 56
Dapa
  • 11
  • 3

0 Answers0