Search code examples
codeception

How to write debug info on screen?


I'm writing a test that's not working like I expect.

I need to use some grabbers and then dump to the screen while test is running.

How I can do this ? How do echo, NOT how user grabber; I'm able to use grabbers but I don't know how to echos while test is running.


Solution

  • There is no specific command to print to screen / terminal while running a test.

    I do the following:

    $I->see($I->grabTextFrom('#myelement'));
    

    This way I can at least dump the contents of a element.

    Check this out. I haven't tried this one yet, but looks promising

    Printing debug output to console in Codeception