-
Notifications
You must be signed in to change notification settings - Fork 110
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
Support starting and stopping trace by a keyword #3427
Comments
This requires to update the js_keyword_interface, so that context (opt browser) is also available in the js keyword. if trace is startet after page, many resources are missing, I.e. css . Therefore it would be good to start it before opening page. idea: enable tracing for new_page. |
I have not thought about New Page keyword, I need to think about it. But sounds like possible idea. And fixed bug in the second example in above, one cannot call Start Trace twice in the same context. |
We should think is this needed with the enhancements in the 19.0 release. |
Any update on this? |
It would, have not found time for it. That being said, contributing is always possible. |
Is your feature request related to a problem? Please describe.
Currently it is only possible to start trace when context is opened. Also trace is stopped when context is closed. There has been several discussions in Slack that user would like to control trace better. This is possible with Playwright Trace
Describe the solution you'd like
Create keyword which allows to stop and and start trace. In simplest form there could be two keywords this:
The downside seems to be, based on docs, that one can start and stop trace only one time.
Also we could expose other options from Trace, like chunks and options from trace. This allows to create multiple traces files inside of the same context. I think this would be even better.
I am leaning towards the later way and exposing
startChunk
andstopChunk
functionality from PW side. I am not sure without testing do we need in later case also theStop Trace
keyword, perhaps not. The later way gives better control for users and allows, for example, give trace a name based on the test. This allows finding the correct trace easier.The text was updated successfully, but these errors were encountered: