mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-04 20:17:09 +00:00
feat(testrun): add Preflight() before sidecar/driver setup
Mobile platforms get a friendly install hint pointing at `sanderling doctor --platform=<p>` instead of `fork/exec java: not found`. Web is a no-op.
This commit is contained in:
1 parent
039c8ab226
commit
f850e573f8
3 files changed
+146
No files matched your search
@@ -21,6 +21,9 @@ import (
|
||||
// a cleanup function. For web, ChromeDriver is used directly; for android/ios
|
||||
// the JVM sidecar is extracted, spawned, and dialed.
|
||||
func buildDriver(ctx context.Context, options Options, stdout io.Writer) (driver.DeviceDriver, func(), error) {
|
||||
if err := Preflight(ctx, options.Platform); err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
if options.Platform == "web" {
|
||||
d := chrome.New()
|
||||
return d, func() { _ = d.Terminate(context.Background()) }, nil
|
||||
|
||||
Reference in new issue
Block a user