I've got a UIAutomation test that tests an app with a Share Extension. I want to pass in some launchArguments and launchEnvironment properties to the Share Extension in my test. I can't figure out a way of doing it. When debug the ProcessInfo in the extension my values aren't there. I've tried setting them like this:
XCUIApplication(bundleIdentifier:"com.my.app").launchArguments = ["TEST"]
XCUIApplication(bundleIdentifier:"com.my.app").launchEnvironment = ["TEST":"TEST"]
and this:
XCUIApplication().launchArguments = ["TEST"]
XCUIApplication().launchEnvironment = ["TEST":"TEST"]
Note, I am correctly getting the correct process when I'm finding it with the bundle identifier.