playwright-python icon indicating copy to clipboard operation
playwright-python copied to clipboard

[Feature] ability group outputs in the trace viewer

Open scott-au opened this issue 2 years ago • 6 comments

the show steps/fixtures in the trace is certainly a nice feature released in 1.34 - grouping all the associated actions makes a trace file easier to go through.

is there any chance we could also have some sort of mechanism that allows us to group actions together in a similar fashion for users not using playwright test.

scott-au avatar Jun 01 '23 22:06 scott-au

i looked into this and would like to have a go at implementing it. it seems straightforward, looks like trace events just need the parentId field in the metadata.

i will probably make a step context manager that works the same as the test.step method in @playwright/test

DetachHead avatar Jun 05 '23 23:06 DetachHead

Any update ? I also looking for similar feature

EldoradoEU avatar Sep 07 '23 11:09 EldoradoEU

unfortunately it turned out to be more difficult than i thought, so i went with a very hacky solution that's tied to my own project which i can't really share.

@mxschmitt would you happen to have some insight on how i could go about implementing this? do i need to expose TestInfo._addStep to python? if so, how?

DetachHead avatar Sep 19 '23 03:09 DetachHead

Grouping outputs is important to what I'm doing but I'm in Python, not typescript. I would love this feature!

danielmhair avatar Apr 17 '24 13:04 danielmhair

unfortunately it turned out to be more difficult than i thought, so i went with a very hacky solution that's tied to my own project which i can't really share.

@mxschmitt would you happen to have some insight on how i could go about implementing this? do i need to expose TestInfo._addStep to python? if so, how?

@mxschmitt any guidance here ? sounds like @DetachHead is keen to submit a PR

scott-au avatar Jul 18 '24 04:07 scott-au