How do I tap an Action Sheet

I'm using C# UI testing (not Gherkin).

I wish to tap the Action Menu.

How do I accomplish this?

Tagged:

Best Answers

Answers

  • SteveRawlinsSteveRawlins USMember ✭✭

    An iOS-literate colleague suggested UIBarButton, but that did not work.

    I tried

    app.Tap(c => c.Button());

    and that seemed to work.

    But what if there are several buttons on the screen? And what about Android?

    I'm trying to code cross-platform C# tests using best possible practice. Any suggestions?

    I have attached a picture of the icon, btw. It is this "Action Menu" or "Action Sheet" button that I am trying to Tap

  • RobbieElliottRobbieElliott USMember ✭✭

    The first thing my iOS app does is prompt the user for auth to use Analytics like so. My test case code is below that which simply waits for for the UIAlertController. I have a breakpoint on the wait and it is hit but after continuing the timeout occurs. Does Xamarin.UITest 2.0.7 support the UIAlertController class? Or does my test code need tweaking?

    [Test] public void AppLaunches() { app.WaitForElement(c => c.ClassFull("UIAlertController")); app.Tap(c => c.ClassFull("UIAlertController").Index(1)); }

Sign In or Register to comment.