Giter Site home page Giter Site logo

Comments (2)

twalpole avatar twalpole commented on July 16, 2024 1

Is #console_messages available on the Browser object what you're looking for?

from apparition.

shepmaster avatar shepmaster commented on July 16, 2024

That does look promising, thank you! Can you point me towards the documentation I missed so I can find this kind of thing without bothering you next time?


From some experimentation:

  • #console_messages returns an array of OpenStructs with the keys [:type, :message, :source, :line_number, :columnNumber]. It's unfortunate the difference in naming style for rows and columns.

  • type appears to follow the console standard for levels — log, info, warn, error

  • The output from browser_logger still occurs when console_messages is used. Setting browser_logger to nil disables console_messages as well (it's always empty). Instead, I used File.open(File::NULL, "w").

  • It would be nice to be able to act as more of a filter. Right now, I effectively suppress all messages during the test run, then print them out as a batch at the end. This removes the ability to see how they mix with other prints (such as those in my tests)

from apparition.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.