Forum Xamarin Test Cloud (Read Only)

Drag and drop through multiple points in UITest

OuchLiuOuchLiu USMember

Hi,

May I know if there is any way to implement the operation to drag and drop through multiple points (just like to unlock the screen with gesture) in UITest for both Android and iOS?

I've tried the DragCoordinates API, but there are only 2 points supported.

Even I use several DragCoordinates calls, the actions are not continuous, so the validation will be failed.

Thank you.

Answers

  • Kent.GreenKent.Green USXamarin Team Xamurai

    Hi,

    I checked with one of our engineers on this, and it looks like this feature isn't currently available. DragCoordinates which only takes two points as you noted seems to be the closest equivalent.

    If you like you like you can file a feature request on that here: https://testcloud.ideas.aha.io/ideas

    One other thing is, I'm not sure if you meant your example of using the lock screen as literal, but just in case, there's an additional reason that particular scenario would not work: currently Xamarin.UITest can only automate a single app at a time & not system apps. Also, I suspect that automating anything on a lock screen (even with the ability to use system apps) might be actively prevented by security measures.

    Hope this helps!
    -Kent

  • OuchLiuOuchLiu USMember

    Hi Kent,

    Thank you for your reply.

    Since there is an app lock inside our app that need to be unlocked with gesture, so we do need this function to make our test passed.

    I will go to request it on the ideas site.

    Thank you.

  • Kent.GreenKent.Green USXamarin Team Xamurai

    Hi, thanks for the clarification. Since it's inside the app itself, it might not be a problem for the automation to access it as it would for the system screenlock. (Though that still doesn't help with your multiple points issue.)

    One thing you could do, if the screenlock is blocking your ability to test other aspects of your app; is you might be able to bypass it using a backdoor method: https://developer.xamarin.com/guides/testcloud/uitest/working-with/backdoors/. Backdoors are commonly used in situations where say, a login screen has to be skipped because the tester doesn't want the app to have to connect with the login server or wants to employ dummy credentials.

Sign In or Register to comment.