-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Update DriverOptions.java #1256
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,6 +81,8 @@ public class DriverOptions { | |
public final Logger driverLogger; | ||
public final String uniqueName; | ||
public final File workingDir; | ||
public final boolean disableNotifications; | ||
public final String userAgent; | ||
public final String userDataDir; | ||
public final String processLogFile; | ||
public final int maxPayloadSize; | ||
|
@@ -167,12 +169,20 @@ public DriverOptions(ScenarioContext context, Map<String, Object> options, LogAp | |
args.add(executable); | ||
} | ||
} | ||
workingDir = new File(FileUtils.getBuildDir() + File.separator + uniqueName); | ||
if (options.containsKey("userDataDir")) { // special case allow user-specified null | ||
userDataDir = (String) options.get("userDataDir"); | ||
disableNotifications = get("disableNotifications", false); | ||
userAgent = get("userAgent", null); | ||
Comment on lines
+172
to
+173
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And this too! |
||
String place = get("userDataDir", null); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wanted user to provide will this work the same way There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Leaving workingDir like that, will create countless 'chrome_1234567890' folders inside target with zero content. |
||
if (place != null) { // special case allow user-specified null | ||
if (place.startsWith(".")){ | ||
workingDir = new File((new File(place)).getAbsolutePath()); | ||
} else{ | ||
workingDir = new File(place); | ||
} | ||
userDataDir = workingDir.getAbsolutePath(); | ||
} else { | ||
workingDir = new File(FileUtils.getBuildDir() + File.separator + uniqueName); | ||
userDataDir = workingDir.getAbsolutePath(); | ||
} | ||
} | ||
processLogFile = workingDir.getPath() + File.separator + type + ".log"; | ||
maxPayloadSize = get("maxPayloadSize", 4194304); | ||
target = get("target", null); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can ignore that!