mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
feat(ios): launch via XCTest with env vars for hierarchy/tap access (#39)
* feat(proto): add env map to LaunchRequest * feat(driver): add env param to Launch interface and all implementations * feat(sidecar): add IosDriverBackend using Maestro IOSDriver + env pass-through * feat(testrun): launch iOS app via XCTest with env vars instead of simctl * fix(ios): replace LaunchApp with BootedUDID; simctl launch moved to XCTest path * test(cli): add tests for ios platform flag and ios-device flag parsing * fix(sdk-ios): check semaphore wait result; resolve port from args and env; register extractors before start
This commit is contained in:
20 files changed
+323
-90
No files matched your search
@@ -12,6 +12,7 @@ import (
|
||||
"github.com/priyanshujain/sanderling/internal/driver"
|
||||
"github.com/priyanshujain/sanderling/internal/driver/chrome"
|
||||
driverSidecar "github.com/priyanshujain/sanderling/internal/driver/sidecar"
|
||||
"github.com/priyanshujain/sanderling/internal/ios"
|
||||
"github.com/priyanshujain/sanderling/internal/sidecar"
|
||||
)
|
||||
|
||||
@@ -35,10 +36,16 @@ func buildDriver(ctx context.Context, options Options, stdout io.Writer) (driver
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
sidecarCommand := exec.CommandContext(ctx, "java", "-jar", jarPath,
|
||||
sidecarArgs := []string{"-jar", jarPath,
|
||||
"--port", strconv.Itoa(sidecarPort),
|
||||
"--platform", options.Platform,
|
||||
)
|
||||
}
|
||||
if options.Platform == "ios" {
|
||||
if udid := ios.BootedUDID(ctx); udid != "" {
|
||||
sidecarArgs = append(sidecarArgs, "--udid", udid)
|
||||
}
|
||||
}
|
||||
sidecarCommand := exec.CommandContext(ctx, "java", sidecarArgs...)
|
||||
sidecarCommand.Stdout = stdout
|
||||
sidecarCommand.Stderr = stdout
|
||||
sidecarCommand.Env = android.EnvWithAndroidPlatformTools(os.Environ())
|
||||
|
||||
Reference in new issue
Block a user