mobile-dev-inc / maestro

Painless Mobile UI Automation
https://maestro.mobile.dev/
Apache License 2.0
5.89k stars 281 forks source link

Console.error doesn't do anything #2055

Open Fishbowler opened 2 months ago

Fishbowler commented 2 months ago

Is there an existing issue for this?

Steps to reproduce

Found whilst trying to repro nicely for #2001

Repro steps

  1. Clone https://github.com/Fishbowler/maestro-examples
  2. cd logging
  3. maestro test flow.yaml

console.error doesn't error, like console.potato would, but it doesn't create any output or add anything to the logMessages metadata in the logs.

Actual results

Console output:

 ║  > Flow                                                          
 ║                                                                  
 ║    ✅   Run loggingInJS_simple.js                                
 ║         Log messages:                                            
 ║           A simple message                                       
 ║    ✅   Run loggingInJS_withEnv.js                               
 ║         Log messages:                                            
 ║           An env var - TESTDATA is potato                        
 ║    ✅   Run loggingInJS_withVar.js                               
 ║         Log messages:                                            
 ║           A variable - TESTDATA is banana                        
 ║    ✅   Run ${console.log('Hello from evalScript')}              
 ║         Log messages:                                            
 ║           Hello from evalScript
 ║    ✅   Run console.log('This will not log')
 ║    ✅   Run ${console.error('Error from evalScript')}

Log output:

maestro.log

Expected results

Output to console and logfile

About app

No app needed.

About environment

Tested on an Macbook M3 Pro

Maestro version

1.38.1

How did you install Maestro?

install script (https://get.maestro.mobile.dev)