Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getBrowserConsoleMessages returns undefined in 1.8.0 #4662

Closed
sorin-davidoi opened this issue Jan 20, 2020 · 3 comments
Closed

getBrowserConsoleMessages returns undefined in 1.8.0 #4662

sorin-davidoi opened this issue Jan 20, 2020 · 3 comments
Labels
!IMPORTANT! STATE: Auto-locked An issue has been automatically locked by the Lock bot. TYPE: bug The described behavior is considered as wrong (bug).
Milestone

Comments

@sorin-davidoi
Copy link

What is your Test Scenario?

Load a simple page and fetch the console messages.

What is the Current behavior?

test.getBrowserConsoleMessages() returns undefined or null.

What is the Expected behavior?

It should return the console messages.

What is your web application and your TestCafe test code?

Your complete test code (or attach your test files):
fixture`Test`;

test
    .page('https://duckduckgo.com')
    ('test', async test => {
        const { error, warn, log, info } = await test.getBrowserConsoleMessages();
    });
Your complete configuration file (if any):

Your complete test report:
Test
 ✖ test

   1) TypeError: Cannot destructure property `error` of 'undefined' or 'null'.

      Browser: Firefox 72.0 / macOS 10.15

         1 |fixture`Test`;
         2 |
         3 |test
         4 |    .page('https://duckduckgo.com')
         5 |    ('test', async test => {
       > 6 |        const { error, warn, log, info } = await test.getBrowserConsoleMessages();
         7 |    });
         8 |

         at Object.<anonymous> (/Users/sorindavidoi/Repositories/HTML-Client/test.ts:6:15)
         at fulfilled (<redacted>test.ts:3:58)
         at $$testcafe_test_run$$flJkbqpN0$$
      (<redacted>/node_modules/testcafe/src/api/test-run-tracker.js:76:16)
         at $$testcafe_test_run$$flJkbqpN0$$
      (<redacted>/node_modules/testcafe/src/api/test-run-tracker.js:76:16)

Steps to Reproduce:

See test file.

Your Environment details:

  • testcafe version: 1.8.0
  • node.js version: v12.14.1
  • command-line arguments: firefox test.ts
  • browser name and version: Firefox 72
  • platform and version: macOS 10.15
  • other:

This is a regression in 1.8.0 - it does not happen in 1.7.1.

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Jan 20, 2020
@miherlosev
Copy link
Collaborator

Hi @sorin-davidoi

I've reproduced the problem. Thank you for the provided information.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Jan 20, 2020
@miherlosev miherlosev added !IMPORTANT! TYPE: bug The described behavior is considered as wrong (bug). labels Jan 20, 2020
@miherlosev
Copy link
Collaborator

Fixed in #4664

@AndreyBelym AndreyBelym added this to the Sprint #49 milestone Jan 22, 2020
@lock
Copy link

lock bot commented Feb 1, 2020

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.

@lock lock bot added the STATE: Auto-locked An issue has been automatically locked by the Lock bot. label Feb 1, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Feb 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
!IMPORTANT! STATE: Auto-locked An issue has been automatically locked by the Lock bot. TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

3 participants