Reputation: 267
I am writing a UI
test for my app but the problem is when user signup in app, takes a phone number and send verification code to that number and on the next screen I have to type in the verification code send to my number. The UI
test fails because of this so is there any way I can bypass the verification code screen and jump directly to the next screen
Upvotes: 0
Views: 1317
Reputation: 353
You can set a variable in app.launchEnvironment
like this:
app.launchEnvironment["SKIP_VERIFICATION"] = true
In main target, before going to next screen you can check if SKIP_VERIFICATION
is set, skip this screen and move to next screen.
In main target you can get this variable like this:
ProcessInfo.processInfo.environment["SKIP_VERIFICATION"]
Upvotes: 1