Run test on a specific screen on IOS

I’m trying to create a test for my app’s login page. But it is possible to use the app main screen without being logged in, only some screens asks for authentication. When I run the app, initially, it asks for many permissions like location and access to contacts. After giving all these permissions it goes to the main screen and then it is possible to use the app.

I would like to be able to execute the test directly on the login screen and avoid all the steps necessary to get there from the mais screen. Is it possible?

In android it is possible to start a specific activity using appActivity parameter, is there an equivalent for IOS?

As I still don’t know how to do that, for now I’m just executing the app in the default way and the tests starts in a screen asking for permission to access current location. I just added a method to print something on the console and it is not being execute. My test code is executed only after I click manually on the allow button in the simulator. So it means I won’t be able to do that programmatically.

How could I fix it?

I’m using Xcode 10.1, IOS 12.1and Appium 1.12.1

Also, for iOS simulator there is a permissions capability

1 Like