Class Tracing.StartOptions

  • Enclosing interface:
    Tracing

    public static class Tracing.StartOptions
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String name
      If specified, the trace is going to be saved into the file with the given name inside the tracesDir folder specified in BrowserType.launch().
      java.lang.Boolean screenshots
      Whether to capture screenshots during tracing.
      java.lang.Boolean snapshots
      If this option is true tracing will capture DOM snapshot on every action record network activity
      java.lang.Boolean sources
      Whether to include source files for trace actions.
      java.lang.String title
      Trace name to be shown in the Trace Viewer.
    • Constructor Summary

      Constructors 
      Constructor Description
      StartOptions()  
    • Field Detail

      • name

        public java.lang.String name
        If specified, the trace is going to be saved into the file with the given name inside the tracesDir folder specified in BrowserType.launch().
      • screenshots

        public java.lang.Boolean screenshots
        Whether to capture screenshots during tracing. Screenshots are used to build a timeline preview.
      • snapshots

        public java.lang.Boolean snapshots
        If this option is true tracing will
        • capture DOM snapshot on every action
        • record network activity
      • sources

        public java.lang.Boolean sources
        Whether to include source files for trace actions. List of the directories with source code for the application must be provided via PLAYWRIGHT_JAVA_SRC environment variable (the paths should be separated by ';' on Windows and by ':' on other platforms).
      • title

        public java.lang.String title
        Trace name to be shown in the Trace Viewer.
    • Constructor Detail

      • StartOptions

        public StartOptions()
    • Method Detail

      • setName

        public Tracing.StartOptions setName​(java.lang.String name)
        If specified, the trace is going to be saved into the file with the given name inside the tracesDir folder specified in BrowserType.launch().
      • setScreenshots

        public Tracing.StartOptions setScreenshots​(boolean screenshots)
        Whether to capture screenshots during tracing. Screenshots are used to build a timeline preview.
      • setSnapshots

        public Tracing.StartOptions setSnapshots​(boolean snapshots)
        If this option is true tracing will
        • capture DOM snapshot on every action
        • record network activity
      • setSources

        public Tracing.StartOptions setSources​(boolean sources)
        Whether to include source files for trace actions. List of the directories with source code for the application must be provided via PLAYWRIGHT_JAVA_SRC environment variable (the paths should be separated by ';' on Windows and by ':' on other platforms).
      • setTitle

        public Tracing.StartOptions setTitle​(java.lang.String title)
        Trace name to be shown in the Trace Viewer.