← Back to Discord Forum

How to output the entire object?

I have this in my code:

await use(page);

  for (const pageError of pageErrors) {
    console.error('page error', pageError);

but the output in terminal is just:

-  42 relationship-panel/panel-tabs-functionality.rate-limited.spec.ts:6:8 › Relationship Panel › RelationshipPanel Tabs Functionality
page error [Object]
page error [Object]
page error [Object]
page error [Object]
  ✓  43 referrals/rewards-settings-page.spec.ts:5:3 › Rewards settings page › the settings menu and the advert are visible with the flag set (5.2s)

How do I output the entire object?

This thread is trying to answer question "How do I output the entire object instead of just '[Object]' in the terminal?"

1 reply

Never mind. Turns out it was a literal string '[Object]' 🫠

Related Discord Threads

AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.