File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
playwright/src/main/java/com/microsoft/playwright/impl Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -124,8 +124,14 @@ private BrowserContextImpl newContextImpl(NewContextOptions options) {
124124 // Make a copy so that we can nullify some fields below.
125125 options = convertType (options , NewContextOptions .class );
126126 }
127- Object recordHarUrlFilter = options .recordHarUrlFilter ;
127+
128+ NewContextOptions harOptions = Utils .clone (options );
129+ options .recordHarContent = null ;
130+ options .recordHarMode = null ;
131+ options .recordHarPath = null ;
132+ options .recordHarOmitContent = null ;
128133 options .recordHarUrlFilter = null ;
134+
129135 if (options .storageStatePath != null ) {
130136 try {
131137 byte [] bytes = Files .readAllBytes (options .storageStatePath );
@@ -179,8 +185,7 @@ private BrowserContextImpl newContextImpl(NewContextOptions options) {
179185 if (options .baseURL != null ) {
180186 context .setBaseUrl (options .baseURL );
181187 }
182- options .recordHarUrlFilter = recordHarUrlFilter ;
183- context .initializeHarFromOptions (options );
188+ context .initializeHarFromOptions (harOptions );
184189 return context ;
185190 }
186191
You can’t perform that action at this time.
0 commit comments