How to use buildWorkingDir method of org.testingisdocumenting.webtau.cli.CliProcessConfig class

Best Webtau code snippet using org.testingisdocumenting.webtau.cli.CliProcessConfig.buildWorkingDir

Source:CliProcessConfig.java Github

copy

Full Screen

...50 this.timeoutSpecified = true;51 return this;52 }53 public CliProcessConfig workingDir(String workingDir) {54 this.workingDir = buildWorkingDir(workingDir);55 return this;56 }57 public CliProcessConfig workingDir(Path workingDir) {58 this.workingDir = buildWorkingDir(workingDir);59 return this;60 }61 public CliProcessConfig silent() {62 this.isSilent = true;63 return this;64 }65 public Map<String, String> getEnv() {66 return env;67 }68 public File getWorkingDir() {69 return workingDir;70 }71 public boolean isSilent() {72 return isSilent;73 }74 public long getTimeoutMs() {75 return timeoutMs;76 }77 public boolean isTimeoutSpecified() {78 return timeoutSpecified;79 }80 public String getPersonaId() {81 return personaId;82 }83 WebTauStepInput createStepInput() {84 Map<String, Object> input = new LinkedHashMap<>();85 if (workingDir != null) {86 input.put("working dir", workingDir.toString());87 }88 if (timeoutSpecified) {89 input.put("local timeout", timeoutMs);90 }91 env.forEach((k, v) -> input.put("$" + k, v));92 return WebTauStepInputKeyValue.stepInput(input);93 }94 void applyTo(ProcessBuilder processBuilder) {95 if (!env.isEmpty()) {96 processBuilder.environment().putAll(env);97 }98 if (workingDir != null) {99 processBuilder.directory(workingDir);100 } else {101 processBuilder.directory(WebTauConfig.getCfg().getWorkingDir().toFile());102 }103 }104 private File buildWorkingDir(String workingDir) {105 return buildWorkingDir(Paths.get(workingDir));106 }107 private File buildWorkingDir(Path workingDir) {108 if (workingDir.isAbsolute()) {109 return workingDir.toFile();110 }111 return WebTauConfig.getCfg().fullPath(workingDir)112 .normalize()113 .toAbsolutePath().toFile();114 }115}...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Webtau automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful