Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
GregoryPyreddy opened this issue Jun 27, 2023 · 2 comments
Open
1 task done

Comments

@GregoryPyreddy
Copy link

GregoryPyreddy commented Jun 27, 2023

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 ?

@cortinico
Copy link
Owner

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?

@nordfalk
Copy link

nordfalk commented Nov 10, 2023

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"
        ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants