Skip to content

Commit 9448952

Browse files
committed
add checks back in
1 parent 27cd744 commit 9448952

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -875,6 +875,18 @@ WritableStream createTempFile(String name, long lastModifiedMs) {
875875

876876
protected void initializeHarFromOptions(Browser.NewContextOptions options) {
877877
if (options.recordHarPath == null) {
878+
if (options.recordHarOmitContent != null) {
879+
throw new PlaywrightException("recordHarOmitContent is set but recordHarPath is null");
880+
}
881+
if (options.recordHarUrlFilter != null) {
882+
throw new PlaywrightException("recordHarUrlFilter is set but recordHarPath is null");
883+
}
884+
if (options.recordHarMode != null) {
885+
throw new PlaywrightException("recordHarMode is set but recordHarPath is null");
886+
}
887+
if (options.recordHarContent != null) {
888+
throw new PlaywrightException("recordHarContent is set but recordHarPath is null");
889+
}
878890
return;
879891
}
880892

0 commit comments

Comments
 (0)