cortinico/slidetoact

Unable to automate the custom view that is implemented from slide to act using Appium

Opened this issue · 2 comments

What kind of issue is this?

  • Feature Request. Start by telling what's problem you’re trying to solve. A Pull request is welcome as well.

Details

In case of bug report, please don't forget to include also:

  • Library Version. 0.10.0
  • Emulator/Device specs. All devices

I am trying to automate our app that has component built with slidetoact and appium/inspector is not able to identify the slider as it is in the custom view. Is there any way that I can automate it or trigger it from a java program ?

I am trying to automate our app that has component built with slidetoact and appium/inspector is not able to identify the slider as it is in the custom view. Is there any way that I can automate it or trigger it from a java program ?

Sorry I'm unable to help you here. It should be possible as we also have Espresso tests in this repo, and I believe Appium works on top of the Accessibility APIs we expose.

Have you tried asking on the Appium issue tracker?

Hi, this widget is not accessible for people using a screenreader (Talkback) per default, but its easy to fix it, and at the same fix should make it work well with testing frameworks that works on top of the Accessibility API.

Just add e.g.

        ViewCompat.addAccessibilityAction(vSlideToActView, "Approve the invoice") { _, _ ->
            approveInvoice()
            return@addAccessibilityAction true
        }

In the XML you might have to add importantForAccessibility="yes" as well:

    <com.ncorti.slidetoact.SlideToActView
        android:id="@+id/vSlideToActView"
        android:importantForAccessibility="yes"
        ...