--
You received this message because you are subscribed to the Google Groups "Yet another Expect for Java" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-expecti...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Process process = Runtime.getRuntime().exec("/bin/bash");
Expect expect = new ExpectBuilder()
.withInputs(process.getInputStream())
.withOutput(process.getOutputStream())
.withTimeout(10, TimeUnit.SECONDS)
//.withExceptionOnFailure()
.withEchoOutput(outoutInfo)
.build();
expect.sendLine("cd /Volumes/BOOTCAMP/MyBuild");
expect.sendLine("ls");
Result result = expect.expect(contains("iPhone"));
expect.sendLine("fastlane init");
result = expect.expect(contains("Your Apple ID (e.g. fast...@krausefx.com)"));
System.out.println(result.toString());
expect.sendLine("em...@email.com");
result = expect.expect(contains("Your Apple ID (e.g. fast...@krausefx.com)"));
Process process = Runtime.getRuntime().exec("/bin/bash");
Expect expect = new ExpectBuilder()
.withInputs(process.getInputStream())
.withOutput(process.getOutputStream())
.withTimeout(10, TimeUnit.SECONDS)
//.withExceptionOnFailure()
.withEchoOutput(outoutInfo)
.build();
Can you please explain with a code example how do i do it?
Process process = Runtime.getRuntime().exec(
// "/bin/bash"
"/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal"
);