import XCTest
import CoreLocation
final class SampleAppTests: XCTestCase {
func testExample() throws {
XCUIDevice.shared.location = XCUILocation(location: CLLocation(latitude: 37.334886, longitude: -122.008988))
// Launch your app and run the test.
}
}
Proposal
Ideally, we'd be able to use a method like await $.native.setLocation(LatLng(37.334886, -122.008988));
However if we're limited to before the app is launched, then perhaps we can pass coordinates to NativeAutomatorConfig()?
Use case
Hello,
I noticed the issue https://github.com/leancodepl/patrol/issues/1961 was recently closed, but I was wondering if there's any way we could implement mocking for the location of the phone by using XCUILocation as described here on Apple's doc?
Example:
Proposal
Ideally, we'd be able to use a method like
await $.native.setLocation(LatLng(37.334886, -122.008988));
However if we're limited to before the app is launched, then perhaps we can pass coordinates to
NativeAutomatorConfig()
?